@aichatwar/shared 1.0.128 → 1.0.129
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/build/events/agentManagerEvents.d.ts +300 -0
- package/build/events/agentManagerEvents.js +2 -0
- package/build/events/kafka/baseListener.d.ts +1 -0
- package/build/events/subjects.d.ts +29 -1
- package/build/events/subjects.js +29 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { Subjects } from "./subjects";
|
|
2
|
+
import { BaseEvent } from "./baseEvent";
|
|
3
|
+
export interface RoomAgentInvitedEvent extends BaseEvent {
|
|
4
|
+
subject: Subjects.RoomAgentInvited;
|
|
5
|
+
data: {
|
|
6
|
+
roomId: string;
|
|
7
|
+
agentId: string;
|
|
8
|
+
invitedBy: string;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface AgentInviteRequestedEvent extends BaseEvent {
|
|
13
|
+
subject: Subjects.AgentInviteRequested;
|
|
14
|
+
data: {
|
|
15
|
+
agentId: string;
|
|
16
|
+
roomId: string;
|
|
17
|
+
requestedBy: string;
|
|
18
|
+
timestamp: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface SystemAgentSuggestedEvent extends BaseEvent {
|
|
22
|
+
subject: Subjects.SystemAgentSuggested;
|
|
23
|
+
data: {
|
|
24
|
+
agentId: string;
|
|
25
|
+
roomId: string;
|
|
26
|
+
reason: string;
|
|
27
|
+
timestamp: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface AgentInviteOwnerApprovedEvent extends BaseEvent {
|
|
31
|
+
subject: Subjects.AgentInviteOwnerApproved;
|
|
32
|
+
data: {
|
|
33
|
+
invitationId: string;
|
|
34
|
+
agentId: string;
|
|
35
|
+
ownerUserId: string;
|
|
36
|
+
roomId: string;
|
|
37
|
+
timestamp: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface AgentInviteOwnerDeclinedEvent extends BaseEvent {
|
|
41
|
+
subject: Subjects.AgentInviteOwnerDeclined;
|
|
42
|
+
data: {
|
|
43
|
+
invitationId: string;
|
|
44
|
+
agentId: string;
|
|
45
|
+
ownerUserId: string;
|
|
46
|
+
roomId: string;
|
|
47
|
+
reason?: string;
|
|
48
|
+
timestamp: string;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
export interface AgentJoinRequestEvent extends BaseEvent {
|
|
52
|
+
subject: Subjects.AgentJoinRequest;
|
|
53
|
+
data: {
|
|
54
|
+
agentId: string;
|
|
55
|
+
roomId: string;
|
|
56
|
+
timestamp: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface AgentLeaveRequestEvent extends BaseEvent {
|
|
60
|
+
subject: Subjects.AgentLeaveRequest;
|
|
61
|
+
data: {
|
|
62
|
+
agentId: string;
|
|
63
|
+
roomId: string;
|
|
64
|
+
reason?: string;
|
|
65
|
+
timestamp: string;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export interface AgentInviteOwnerApprovalRequiredEvent extends BaseEvent {
|
|
69
|
+
subject: Subjects.AgentInviteOwnerApprovalRequired;
|
|
70
|
+
data: {
|
|
71
|
+
invitationId: string;
|
|
72
|
+
agentId: string;
|
|
73
|
+
ownerUserId: string;
|
|
74
|
+
roomId: string;
|
|
75
|
+
invitedBy: string;
|
|
76
|
+
timestamp: string;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export interface AgentPresenceUpdatedEvent extends BaseEvent {
|
|
80
|
+
subject: Subjects.AgentPresenceUpdated;
|
|
81
|
+
data: {
|
|
82
|
+
agentId: string;
|
|
83
|
+
currentRooms: string[];
|
|
84
|
+
timestamp: string;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
export interface AgentFeedUpdatedEvent extends BaseEvent {
|
|
88
|
+
subject: Subjects.AgentFeedUpdated;
|
|
89
|
+
data: {
|
|
90
|
+
agentId: string;
|
|
91
|
+
newItemsCount: number;
|
|
92
|
+
timestamp: string;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
export interface NotificationCreatedEvent extends BaseEvent {
|
|
96
|
+
subject: Subjects.NotificationCreated;
|
|
97
|
+
data: {
|
|
98
|
+
userId: string;
|
|
99
|
+
agentId?: string;
|
|
100
|
+
type: string;
|
|
101
|
+
content: string;
|
|
102
|
+
timestamp: string;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
export interface AgentActivityPostSuggestedEvent extends BaseEvent {
|
|
106
|
+
subject: Subjects.AgentActivityPostSuggested;
|
|
107
|
+
data: {
|
|
108
|
+
id: string;
|
|
109
|
+
agentId: string;
|
|
110
|
+
ownerUserId: string;
|
|
111
|
+
suggestedContent: string;
|
|
112
|
+
confidence: number;
|
|
113
|
+
context: string;
|
|
114
|
+
timestamp: string;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export interface AgentActivityCommentSuggestedEvent extends BaseEvent {
|
|
118
|
+
subject: Subjects.AgentActivityCommentSuggested;
|
|
119
|
+
data: {
|
|
120
|
+
id: string;
|
|
121
|
+
agentId: string;
|
|
122
|
+
ownerUserId: string;
|
|
123
|
+
postId: string;
|
|
124
|
+
suggestedContent: string;
|
|
125
|
+
confidence: number;
|
|
126
|
+
context: string;
|
|
127
|
+
timestamp: string;
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export interface AgentActivityReactionSuggestedEvent extends BaseEvent {
|
|
131
|
+
subject: Subjects.AgentActivityReactionSuggested;
|
|
132
|
+
data: {
|
|
133
|
+
id: string;
|
|
134
|
+
agentId: string;
|
|
135
|
+
ownerUserId: string;
|
|
136
|
+
targetType: 'post' | 'comment';
|
|
137
|
+
targetId: string;
|
|
138
|
+
reactionType: 'like' | 'love' | 'haha' | 'sad' | 'angry';
|
|
139
|
+
confidence: number;
|
|
140
|
+
context: string;
|
|
141
|
+
timestamp: string;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
export interface AgentActivityFriendshipSuggestedEvent extends BaseEvent {
|
|
145
|
+
subject: Subjects.AgentActivityFriendshipSuggested;
|
|
146
|
+
data: {
|
|
147
|
+
id: string;
|
|
148
|
+
agentId: string;
|
|
149
|
+
ownerUserId: string;
|
|
150
|
+
targetUserId: string;
|
|
151
|
+
confidence: number;
|
|
152
|
+
context: string;
|
|
153
|
+
timestamp: string;
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
export interface AgentDraftCreatedEvent extends BaseEvent {
|
|
157
|
+
subject: Subjects.AgentDraftCreated;
|
|
158
|
+
data: {
|
|
159
|
+
draftId: string;
|
|
160
|
+
agentId: string;
|
|
161
|
+
ownerUserId: string;
|
|
162
|
+
type: 'post' | 'comment' | 'reaction';
|
|
163
|
+
timestamp: string;
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
export interface AgentDraftUpdatedEvent extends BaseEvent {
|
|
167
|
+
subject: Subjects.AgentDraftUpdated;
|
|
168
|
+
data: {
|
|
169
|
+
draftId: string;
|
|
170
|
+
agentId: string;
|
|
171
|
+
changes: Record<string, any>;
|
|
172
|
+
timestamp: string;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
export interface AgentDraftPostApprovedEvent extends BaseEvent {
|
|
176
|
+
subject: Subjects.AgentDraftPostApproved;
|
|
177
|
+
data: {
|
|
178
|
+
draftId: string;
|
|
179
|
+
agentId: string;
|
|
180
|
+
ownerUserId: string;
|
|
181
|
+
content: string;
|
|
182
|
+
mediaIds?: string[];
|
|
183
|
+
visibility: 'public' | 'friends' | 'private';
|
|
184
|
+
metadata?: {
|
|
185
|
+
originalDraftId: string;
|
|
186
|
+
approvedAt: string;
|
|
187
|
+
};
|
|
188
|
+
timestamp: string;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
export interface AgentDraftCommentApprovedEvent extends BaseEvent {
|
|
192
|
+
subject: Subjects.AgentDraftCommentApproved;
|
|
193
|
+
data: {
|
|
194
|
+
draftId: string;
|
|
195
|
+
agentId: string;
|
|
196
|
+
ownerUserId: string;
|
|
197
|
+
postId: string;
|
|
198
|
+
content: string;
|
|
199
|
+
metadata?: {
|
|
200
|
+
originalDraftId: string;
|
|
201
|
+
approvedAt: string;
|
|
202
|
+
};
|
|
203
|
+
timestamp: string;
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
export interface AgentDraftReactionApprovedEvent extends BaseEvent {
|
|
207
|
+
subject: Subjects.AgentDraftReactionApproved;
|
|
208
|
+
data: {
|
|
209
|
+
draftId: string;
|
|
210
|
+
agentId: string;
|
|
211
|
+
ownerUserId: string;
|
|
212
|
+
targetType: 'post' | 'comment';
|
|
213
|
+
targetId: string;
|
|
214
|
+
reactionType: 'like' | 'love' | 'haha' | 'sad' | 'angry';
|
|
215
|
+
metadata?: {
|
|
216
|
+
originalDraftId: string;
|
|
217
|
+
approvedAt: string;
|
|
218
|
+
};
|
|
219
|
+
timestamp: string;
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
export interface AgentDraftRejectedEvent extends BaseEvent {
|
|
223
|
+
subject: Subjects.AgentDraftRejected;
|
|
224
|
+
data: {
|
|
225
|
+
draftId: string;
|
|
226
|
+
agentId: string;
|
|
227
|
+
ownerUserId: string;
|
|
228
|
+
reason?: string;
|
|
229
|
+
timestamp: string;
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
export interface ModerationAgentSuspendedEvent extends BaseEvent {
|
|
233
|
+
subject: Subjects.ModerationAgentSuspended;
|
|
234
|
+
data: {
|
|
235
|
+
agentId: string;
|
|
236
|
+
duration: number;
|
|
237
|
+
reason: string;
|
|
238
|
+
appliedBy: string;
|
|
239
|
+
timestamp: string;
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
export interface ModerationAgentMutedEvent extends BaseEvent {
|
|
243
|
+
subject: Subjects.ModerationAgentMuted;
|
|
244
|
+
data: {
|
|
245
|
+
agentId: string;
|
|
246
|
+
duration: number;
|
|
247
|
+
reason: string;
|
|
248
|
+
appliedBy: string;
|
|
249
|
+
timestamp: string;
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
export interface ModerationAgentForceLeaveRoomEvent extends BaseEvent {
|
|
253
|
+
subject: Subjects.ModerationAgentForceLeaveRoom;
|
|
254
|
+
data: {
|
|
255
|
+
agentId: string;
|
|
256
|
+
roomId: string;
|
|
257
|
+
reason: string;
|
|
258
|
+
appliedBy: string;
|
|
259
|
+
timestamp: string;
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
export interface ModerationContentBlockedEvent extends BaseEvent {
|
|
263
|
+
subject: Subjects.ModerationContentBlocked;
|
|
264
|
+
data: {
|
|
265
|
+
agentId: string;
|
|
266
|
+
contentId: string;
|
|
267
|
+
contentType: 'post' | 'comment' | 'reaction' | 'draft';
|
|
268
|
+
reason: string;
|
|
269
|
+
appliedBy: string;
|
|
270
|
+
timestamp: string;
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
export interface AgentSafetyStateUpdatedEvent extends BaseEvent {
|
|
274
|
+
subject: Subjects.AgentSafetyStateUpdated;
|
|
275
|
+
data: {
|
|
276
|
+
agentId: string;
|
|
277
|
+
isSuspended: boolean;
|
|
278
|
+
isMuted: boolean;
|
|
279
|
+
restrictedCapabilities: string[];
|
|
280
|
+
timestamp: string;
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
export interface AgentRemovedFromRoomEvent extends BaseEvent {
|
|
284
|
+
subject: Subjects.AgentRemovedFromRoom;
|
|
285
|
+
data: {
|
|
286
|
+
agentId: string;
|
|
287
|
+
roomId: string;
|
|
288
|
+
reason: string;
|
|
289
|
+
timestamp: string;
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
export interface AgentCapabilityRestrictedEvent extends BaseEvent {
|
|
293
|
+
subject: Subjects.AgentCapabilityRestricted;
|
|
294
|
+
data: {
|
|
295
|
+
agentId: string;
|
|
296
|
+
capabilities: string[];
|
|
297
|
+
duration?: number;
|
|
298
|
+
timestamp: string;
|
|
299
|
+
};
|
|
300
|
+
}
|
|
@@ -56,5 +56,33 @@ export declare enum Subjects {
|
|
|
56
56
|
AgentLearningUpdated = "agent.learning.updated",
|
|
57
57
|
TrainingDatasetReady = "training.dataset.ready",
|
|
58
58
|
ModelUpdated = "model.updated",
|
|
59
|
-
SessionEnded = "session.ended"
|
|
59
|
+
SessionEnded = "session.ended",
|
|
60
|
+
RoomAgentInvited = "room.agent.invited",
|
|
61
|
+
AgentInviteRequested = "agent.invite.requested",
|
|
62
|
+
SystemAgentSuggested = "system.agent.suggested",
|
|
63
|
+
AgentInviteOwnerApproved = "agent.invite.ownerApproved",
|
|
64
|
+
AgentInviteOwnerDeclined = "agent.invite.ownerDeclined",
|
|
65
|
+
AgentJoinRequest = "agent.join.request",
|
|
66
|
+
AgentLeaveRequest = "agent.leave.request",
|
|
67
|
+
AgentInviteOwnerApprovalRequired = "agent.invite.ownerApprovalRequired",
|
|
68
|
+
AgentPresenceUpdated = "agent.presence.updated",
|
|
69
|
+
AgentFeedUpdated = "agent.feed.updated",
|
|
70
|
+
NotificationCreated = "notification.created",
|
|
71
|
+
AgentActivityPostSuggested = "agent.activity.postSuggested",
|
|
72
|
+
AgentActivityCommentSuggested = "agent.activity.commentSuggested",
|
|
73
|
+
AgentActivityReactionSuggested = "agent.activity.reactionSuggested",
|
|
74
|
+
AgentActivityFriendshipSuggested = "agent.activity.friendshipSuggested",
|
|
75
|
+
AgentDraftCreated = "agent.draft.created",
|
|
76
|
+
AgentDraftUpdated = "agent.draft.updated",
|
|
77
|
+
ModerationAgentSuspended = "moderation.agent.suspended",
|
|
78
|
+
ModerationAgentMuted = "moderation.agent.muted",
|
|
79
|
+
ModerationAgentForceLeaveRoom = "moderation.agent.forceLeaveRoom",
|
|
80
|
+
ModerationContentBlocked = "moderation.content.blocked",
|
|
81
|
+
AgentSafetyStateUpdated = "agent.safety.state.updated",
|
|
82
|
+
AgentRemovedFromRoom = "agent.removed.from.room",
|
|
83
|
+
AgentCapabilityRestricted = "agent.capability.restricted",
|
|
84
|
+
AgentDraftPostApproved = "agent.draft.post.approved",
|
|
85
|
+
AgentDraftCommentApproved = "agent.draft.comment.approved",
|
|
86
|
+
AgentDraftReactionApproved = "agent.draft.reaction.approved",
|
|
87
|
+
AgentDraftRejected = "agent.draft.rejected"
|
|
60
88
|
}
|
package/build/events/subjects.js
CHANGED
|
@@ -61,4 +61,33 @@ var Subjects;
|
|
|
61
61
|
Subjects["TrainingDatasetReady"] = "training.dataset.ready";
|
|
62
62
|
Subjects["ModelUpdated"] = "model.updated";
|
|
63
63
|
Subjects["SessionEnded"] = "session.ended";
|
|
64
|
+
// Agent Manager Events
|
|
65
|
+
Subjects["RoomAgentInvited"] = "room.agent.invited";
|
|
66
|
+
Subjects["AgentInviteRequested"] = "agent.invite.requested";
|
|
67
|
+
Subjects["SystemAgentSuggested"] = "system.agent.suggested";
|
|
68
|
+
Subjects["AgentInviteOwnerApproved"] = "agent.invite.ownerApproved";
|
|
69
|
+
Subjects["AgentInviteOwnerDeclined"] = "agent.invite.ownerDeclined";
|
|
70
|
+
Subjects["AgentJoinRequest"] = "agent.join.request";
|
|
71
|
+
Subjects["AgentLeaveRequest"] = "agent.leave.request";
|
|
72
|
+
Subjects["AgentInviteOwnerApprovalRequired"] = "agent.invite.ownerApprovalRequired";
|
|
73
|
+
Subjects["AgentPresenceUpdated"] = "agent.presence.updated";
|
|
74
|
+
Subjects["AgentFeedUpdated"] = "agent.feed.updated";
|
|
75
|
+
Subjects["NotificationCreated"] = "notification.created";
|
|
76
|
+
Subjects["AgentActivityPostSuggested"] = "agent.activity.postSuggested";
|
|
77
|
+
Subjects["AgentActivityCommentSuggested"] = "agent.activity.commentSuggested";
|
|
78
|
+
Subjects["AgentActivityReactionSuggested"] = "agent.activity.reactionSuggested";
|
|
79
|
+
Subjects["AgentActivityFriendshipSuggested"] = "agent.activity.friendshipSuggested";
|
|
80
|
+
Subjects["AgentDraftCreated"] = "agent.draft.created";
|
|
81
|
+
Subjects["AgentDraftUpdated"] = "agent.draft.updated";
|
|
82
|
+
Subjects["ModerationAgentSuspended"] = "moderation.agent.suspended";
|
|
83
|
+
Subjects["ModerationAgentMuted"] = "moderation.agent.muted";
|
|
84
|
+
Subjects["ModerationAgentForceLeaveRoom"] = "moderation.agent.forceLeaveRoom";
|
|
85
|
+
Subjects["ModerationContentBlocked"] = "moderation.content.blocked";
|
|
86
|
+
Subjects["AgentSafetyStateUpdated"] = "agent.safety.state.updated";
|
|
87
|
+
Subjects["AgentRemovedFromRoom"] = "agent.removed.from.room";
|
|
88
|
+
Subjects["AgentCapabilityRestricted"] = "agent.capability.restricted";
|
|
89
|
+
Subjects["AgentDraftPostApproved"] = "agent.draft.post.approved";
|
|
90
|
+
Subjects["AgentDraftCommentApproved"] = "agent.draft.comment.approved";
|
|
91
|
+
Subjects["AgentDraftReactionApproved"] = "agent.draft.reaction.approved";
|
|
92
|
+
Subjects["AgentDraftRejected"] = "agent.draft.rejected";
|
|
64
93
|
})(Subjects || (exports.Subjects = Subjects = {}));
|
package/build/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from "./events/nats/baseListener";
|
|
|
12
12
|
export * from "./events/nats/basePublisher";
|
|
13
13
|
export * from "./events/kafka/baseListener";
|
|
14
14
|
export * from "./events/kafka/basePublisher";
|
|
15
|
+
export type { EachMessagePayload } from "./events/kafka/baseListener";
|
|
15
16
|
export * from "./events/ecommerceEvents";
|
|
16
17
|
export * from "./events/subjects";
|
|
17
18
|
export * from "./events/profileEvents";
|
|
@@ -33,3 +34,4 @@ export * from "./events/types/visibility";
|
|
|
33
34
|
export * from "./events/types/postStatus";
|
|
34
35
|
export * from "./events/userEvents";
|
|
35
36
|
export * from "./events/mediaEvents";
|
|
37
|
+
export * from "./events/agentManagerEvents";
|
package/build/index.js
CHANGED
|
@@ -49,3 +49,4 @@ __exportStar(require("./events/types/visibility"), exports);
|
|
|
49
49
|
__exportStar(require("./events/types/postStatus"), exports);
|
|
50
50
|
__exportStar(require("./events/userEvents"), exports);
|
|
51
51
|
__exportStar(require("./events/mediaEvents"), exports);
|
|
52
|
+
__exportStar(require("./events/agentManagerEvents"), exports);
|