agent-communication-mcp 0.1.0
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/LICENSE +21 -0
- package/README.md +300 -0
- package/dist/adapters/ManagementAdapter.d.ts +28 -0
- package/dist/adapters/ManagementAdapter.d.ts.map +1 -0
- package/dist/adapters/ManagementAdapter.js +98 -0
- package/dist/adapters/ManagementAdapter.js.map +1 -0
- package/dist/adapters/MessagingAdapter.d.ts +35 -0
- package/dist/adapters/MessagingAdapter.d.ts.map +1 -0
- package/dist/adapters/MessagingAdapter.js +108 -0
- package/dist/adapters/MessagingAdapter.js.map +1 -0
- package/dist/adapters/RoomsAdapter.d.ts +43 -0
- package/dist/adapters/RoomsAdapter.d.ts.map +1 -0
- package/dist/adapters/RoomsAdapter.js +140 -0
- package/dist/adapters/RoomsAdapter.js.map +1 -0
- package/dist/errors/AppError.d.ts +95 -0
- package/dist/errors/AppError.d.ts.map +1 -0
- package/dist/errors/AppError.js +180 -0
- package/dist/errors/AppError.js.map +1 -0
- package/dist/errors/index.d.ts +4 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +41 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/examples/interface-usage.d.ts +2 -0
- package/dist/examples/interface-usage.d.ts.map +1 -0
- package/dist/examples/interface-usage.js +204 -0
- package/dist/examples/interface-usage.js.map +1 -0
- package/dist/features/management/DataScanner.d.ts +18 -0
- package/dist/features/management/DataScanner.d.ts.map +1 -0
- package/dist/features/management/DataScanner.js +95 -0
- package/dist/features/management/DataScanner.js.map +1 -0
- package/dist/features/management/ManagementService.d.ts +17 -0
- package/dist/features/management/ManagementService.d.ts.map +1 -0
- package/dist/features/management/ManagementService.js +130 -0
- package/dist/features/management/ManagementService.js.map +1 -0
- package/dist/features/management/StatsCollector.d.ts +11 -0
- package/dist/features/management/StatsCollector.d.ts.map +1 -0
- package/dist/features/management/StatsCollector.js +79 -0
- package/dist/features/management/StatsCollector.js.map +1 -0
- package/dist/features/management/index.d.ts +29 -0
- package/dist/features/management/index.d.ts.map +1 -0
- package/dist/features/management/index.js +37 -0
- package/dist/features/management/index.js.map +1 -0
- package/dist/features/management/management.schema.d.ts +1 -0
- package/dist/features/management/management.schema.d.ts.map +1 -0
- package/dist/features/management/management.schema.js +2 -0
- package/dist/features/management/management.schema.js.map +1 -0
- package/dist/features/management/tools/management.tools.d.ts +9 -0
- package/dist/features/management/tools/management.tools.d.ts.map +1 -0
- package/dist/features/management/tools/management.tools.js +134 -0
- package/dist/features/management/tools/management.tools.js.map +1 -0
- package/dist/features/management/types/management.types.d.ts +41 -0
- package/dist/features/management/types/management.types.d.ts.map +1 -0
- package/dist/features/management/types/management.types.js +3 -0
- package/dist/features/management/types/management.types.js.map +1 -0
- package/dist/features/messaging/MessageCache.d.ts +31 -0
- package/dist/features/messaging/MessageCache.d.ts.map +1 -0
- package/dist/features/messaging/MessageCache.js +144 -0
- package/dist/features/messaging/MessageCache.js.map +1 -0
- package/dist/features/messaging/MessageService.d.ts +10 -0
- package/dist/features/messaging/MessageService.d.ts.map +1 -0
- package/dist/features/messaging/MessageService.js +60 -0
- package/dist/features/messaging/MessageService.js.map +1 -0
- package/dist/features/messaging/MessageStorage.d.ts +14 -0
- package/dist/features/messaging/MessageStorage.d.ts.map +1 -0
- package/dist/features/messaging/MessageStorage.js +138 -0
- package/dist/features/messaging/MessageStorage.js.map +1 -0
- package/dist/features/messaging/MessageValidator.d.ts +43 -0
- package/dist/features/messaging/MessageValidator.d.ts.map +1 -0
- package/dist/features/messaging/MessageValidator.js +63 -0
- package/dist/features/messaging/MessageValidator.js.map +1 -0
- package/dist/features/messaging/index.d.ts +21 -0
- package/dist/features/messaging/index.d.ts.map +1 -0
- package/dist/features/messaging/index.js +34 -0
- package/dist/features/messaging/index.js.map +1 -0
- package/dist/features/messaging/tools/messaging.tools.d.ts +158 -0
- package/dist/features/messaging/tools/messaging.tools.d.ts.map +1 -0
- package/dist/features/messaging/tools/messaging.tools.js +166 -0
- package/dist/features/messaging/tools/messaging.tools.js.map +1 -0
- package/dist/features/messaging/types/messaging.types.d.ts +44 -0
- package/dist/features/messaging/types/messaging.types.d.ts.map +1 -0
- package/dist/features/messaging/types/messaging.types.js +3 -0
- package/dist/features/messaging/types/messaging.types.js.map +1 -0
- package/dist/features/messaging/utils.d.ts +2 -0
- package/dist/features/messaging/utils.d.ts.map +1 -0
- package/dist/features/messaging/utils.js +18 -0
- package/dist/features/messaging/utils.js.map +1 -0
- package/dist/features/rooms/index.d.ts +46 -0
- package/dist/features/rooms/index.d.ts.map +1 -0
- package/dist/features/rooms/index.js +88 -0
- package/dist/features/rooms/index.js.map +1 -0
- package/dist/features/rooms/presence/PresenceService.d.ts +24 -0
- package/dist/features/rooms/presence/PresenceService.d.ts.map +1 -0
- package/dist/features/rooms/presence/PresenceService.js +216 -0
- package/dist/features/rooms/presence/PresenceService.js.map +1 -0
- package/dist/features/rooms/presence/PresenceStorage.d.ts +21 -0
- package/dist/features/rooms/presence/PresenceStorage.d.ts.map +1 -0
- package/dist/features/rooms/presence/PresenceStorage.js +222 -0
- package/dist/features/rooms/presence/PresenceStorage.js.map +1 -0
- package/dist/features/rooms/room/RoomService.d.ts +24 -0
- package/dist/features/rooms/room/RoomService.d.ts.map +1 -0
- package/dist/features/rooms/room/RoomService.js +126 -0
- package/dist/features/rooms/room/RoomService.js.map +1 -0
- package/dist/features/rooms/room/RoomStorage.d.ts +16 -0
- package/dist/features/rooms/room/RoomStorage.d.ts.map +1 -0
- package/dist/features/rooms/room/RoomStorage.js +158 -0
- package/dist/features/rooms/room/RoomStorage.js.map +1 -0
- package/dist/features/rooms/tools/presence.tools.d.ts +44 -0
- package/dist/features/rooms/tools/presence.tools.d.ts.map +1 -0
- package/dist/features/rooms/tools/presence.tools.js +183 -0
- package/dist/features/rooms/tools/presence.tools.js.map +1 -0
- package/dist/features/rooms/tools/room.tools.d.ts +41 -0
- package/dist/features/rooms/tools/room.tools.d.ts.map +1 -0
- package/dist/features/rooms/tools/room.tools.js +103 -0
- package/dist/features/rooms/tools/room.tools.js.map +1 -0
- package/dist/features/rooms/types/rooms.types.d.ts +120 -0
- package/dist/features/rooms/types/rooms.types.d.ts.map +1 -0
- package/dist/features/rooms/types/rooms.types.js +3 -0
- package/dist/features/rooms/types/rooms.types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +69 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/index.d.ts +7 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +52 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/management.schema.d.ts +332 -0
- package/dist/schemas/management.schema.d.ts.map +1 -0
- package/dist/schemas/management.schema.js +109 -0
- package/dist/schemas/management.schema.js.map +1 -0
- package/dist/schemas/message.schema.d.ts +151 -0
- package/dist/schemas/message.schema.d.ts.map +1 -0
- package/dist/schemas/message.schema.js +54 -0
- package/dist/schemas/message.schema.js.map +1 -0
- package/dist/schemas/room.schema.d.ts +344 -0
- package/dist/schemas/room.schema.d.ts.map +1 -0
- package/dist/schemas/room.schema.js +91 -0
- package/dist/schemas/room.schema.js.map +1 -0
- package/dist/schemas/validation-test.d.ts +2 -0
- package/dist/schemas/validation-test.d.ts.map +1 -0
- package/dist/schemas/validation-test.js +113 -0
- package/dist/schemas/validation-test.js.map +1 -0
- package/dist/server/ErrorHandler.d.ts +19 -0
- package/dist/server/ErrorHandler.d.ts.map +1 -0
- package/dist/server/ErrorHandler.js +71 -0
- package/dist/server/ErrorHandler.js.map +1 -0
- package/dist/server/ToolRegistry.d.ts +11 -0
- package/dist/server/ToolRegistry.d.ts.map +1 -0
- package/dist/server/ToolRegistry.js +112 -0
- package/dist/server/ToolRegistry.js.map +1 -0
- package/dist/services/LockService.d.ts +26 -0
- package/dist/services/LockService.d.ts.map +1 -0
- package/dist/services/LockService.js +205 -0
- package/dist/services/LockService.js.map +1 -0
- package/dist/tools/index.d.ts +47 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +47 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/management.d.ts +16 -0
- package/dist/tools/management.d.ts.map +1 -0
- package/dist/tools/management.js +62 -0
- package/dist/tools/management.js.map +1 -0
- package/dist/tools/messaging.d.ts +16 -0
- package/dist/tools/messaging.d.ts.map +1 -0
- package/dist/tools/messaging.js +79 -0
- package/dist/tools/messaging.js.map +1 -0
- package/dist/tools/room.d.ts +37 -0
- package/dist/tools/room.d.ts.map +1 -0
- package/dist/tools/room.js +140 -0
- package/dist/tools/room.js.map +1 -0
- package/dist/types/entities.d.ts +84 -0
- package/dist/types/entities.d.ts.map +1 -0
- package/dist/types/entities.js +3 -0
- package/dist/types/entities.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +20 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/mcp.d.ts +278 -0
- package/dist/types/mcp.d.ts.map +1 -0
- package/dist/types/mcp.js +3 -0
- package/dist/types/mcp.js.map +1 -0
- package/dist/types/services.d.ts +43 -0
- package/dist/types/services.d.ts.map +1 -0
- package/dist/types/services.js +3 -0
- package/dist/types/services.js.map +1 -0
- package/dist/types/validation.test.d.ts +31 -0
- package/dist/types/validation.test.d.ts.map +1 -0
- package/dist/types/validation.test.js +146 -0
- package/dist/types/validation.test.js.map +1 -0
- package/dist/utils/logger.d.ts +20 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +40 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.MessageStorage = void 0;
|
|
37
|
+
const fs = __importStar(require("fs/promises"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const AppError_1 = require("../../errors/AppError");
|
|
40
|
+
class MessageStorage {
|
|
41
|
+
dataDir;
|
|
42
|
+
constructor(dataDir = './data') {
|
|
43
|
+
this.dataDir = dataDir;
|
|
44
|
+
}
|
|
45
|
+
getMessagesFilePath(roomName) {
|
|
46
|
+
return path.join(this.dataDir, 'rooms', roomName, 'messages.jsonl');
|
|
47
|
+
}
|
|
48
|
+
async ensureDirectoryExists(dirPath) {
|
|
49
|
+
try {
|
|
50
|
+
await fs.mkdir(dirPath, { recursive: true });
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
throw new AppError_1.StorageError('createDirectory', `Failed to create directory: ${dirPath}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async saveMessage(roomName, messageData) {
|
|
57
|
+
const filePath = this.getMessagesFilePath(roomName);
|
|
58
|
+
const dirPath = path.dirname(filePath);
|
|
59
|
+
try {
|
|
60
|
+
await this.ensureDirectoryExists(dirPath);
|
|
61
|
+
const jsonLine = JSON.stringify(messageData) + '\n';
|
|
62
|
+
await fs.appendFile(filePath, jsonLine, 'utf8');
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
if (error instanceof AppError_1.StorageError) {
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
throw new AppError_1.StorageError('saveMessage', `Failed to save message: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async getMessages(params) {
|
|
72
|
+
const filePath = this.getMessagesFilePath(params.roomName);
|
|
73
|
+
const limit = params.limit ?? 50;
|
|
74
|
+
const offset = params.offset ?? 0;
|
|
75
|
+
try {
|
|
76
|
+
try {
|
|
77
|
+
await fs.access(filePath);
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return { messages: [], hasMore: false };
|
|
81
|
+
}
|
|
82
|
+
const fileContent = await fs.readFile(filePath, 'utf8');
|
|
83
|
+
const lines = fileContent.trim().split('\n').filter(line => line.trim());
|
|
84
|
+
const allMessages = [];
|
|
85
|
+
for (const line of lines) {
|
|
86
|
+
try {
|
|
87
|
+
const data = JSON.parse(line);
|
|
88
|
+
const message = {
|
|
89
|
+
...data,
|
|
90
|
+
roomName: params.roomName
|
|
91
|
+
};
|
|
92
|
+
allMessages.push(message);
|
|
93
|
+
}
|
|
94
|
+
catch (parseError) {
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
let filteredMessages = allMessages;
|
|
99
|
+
if (params.mentionsOnly && params.agentName) {
|
|
100
|
+
filteredMessages = allMessages.filter(msg => msg.mentions.includes(params.agentName));
|
|
101
|
+
}
|
|
102
|
+
filteredMessages.sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime());
|
|
103
|
+
const startIndex = offset;
|
|
104
|
+
const endIndex = startIndex + limit;
|
|
105
|
+
const paginatedMessages = filteredMessages.slice(startIndex, endIndex);
|
|
106
|
+
const hasMore = endIndex < filteredMessages.length;
|
|
107
|
+
return {
|
|
108
|
+
messages: paginatedMessages,
|
|
109
|
+
hasMore
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
if (error instanceof AppError_1.StorageError) {
|
|
114
|
+
throw error;
|
|
115
|
+
}
|
|
116
|
+
throw new AppError_1.StorageError('readMessages', `Failed to read messages: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
async getMessageCount(roomName) {
|
|
120
|
+
const filePath = this.getMessagesFilePath(roomName);
|
|
121
|
+
try {
|
|
122
|
+
try {
|
|
123
|
+
await fs.access(filePath);
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
return 0;
|
|
127
|
+
}
|
|
128
|
+
const fileContent = await fs.readFile(filePath, 'utf8');
|
|
129
|
+
const lines = fileContent.trim().split('\n').filter(line => line.trim());
|
|
130
|
+
return lines.length;
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
throw new AppError_1.StorageError('getMessageCount', `Failed to count messages: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
exports.MessageStorage = MessageStorage;
|
|
138
|
+
//# sourceMappingURL=MessageStorage.js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I,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QAEpD,IAAI,CAAC;YAEH,IAAI,CAAC;gBACH,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC5B,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,CAAC,CAAC;YACX,CAAC;YAED,MAAM,WAAW,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YACxD,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YACzE,OAAO,KAAK,CAAC,MAAM,CAAC;QACtB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,uBAAY,CACpB,iBAAiB,EACjB,6BAA6B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CACxF,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAhID,wCAgIC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SendMessageParams, GetMessagesParams } from './types/messaging.types';
|
|
3
|
+
export declare const sendMessageSchema: z.ZodObject<{
|
|
4
|
+
agentName: z.ZodString;
|
|
5
|
+
roomName: z.ZodString;
|
|
6
|
+
message: z.ZodString;
|
|
7
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
agentName: string;
|
|
10
|
+
roomName: string;
|
|
11
|
+
message: string;
|
|
12
|
+
metadata?: Record<string, any> | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
agentName: string;
|
|
15
|
+
roomName: string;
|
|
16
|
+
message: string;
|
|
17
|
+
metadata?: Record<string, any> | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const getMessagesSchema: z.ZodObject<{
|
|
20
|
+
roomName: z.ZodString;
|
|
21
|
+
agentName: z.ZodOptional<z.ZodString>;
|
|
22
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
23
|
+
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
24
|
+
mentionsOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
roomName: string;
|
|
27
|
+
limit: number;
|
|
28
|
+
offset: number;
|
|
29
|
+
mentionsOnly: boolean;
|
|
30
|
+
agentName?: string | undefined;
|
|
31
|
+
}, {
|
|
32
|
+
roomName: string;
|
|
33
|
+
agentName?: string | undefined;
|
|
34
|
+
limit?: number | undefined;
|
|
35
|
+
offset?: number | undefined;
|
|
36
|
+
mentionsOnly?: boolean | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
export declare class MessageValidator {
|
|
39
|
+
static validateSendMessage(params: unknown): SendMessageParams;
|
|
40
|
+
static validateGetMessages(params: unknown): GetMessagesParams;
|
|
41
|
+
static extractMentions(message: string): string[];
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=MessageValidator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageValidator.d.ts","sourceRoot":"","sources":["../../../src/features/messaging/MessageValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE/E,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;EAK5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAM5B,CAAC;AAEH,qBAAa,gBAAgB;IAC3B,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB;IAe9D,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,iBAAiB;IAe9D,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;CAclD"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MessageValidator = exports.getMessagesSchema = exports.sendMessageSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const AppError_1 = require("../../errors/AppError");
|
|
6
|
+
exports.sendMessageSchema = zod_1.z.object({
|
|
7
|
+
agentName: zod_1.z.string().min(1).max(50),
|
|
8
|
+
roomName: zod_1.z.string().regex(/^[a-zA-Z0-9-_]+$/),
|
|
9
|
+
message: zod_1.z.string().min(1).max(1000),
|
|
10
|
+
metadata: zod_1.z.record(zod_1.z.any()).optional()
|
|
11
|
+
});
|
|
12
|
+
exports.getMessagesSchema = zod_1.z.object({
|
|
13
|
+
roomName: zod_1.z.string().regex(/^[a-zA-Z0-9-_]+$/),
|
|
14
|
+
agentName: zod_1.z.string().min(1).max(50).optional(),
|
|
15
|
+
limit: zod_1.z.number().int().min(1).max(1000).optional().default(50),
|
|
16
|
+
offset: zod_1.z.number().int().min(0).optional().default(0),
|
|
17
|
+
mentionsOnly: zod_1.z.boolean().optional().default(false)
|
|
18
|
+
});
|
|
19
|
+
class MessageValidator {
|
|
20
|
+
static validateSendMessage(params) {
|
|
21
|
+
try {
|
|
22
|
+
return exports.sendMessageSchema.parse(params);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
if (error instanceof zod_1.z.ZodError) {
|
|
26
|
+
const firstError = error.errors[0];
|
|
27
|
+
if (firstError) {
|
|
28
|
+
throw new AppError_1.ValidationError(firstError.path.join('.'), firstError.message);
|
|
29
|
+
}
|
|
30
|
+
throw new AppError_1.ValidationError('validation_failed', 'Validation failed');
|
|
31
|
+
}
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
static validateGetMessages(params) {
|
|
36
|
+
try {
|
|
37
|
+
return exports.getMessagesSchema.parse(params);
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
if (error instanceof zod_1.z.ZodError) {
|
|
41
|
+
const firstError = error.errors[0];
|
|
42
|
+
if (firstError) {
|
|
43
|
+
throw new AppError_1.ValidationError(firstError.path.join('.'), firstError.message);
|
|
44
|
+
}
|
|
45
|
+
throw new AppError_1.ValidationError('validation_failed', 'Validation failed');
|
|
46
|
+
}
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
static extractMentions(message) {
|
|
51
|
+
const mentionRegex = /@([a-zA-Z0-9_-]+)/g;
|
|
52
|
+
const mentions = [];
|
|
53
|
+
let match;
|
|
54
|
+
while ((match = mentionRegex.exec(message)) !== null) {
|
|
55
|
+
if (match[1]) {
|
|
56
|
+
mentions.push(match[1]);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return [...new Set(mentions)];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.MessageValidator = MessageValidator;
|
|
63
|
+
//# sourceMappingURL=MessageValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MessageValidator.js","sourceRoot":"","sources":["../../../src/features/messaging/MessageValidator.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,oDAAwD;AAG3C,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IACpC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC;IAC9C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CA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MessageResponse, GetMessagesParams, MessageListResponse, Message } from './types/messaging.types';
|
|
2
|
+
export interface IMessagingAPI {
|
|
3
|
+
sendMessage(params: SendMessageParams): Promise<SendMessageResponse>;
|
|
4
|
+
getMessages(params: GetMessagesParams): Promise<MessageListResponse>;
|
|
5
|
+
getMessageCount(roomName: string): Promise<number>;
|
|
6
|
+
}
|
|
7
|
+
export declare class MessagingAPI implements IMessagingAPI {
|
|
8
|
+
private readonly messageService;
|
|
9
|
+
constructor(dataDir?: string, cacheCapacity?: number);
|
|
10
|
+
sendMessage(params: SendMessageParams): Promise<SendMessageResponse>;
|
|
11
|
+
getMessages(params: GetMessagesParams): Promise<MessageListResponse>;
|
|
12
|
+
getMessageCount(roomName: string): Promise<number>;
|
|
13
|
+
}
|
|
14
|
+
export type { SendMessageParams, SendMessageResponse, GetMessagesParams, MessageListResponse, Message };
|
|
15
|
+
export { MessageService } from './MessageService';
|
|
16
|
+
export { MessageStorage } from './MessageStorage';
|
|
17
|
+
export { MessageCache } from './MessageCache';
|
|
18
|
+
export { MessageValidator } from './MessageValidator';
|
|
19
|
+
export { messagingTools, MessagingToolHandlers, messagingToolHandlers } from './tools/messaging.tools';
|
|
20
|
+
export declare const messagingAPI: MessagingAPI;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/messaging/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,OAAO,EACR,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACrE,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACrE,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACpD;AAGD,qBAAa,YAAa,YAAW,aAAa;IAChD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;gBAEpC,OAAO,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM;IAI9C,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAIpE,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAIpE,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAGzD;AAGD,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,OAAO,EACR,CAAC;AAGF,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGvG,eAAO,MAAM,YAAY,cAAqB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.messagingAPI = exports.messagingToolHandlers = exports.MessagingToolHandlers = exports.messagingTools = exports.MessageValidator = exports.MessageCache = exports.MessageStorage = exports.MessageService = exports.MessagingAPI = void 0;
|
|
4
|
+
const MessageService_1 = require("./MessageService");
|
|
5
|
+
class MessagingAPI {
|
|
6
|
+
messageService;
|
|
7
|
+
constructor(dataDir, cacheCapacity) {
|
|
8
|
+
this.messageService = new MessageService_1.MessageService(dataDir, cacheCapacity);
|
|
9
|
+
}
|
|
10
|
+
async sendMessage(params) {
|
|
11
|
+
return await this.messageService.sendMessage(params);
|
|
12
|
+
}
|
|
13
|
+
async getMessages(params) {
|
|
14
|
+
return await this.messageService.getMessages(params);
|
|
15
|
+
}
|
|
16
|
+
async getMessageCount(roomName) {
|
|
17
|
+
return await this.messageService.getMessageCount(roomName);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.MessagingAPI = MessagingAPI;
|
|
21
|
+
var MessageService_2 = require("./MessageService");
|
|
22
|
+
Object.defineProperty(exports, "MessageService", { enumerable: true, get: function () { return MessageService_2.MessageService; } });
|
|
23
|
+
var MessageStorage_1 = require("./MessageStorage");
|
|
24
|
+
Object.defineProperty(exports, "MessageStorage", { enumerable: true, get: function () { return MessageStorage_1.MessageStorage; } });
|
|
25
|
+
var MessageCache_1 = require("./MessageCache");
|
|
26
|
+
Object.defineProperty(exports, "MessageCache", { enumerable: true, get: function () { return MessageCache_1.MessageCache; } });
|
|
27
|
+
var MessageValidator_1 = require("./MessageValidator");
|
|
28
|
+
Object.defineProperty(exports, "MessageValidator", { enumerable: true, get: function () { return MessageValidator_1.MessageValidator; } });
|
|
29
|
+
var messaging_tools_1 = require("./tools/messaging.tools");
|
|
30
|
+
Object.defineProperty(exports, "messagingTools", { enumerable: true, get: function () { return messaging_tools_1.messagingTools; } });
|
|
31
|
+
Object.defineProperty(exports, "MessagingToolHandlers", { enumerable: true, get: function () { return messaging_tools_1.MessagingToolHandlers; } });
|
|
32
|
+
Object.defineProperty(exports, "messagingToolHandlers", { enumerable: true, get: function () { return messaging_tools_1.messagingToolHandlers; } });
|
|
33
|
+
exports.messagingAPI = new MessagingAPI();
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/messaging/index.ts"],"names":[],"mappings":";;;AAAA,qDAAkD;AAiBlD,MAAa,YAAY;IACN,cAAc,CAAiB;IAEhD,YAAY,OAAgB,EAAE,aAAsB;QAClD,IAAI,CAAC,cAAc,GAAG,IAAI,+BAAc,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACnE,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,MAAyB;QACzC,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,MAAyB;QACzC,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACvD,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,QAAgB;QACpC,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC7D,CAAC;CACF;AAlBD,oCAkBC;AAYD,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AACrB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AAGzB,2DAAuG;AAA9F,iHAAA,cAAc,OAAA;AAAE,wHAAA,qBAAqB,OAAA;AAAE,wHAAA,qBAAqB,OAAA;AAGxD,QAAA,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
export declare const messagingTools: readonly [{
|
|
2
|
+
readonly name: "agent_communication/send_message";
|
|
3
|
+
readonly description: "Send a message to a room with mention support";
|
|
4
|
+
readonly inputSchema: {
|
|
5
|
+
readonly type: "object";
|
|
6
|
+
readonly properties: {
|
|
7
|
+
readonly agentName: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly description: "Name of the sending agent";
|
|
10
|
+
readonly minLength: 1;
|
|
11
|
+
readonly maxLength: 50;
|
|
12
|
+
};
|
|
13
|
+
readonly roomName: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
readonly description: "Name of the target room";
|
|
16
|
+
readonly pattern: "^[a-zA-Z0-9-_]+$";
|
|
17
|
+
};
|
|
18
|
+
readonly message: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly description: "Message content (supports @mentions)";
|
|
21
|
+
readonly minLength: 1;
|
|
22
|
+
readonly maxLength: 1000;
|
|
23
|
+
};
|
|
24
|
+
readonly metadata: {
|
|
25
|
+
readonly type: "object";
|
|
26
|
+
readonly description: "Optional metadata";
|
|
27
|
+
readonly additionalProperties: true;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
readonly required: readonly ["agentName", "roomName", "message"];
|
|
31
|
+
readonly additionalProperties: false;
|
|
32
|
+
};
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "agent_communication/get_messages";
|
|
35
|
+
readonly description: "Retrieve messages from a room with pagination and filtering";
|
|
36
|
+
readonly inputSchema: {
|
|
37
|
+
readonly type: "object";
|
|
38
|
+
readonly properties: {
|
|
39
|
+
readonly roomName: {
|
|
40
|
+
readonly type: "string";
|
|
41
|
+
readonly description: "Name of the room";
|
|
42
|
+
readonly pattern: "^[a-zA-Z0-9-_]+$";
|
|
43
|
+
};
|
|
44
|
+
readonly agentName: {
|
|
45
|
+
readonly type: "string";
|
|
46
|
+
readonly description: "Agent name for mention filtering";
|
|
47
|
+
readonly minLength: 1;
|
|
48
|
+
readonly maxLength: 50;
|
|
49
|
+
};
|
|
50
|
+
readonly limit: {
|
|
51
|
+
readonly type: "number";
|
|
52
|
+
readonly description: "Maximum number of messages to retrieve";
|
|
53
|
+
readonly minimum: 1;
|
|
54
|
+
readonly maximum: 1000;
|
|
55
|
+
readonly default: 50;
|
|
56
|
+
};
|
|
57
|
+
readonly offset: {
|
|
58
|
+
readonly type: "number";
|
|
59
|
+
readonly description: "Number of messages to skip";
|
|
60
|
+
readonly minimum: 0;
|
|
61
|
+
readonly default: 0;
|
|
62
|
+
};
|
|
63
|
+
readonly mentionsOnly: {
|
|
64
|
+
readonly type: "boolean";
|
|
65
|
+
readonly description: "Only retrieve messages that mention the specified agent";
|
|
66
|
+
readonly default: false;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
readonly required: readonly ["roomName"];
|
|
70
|
+
readonly additionalProperties: false;
|
|
71
|
+
};
|
|
72
|
+
}];
|
|
73
|
+
export declare class MessagingToolHandlers {
|
|
74
|
+
private messagingAPI;
|
|
75
|
+
constructor(dataDir?: string, cacheCapacity?: number);
|
|
76
|
+
handleSendMessage(args: unknown): Promise<{
|
|
77
|
+
content: {
|
|
78
|
+
type: "text";
|
|
79
|
+
text: string;
|
|
80
|
+
}[];
|
|
81
|
+
isError?: undefined;
|
|
82
|
+
} | {
|
|
83
|
+
content: {
|
|
84
|
+
type: "text";
|
|
85
|
+
text: string;
|
|
86
|
+
}[];
|
|
87
|
+
isError: boolean;
|
|
88
|
+
}>;
|
|
89
|
+
handleGetMessages(args: unknown): Promise<{
|
|
90
|
+
content: {
|
|
91
|
+
type: "text";
|
|
92
|
+
text: string;
|
|
93
|
+
}[];
|
|
94
|
+
isError?: undefined;
|
|
95
|
+
} | {
|
|
96
|
+
content: {
|
|
97
|
+
type: "text";
|
|
98
|
+
text: string;
|
|
99
|
+
}[];
|
|
100
|
+
isError: boolean;
|
|
101
|
+
}>;
|
|
102
|
+
getHandlers(): {
|
|
103
|
+
'agent_communication/send_message': (args: unknown) => Promise<{
|
|
104
|
+
content: {
|
|
105
|
+
type: "text";
|
|
106
|
+
text: string;
|
|
107
|
+
}[];
|
|
108
|
+
isError?: undefined;
|
|
109
|
+
} | {
|
|
110
|
+
content: {
|
|
111
|
+
type: "text";
|
|
112
|
+
text: string;
|
|
113
|
+
}[];
|
|
114
|
+
isError: boolean;
|
|
115
|
+
}>;
|
|
116
|
+
'agent_communication/get_messages': (args: unknown) => Promise<{
|
|
117
|
+
content: {
|
|
118
|
+
type: "text";
|
|
119
|
+
text: string;
|
|
120
|
+
}[];
|
|
121
|
+
isError?: undefined;
|
|
122
|
+
} | {
|
|
123
|
+
content: {
|
|
124
|
+
type: "text";
|
|
125
|
+
text: string;
|
|
126
|
+
}[];
|
|
127
|
+
isError: boolean;
|
|
128
|
+
}>;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export declare const messagingToolHandlers: MessagingToolHandlers;
|
|
132
|
+
export declare const sendMessageHandler: (args: unknown) => Promise<{
|
|
133
|
+
content: {
|
|
134
|
+
type: "text";
|
|
135
|
+
text: string;
|
|
136
|
+
}[];
|
|
137
|
+
isError?: undefined;
|
|
138
|
+
} | {
|
|
139
|
+
content: {
|
|
140
|
+
type: "text";
|
|
141
|
+
text: string;
|
|
142
|
+
}[];
|
|
143
|
+
isError: boolean;
|
|
144
|
+
}>;
|
|
145
|
+
export declare const getMessagesHandler: (args: unknown) => Promise<{
|
|
146
|
+
content: {
|
|
147
|
+
type: "text";
|
|
148
|
+
text: string;
|
|
149
|
+
}[];
|
|
150
|
+
isError?: undefined;
|
|
151
|
+
} | {
|
|
152
|
+
content: {
|
|
153
|
+
type: "text";
|
|
154
|
+
text: string;
|
|
155
|
+
}[];
|
|
156
|
+
isError: boolean;
|
|
157
|
+
}>;
|
|
158
|
+
//# sourceMappingURL=messaging.tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messaging.tools.d.ts","sourceRoot":"","sources":["../../../../src/features/messaging/tools/messaging.tools.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0EjB,CAAC;AAGX,qBAAa,qBAAqB;IAChC,OAAO,CAAC,YAAY,CAAe;gBAEvB,OAAO,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM;IAI9C,iBAAiB,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;IAoC/B,iBAAiB,CAAC,IAAI,EAAE,OAAO;;;;;;;;;;;;;IAoCrC,WAAW;mDAxEmB,OAAO;;;;;;;;;;;;;mDAoCP,OAAO;;;;;;;;;;;;;;CA0CtC;AAGD,eAAO,MAAM,qBAAqB,uBAA8B,CAAC;AAGjE,eAAO,MAAM,kBAAkB,SApFC,OAAO;;;;;;;;;;;;EAoF8D,CAAC;AACtG,eAAO,MAAM,kBAAkB,SAjDC,OAAO;;;;;;;;;;;;EAiD8D,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMessagesHandler = exports.sendMessageHandler = exports.messagingToolHandlers = exports.MessagingToolHandlers = exports.messagingTools = void 0;
|
|
4
|
+
const index_1 = require("../index");
|
|
5
|
+
const MessageValidator_1 = require("../MessageValidator");
|
|
6
|
+
exports.messagingTools = [
|
|
7
|
+
{
|
|
8
|
+
name: 'agent_communication/send_message',
|
|
9
|
+
description: 'Send a message to a room with mention support',
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
agentName: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'Name of the sending agent',
|
|
16
|
+
minLength: 1,
|
|
17
|
+
maxLength: 50
|
|
18
|
+
},
|
|
19
|
+
roomName: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'Name of the target room',
|
|
22
|
+
pattern: '^[a-zA-Z0-9-_]+$'
|
|
23
|
+
},
|
|
24
|
+
message: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Message content (supports @mentions)',
|
|
27
|
+
minLength: 1,
|
|
28
|
+
maxLength: 1000
|
|
29
|
+
},
|
|
30
|
+
metadata: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
description: 'Optional metadata',
|
|
33
|
+
additionalProperties: true
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
required: ['agentName', 'roomName', 'message'],
|
|
37
|
+
additionalProperties: false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'agent_communication/get_messages',
|
|
42
|
+
description: 'Retrieve messages from a room with pagination and filtering',
|
|
43
|
+
inputSchema: {
|
|
44
|
+
type: 'object',
|
|
45
|
+
properties: {
|
|
46
|
+
roomName: {
|
|
47
|
+
type: 'string',
|
|
48
|
+
description: 'Name of the room',
|
|
49
|
+
pattern: '^[a-zA-Z0-9-_]+$'
|
|
50
|
+
},
|
|
51
|
+
agentName: {
|
|
52
|
+
type: 'string',
|
|
53
|
+
description: 'Agent name for mention filtering',
|
|
54
|
+
minLength: 1,
|
|
55
|
+
maxLength: 50
|
|
56
|
+
},
|
|
57
|
+
limit: {
|
|
58
|
+
type: 'number',
|
|
59
|
+
description: 'Maximum number of messages to retrieve',
|
|
60
|
+
minimum: 1,
|
|
61
|
+
maximum: 1000,
|
|
62
|
+
default: 50
|
|
63
|
+
},
|
|
64
|
+
offset: {
|
|
65
|
+
type: 'number',
|
|
66
|
+
description: 'Number of messages to skip',
|
|
67
|
+
minimum: 0,
|
|
68
|
+
default: 0
|
|
69
|
+
},
|
|
70
|
+
mentionsOnly: {
|
|
71
|
+
type: 'boolean',
|
|
72
|
+
description: 'Only retrieve messages that mention the specified agent',
|
|
73
|
+
default: false
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
required: ['roomName'],
|
|
77
|
+
additionalProperties: false
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
];
|
|
81
|
+
class MessagingToolHandlers {
|
|
82
|
+
messagingAPI;
|
|
83
|
+
constructor(dataDir, cacheCapacity) {
|
|
84
|
+
this.messagingAPI = new index_1.MessagingAPI(dataDir, cacheCapacity);
|
|
85
|
+
}
|
|
86
|
+
async handleSendMessage(args) {
|
|
87
|
+
try {
|
|
88
|
+
const params = MessageValidator_1.sendMessageSchema.parse(args);
|
|
89
|
+
const result = await this.messagingAPI.sendMessage(params);
|
|
90
|
+
return {
|
|
91
|
+
content: [
|
|
92
|
+
{
|
|
93
|
+
type: 'text',
|
|
94
|
+
text: JSON.stringify({
|
|
95
|
+
success: result.success,
|
|
96
|
+
messageId: result.messageId,
|
|
97
|
+
roomName: result.roomName,
|
|
98
|
+
timestamp: result.timestamp,
|
|
99
|
+
mentions: result.mentions
|
|
100
|
+
}, null, 2)
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
return {
|
|
107
|
+
content: [
|
|
108
|
+
{
|
|
109
|
+
type: 'text',
|
|
110
|
+
text: JSON.stringify({
|
|
111
|
+
error: true,
|
|
112
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
113
|
+
code: error instanceof Error && 'code' in error ? error.code : 'UNKNOWN_ERROR'
|
|
114
|
+
}, null, 2)
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
isError: true
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
async handleGetMessages(args) {
|
|
122
|
+
try {
|
|
123
|
+
const params = MessageValidator_1.getMessagesSchema.parse(args);
|
|
124
|
+
const result = await this.messagingAPI.getMessages(params);
|
|
125
|
+
return {
|
|
126
|
+
content: [
|
|
127
|
+
{
|
|
128
|
+
type: 'text',
|
|
129
|
+
text: JSON.stringify({
|
|
130
|
+
roomName: result.roomName,
|
|
131
|
+
messages: result.messages,
|
|
132
|
+
count: result.count,
|
|
133
|
+
hasMore: result.hasMore
|
|
134
|
+
}, null, 2)
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
return {
|
|
141
|
+
content: [
|
|
142
|
+
{
|
|
143
|
+
type: 'text',
|
|
144
|
+
text: JSON.stringify({
|
|
145
|
+
error: true,
|
|
146
|
+
message: error instanceof Error ? error.message : 'Unknown error',
|
|
147
|
+
code: error instanceof Error && 'code' in error ? error.code : 'UNKNOWN_ERROR'
|
|
148
|
+
}, null, 2)
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
isError: true
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
getHandlers() {
|
|
156
|
+
return {
|
|
157
|
+
'agent_communication/send_message': this.handleSendMessage.bind(this),
|
|
158
|
+
'agent_communication/get_messages': this.handleGetMessages.bind(this)
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
exports.MessagingToolHandlers = MessagingToolHandlers;
|
|
163
|
+
exports.messagingToolHandlers = new MessagingToolHandlers();
|
|
164
|
+
exports.sendMessageHandler = exports.messagingToolHandlers.handleSendMessage.bind(exports.messagingToolHandlers);
|
|
165
|
+
exports.getMessagesHandler = exports.messagingToolHandlers.handleGetMessages.bind(exports.messagingToolHandlers);
|
|
166
|
+
//# sourceMappingURL=messaging.tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messaging.tools.js","sourceRoot":"","sources":["../../../../src/features/messaging/tools/messaging.tools.ts"],"names":[],"mappings":";;;AACA,oCAAwC;AACxC,0DAA2E;AAG9D,QAAA,cAAc,GAAG;IAC5B;QACE,IAAI,EAAE,kCAAkC;QACxC,WAAW,EAAE,+CAA+C;QAC5D,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,2BAA2B;oBACxC,SAAS,EAAE,CAAC;oBACZ,SAAS,EAAE,EAAE;iBACd;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yBAAyB;oBACtC,OAAO,EAAE,kBAAkB;iBAC5B;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,sCAAsC;oBACnD,SAAS,EAAE,CAAC;oBACZ,SAAS,EAAE,IAAI;iBAChB;gBACD,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,mBAAmB;oBAChC,oBAAoB,EAAE,IA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