@principal-ai/control-tower-core 0.4.0 → 0.4.1
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/abstractions/DefaultPresenceManager.d.ts +40 -0
- package/dist/abstractions/DefaultPresenceManager.d.ts.map +1 -1
- package/dist/abstractions/DefaultPresenceManager.js +166 -0
- package/dist/abstractions/PresenceExtension.d.ts +62 -0
- package/dist/abstractions/PresenceExtension.d.ts.map +1 -1
- package/dist/abstractions/PresenceExtension.js +1 -0
- package/dist/abstractions/index.d.ts +1 -1
- package/dist/abstractions/index.d.ts.map +1 -1
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +123 -1
- package/dist/index.mjs.map +3 -3
- package/dist/types/presence.d.ts +4 -2
- package/dist/types/presence.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* backed by Redis or another shared data store.
|
|
9
9
|
*/
|
|
10
10
|
import type { BaseServer } from "../server/BaseServer.js";
|
|
11
|
+
import type { Message } from "../types/index.js";
|
|
11
12
|
import type { ActivityUpdate, DeviceInfo, PresenceChangeEvent, PresenceConfig, PresenceStatus, UserPresence } from "../types/presence.js";
|
|
12
13
|
import type { ExtendedUserPresence, PresenceExtension } from "./PresenceExtension.js";
|
|
13
14
|
import { PresenceManager } from "./PresenceManager.js";
|
|
@@ -59,5 +60,44 @@ export declare class DefaultPresenceManager<TExtendedData = Record<string, unkno
|
|
|
59
60
|
* Get total unique user count
|
|
60
61
|
*/
|
|
61
62
|
getUniqueUserCount(): number;
|
|
63
|
+
/**
|
|
64
|
+
* Convert UserPresence to SerializableUserPresence
|
|
65
|
+
* Converts the devices Map to a plain object for JSON serialization
|
|
66
|
+
*/
|
|
67
|
+
private serializePresence;
|
|
68
|
+
/**
|
|
69
|
+
* Handle presence WebSocket messages
|
|
70
|
+
*
|
|
71
|
+
* This method handles core presence messages and delegates to extensions
|
|
72
|
+
* for extension-specific messages. Use this with CustomMessageHandler.
|
|
73
|
+
*
|
|
74
|
+
* @param userId - Authenticated user ID
|
|
75
|
+
* @param deviceId - Device/client ID
|
|
76
|
+
* @param message - The WebSocket message
|
|
77
|
+
* @param sendResponse - Callback to send response
|
|
78
|
+
* @returns true if the message was handled, false otherwise
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* const server = new ServerBuilder()
|
|
83
|
+
* .withPresenceManager(presenceManager)
|
|
84
|
+
* .withCustomMessageHandler(async (clientId, message, sendResponse) => {
|
|
85
|
+
* const client = server.getClient(clientId);
|
|
86
|
+
* if (!client?.authenticated || !client.userId) return false;
|
|
87
|
+
* const deviceId = getDeviceIdForClient(clientId);
|
|
88
|
+
* return presenceManager.handlePresenceMessage(
|
|
89
|
+
* client.userId,
|
|
90
|
+
* deviceId,
|
|
91
|
+
* message,
|
|
92
|
+
* sendResponse
|
|
93
|
+
* );
|
|
94
|
+
* })
|
|
95
|
+
* .build();
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
handlePresenceMessage(userId: string, deviceId: string, message: Message, sendResponse: (response: {
|
|
99
|
+
type: string;
|
|
100
|
+
payload: unknown;
|
|
101
|
+
}) => Promise<void>): Promise<boolean>;
|
|
62
102
|
}
|
|
63
103
|
//# sourceMappingURL=DefaultPresenceManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultPresenceManager.d.ts","sourceRoot":"","sources":["../../src/abstractions/DefaultPresenceManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EACX,cAAc,EACd,UAAU,
|
|
1
|
+
{"version":3,"file":"DefaultPresenceManager.d.ts","sourceRoot":"","sources":["../../src/abstractions/DefaultPresenceManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,UAAU,EA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OAAO,CAAC,oBAAoB,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IAyBhD,gBAAgB,CACrB,OAAO,EAAE,MAAM,EAAE,GACf,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAa/B,cAAc,IAAI,OAAO,CAAC,oBAAoB,CAAC,aAAa,CAAC,EAAE,CAAC;IA4BhE,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IASrD,aAAa,CAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,cAAc,GACpB,OAAO,CAAC,YAAY,CAAC;IAUlB,iBAAiB,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;IA4EnD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAS5B;;OAEG;IACH,mBAAmB,IAAI,MAAM;IAI7B;;OAEG;IACH,uBAAuB,IAAI,MAAM;IAIjC;;OAEG;IACH,kBAAkB,IAAI,MAAM;IAI5B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAUzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,qBAAqB,CAC1B,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,CAAC,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAC3E,OAAO,CAAC,OAAO,CAAC;CA2JnB"}
|
|
@@ -393,5 +393,171 @@ class DefaultPresenceManager extends PresenceManager_js_1.PresenceManager {
|
|
|
393
393
|
getUniqueUserCount() {
|
|
394
394
|
return this.userPresences.size + this.gracePeriodEntries.size;
|
|
395
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* Convert UserPresence to SerializableUserPresence
|
|
398
|
+
* Converts the devices Map to a plain object for JSON serialization
|
|
399
|
+
*/
|
|
400
|
+
serializePresence(presence) {
|
|
401
|
+
const { devices, extended, ...rest } = presence;
|
|
402
|
+
return {
|
|
403
|
+
...rest,
|
|
404
|
+
devices: Object.fromEntries(devices),
|
|
405
|
+
// Spread extended data at top level for compatibility
|
|
406
|
+
...(extended || {}),
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Handle presence WebSocket messages
|
|
411
|
+
*
|
|
412
|
+
* This method handles core presence messages and delegates to extensions
|
|
413
|
+
* for extension-specific messages. Use this with CustomMessageHandler.
|
|
414
|
+
*
|
|
415
|
+
* @param userId - Authenticated user ID
|
|
416
|
+
* @param deviceId - Device/client ID
|
|
417
|
+
* @param message - The WebSocket message
|
|
418
|
+
* @param sendResponse - Callback to send response
|
|
419
|
+
* @returns true if the message was handled, false otherwise
|
|
420
|
+
*
|
|
421
|
+
* @example
|
|
422
|
+
* ```typescript
|
|
423
|
+
* const server = new ServerBuilder()
|
|
424
|
+
* .withPresenceManager(presenceManager)
|
|
425
|
+
* .withCustomMessageHandler(async (clientId, message, sendResponse) => {
|
|
426
|
+
* const client = server.getClient(clientId);
|
|
427
|
+
* if (!client?.authenticated || !client.userId) return false;
|
|
428
|
+
* const deviceId = getDeviceIdForClient(clientId);
|
|
429
|
+
* return presenceManager.handlePresenceMessage(
|
|
430
|
+
* client.userId,
|
|
431
|
+
* deviceId,
|
|
432
|
+
* message,
|
|
433
|
+
* sendResponse
|
|
434
|
+
* );
|
|
435
|
+
* })
|
|
436
|
+
* .build();
|
|
437
|
+
* ```
|
|
438
|
+
*/
|
|
439
|
+
async handlePresenceMessage(userId, deviceId, message, sendResponse) {
|
|
440
|
+
switch (message.type) {
|
|
441
|
+
case "presence:get_users": {
|
|
442
|
+
const onlineUsers = await this.getOnlineUsers();
|
|
443
|
+
const users = onlineUsers.map((u) => this.serializePresence(u));
|
|
444
|
+
const response = {
|
|
445
|
+
users,
|
|
446
|
+
stats: {
|
|
447
|
+
totalOnline: users.length,
|
|
448
|
+
},
|
|
449
|
+
};
|
|
450
|
+
await sendResponse({ type: "presence:get_users", payload: response });
|
|
451
|
+
return true;
|
|
452
|
+
}
|
|
453
|
+
case "presence:get_user": {
|
|
454
|
+
const { userId: targetUserId } = message.payload;
|
|
455
|
+
const userPresence = await this.getUserPresence(targetUserId);
|
|
456
|
+
const response = {
|
|
457
|
+
user: userPresence ? this.serializePresence(userPresence) : null,
|
|
458
|
+
};
|
|
459
|
+
await sendResponse({ type: "presence:get_user", payload: response });
|
|
460
|
+
return true;
|
|
461
|
+
}
|
|
462
|
+
case "presence:set_status": {
|
|
463
|
+
const { status, statusMessage } = message.payload;
|
|
464
|
+
await this.setUserStatus(userId, status);
|
|
465
|
+
// Broadcast status change
|
|
466
|
+
if (this.config.broadcastPresenceUpdates && this.server) {
|
|
467
|
+
const experimental = this.server.experimental;
|
|
468
|
+
await experimental?.broadcastAuthenticated({
|
|
469
|
+
type: "presence:status_changed",
|
|
470
|
+
payload: { userId, status, statusMessage },
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
const response = { success: true };
|
|
474
|
+
await sendResponse({ type: "presence:set_status", payload: response });
|
|
475
|
+
return true;
|
|
476
|
+
}
|
|
477
|
+
case "presence:set_visibility": {
|
|
478
|
+
const { visible } = message.payload;
|
|
479
|
+
// Visibility is handled by extensions
|
|
480
|
+
// Find an extension that can handle visibility
|
|
481
|
+
for (const ext of this.extensions) {
|
|
482
|
+
if (typeof ext.setVisibility === "function") {
|
|
483
|
+
ext.setVisibility(userId, visible);
|
|
484
|
+
break;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
const response = { success: true };
|
|
488
|
+
await sendResponse({ type: "presence:set_visibility", payload: response });
|
|
489
|
+
return true;
|
|
490
|
+
}
|
|
491
|
+
case "presence:repo_status_update": {
|
|
492
|
+
const { repoId, gitStatus } = message.payload;
|
|
493
|
+
// Find extension that can handle git status update
|
|
494
|
+
let updated = false;
|
|
495
|
+
for (const ext of this.extensions) {
|
|
496
|
+
if (typeof ext.updateRepositoryGitStatus === "function") {
|
|
497
|
+
updated = ext.updateRepositoryGitStatus(userId, repoId, deviceId, gitStatus);
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
if (!updated) {
|
|
502
|
+
const response = {
|
|
503
|
+
success: false,
|
|
504
|
+
message: "Repository session not found",
|
|
505
|
+
};
|
|
506
|
+
await sendResponse({ type: "presence:repo_status_update", payload: response });
|
|
507
|
+
return true;
|
|
508
|
+
}
|
|
509
|
+
// Broadcast status change
|
|
510
|
+
if (this.config.broadcastPresenceUpdates && this.server) {
|
|
511
|
+
// Check visibility
|
|
512
|
+
let visible = true;
|
|
513
|
+
for (const ext of this.extensions) {
|
|
514
|
+
const shouldShow = await ext.shouldBeVisible?.(userId);
|
|
515
|
+
if (shouldShow === false) {
|
|
516
|
+
visible = false;
|
|
517
|
+
break;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
if (visible) {
|
|
521
|
+
const experimental = this.server.experimental;
|
|
522
|
+
await experimental?.broadcastAuthenticated({
|
|
523
|
+
type: "presence:repo_status_changed",
|
|
524
|
+
payload: { userId, repoId, deviceId, gitStatus },
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
const response = {
|
|
529
|
+
success: true,
|
|
530
|
+
message: "Status updated",
|
|
531
|
+
};
|
|
532
|
+
await sendResponse({ type: "presence:repo_status_update", payload: response });
|
|
533
|
+
return true;
|
|
534
|
+
}
|
|
535
|
+
default: {
|
|
536
|
+
// Try extension handlers
|
|
537
|
+
for (const ext of this.extensions) {
|
|
538
|
+
if (ext.handleMessage) {
|
|
539
|
+
const result = await ext.handleMessage(userId, deviceId, message.type, message.payload);
|
|
540
|
+
if (result) {
|
|
541
|
+
// Send response
|
|
542
|
+
await sendResponse({
|
|
543
|
+
type: message.type,
|
|
544
|
+
payload: result.response,
|
|
545
|
+
});
|
|
546
|
+
// Handle broadcast if specified
|
|
547
|
+
if (result.broadcast && this.server) {
|
|
548
|
+
const experimental = this.server.experimental;
|
|
549
|
+
await experimental?.broadcastAuthenticated({
|
|
550
|
+
type: result.broadcast.type,
|
|
551
|
+
payload: result.broadcast.payload,
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
return true;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
return false; // Message not handled
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
396
562
|
}
|
|
397
563
|
exports.DefaultPresenceManager = DefaultPresenceManager;
|
|
@@ -9,8 +9,31 @@
|
|
|
9
9
|
* - Control visibility of users
|
|
10
10
|
* - React to room joins/leaves
|
|
11
11
|
* - Track application-specific presence state
|
|
12
|
+
* - Handle custom WebSocket messages
|
|
12
13
|
*/
|
|
13
14
|
import type { UserPresence } from "../types/presence.js";
|
|
15
|
+
/**
|
|
16
|
+
* Result from handling a presence message
|
|
17
|
+
*/
|
|
18
|
+
export interface PresenceMessageHandlerResult {
|
|
19
|
+
/**
|
|
20
|
+
* Response payload to send back to the client
|
|
21
|
+
*/
|
|
22
|
+
response: unknown;
|
|
23
|
+
/**
|
|
24
|
+
* Optional broadcast payload to send to other clients
|
|
25
|
+
* If provided, will be broadcast to all authenticated clients
|
|
26
|
+
*/
|
|
27
|
+
broadcast?: {
|
|
28
|
+
type: string;
|
|
29
|
+
payload: unknown;
|
|
30
|
+
/**
|
|
31
|
+
* If true, exclude the sender from the broadcast
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
excludeSender?: boolean;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
14
37
|
/**
|
|
15
38
|
* Extension for adding custom presence data and behavior
|
|
16
39
|
*
|
|
@@ -106,6 +129,45 @@ export interface PresenceExtension<TExtendedData = Record<string, unknown>> {
|
|
|
106
129
|
* Use this for cleanup tasks like persisting state.
|
|
107
130
|
*/
|
|
108
131
|
destroy?(): Promise<void> | void;
|
|
132
|
+
/**
|
|
133
|
+
* Lifecycle: Called when presence state should be cleaned up for a user
|
|
134
|
+
*
|
|
135
|
+
* Use this for cleaning up user-specific state when they go fully offline.
|
|
136
|
+
*
|
|
137
|
+
* @param userId - User identifier
|
|
138
|
+
*/
|
|
139
|
+
onPresenceCleanup?(userId: string): Promise<void> | void;
|
|
140
|
+
/**
|
|
141
|
+
* Handle extension-specific WebSocket messages
|
|
142
|
+
*
|
|
143
|
+
* Return a result if the message was handled, undefined if not.
|
|
144
|
+
* The presence manager will send the response and handle any broadcasts.
|
|
145
|
+
*
|
|
146
|
+
* @param userId - User identifier
|
|
147
|
+
* @param deviceId - Device/client identifier
|
|
148
|
+
* @param messageType - The message type (e.g., 'presence:repo_status_update')
|
|
149
|
+
* @param payload - The message payload
|
|
150
|
+
* @returns Handler result with response and optional broadcast, or undefined if not handled
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```typescript
|
|
154
|
+
* async handleMessage(userId, deviceId, type, payload) {
|
|
155
|
+
* if (type === 'presence:repo_status_update') {
|
|
156
|
+
* const { repoId, gitStatus } = payload;
|
|
157
|
+
* this.updateGitStatus(userId, repoId, deviceId, gitStatus);
|
|
158
|
+
* return {
|
|
159
|
+
* response: { success: true, message: 'Status updated' },
|
|
160
|
+
* broadcast: {
|
|
161
|
+
* type: 'presence:repo_status_changed',
|
|
162
|
+
* payload: { userId, repoId, deviceId, gitStatus }
|
|
163
|
+
* }
|
|
164
|
+
* };
|
|
165
|
+
* }
|
|
166
|
+
* return undefined;
|
|
167
|
+
* }
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
handleMessage?(userId: string, deviceId: string, messageType: string, payload: unknown): Promise<PresenceMessageHandlerResult | undefined> | PresenceMessageHandlerResult | undefined;
|
|
109
171
|
}
|
|
110
172
|
/**
|
|
111
173
|
* Extended user presence with custom data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PresenceExtension.d.ts","sourceRoot":"","sources":["../../src/abstractions/PresenceExtension.ts"],"names":[],"m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a,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAC5E,SAAQ,YAAY;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;CACzB"}
|
|
@@ -5,7 +5,7 @@ export { DefaultPresenceManager } from "./DefaultPresenceManager.js";
|
|
|
5
5
|
export { DefaultRoomManager } from "./DefaultRoomManager.js";
|
|
6
6
|
export { EventListener, TypedEventEmitter, UnsubscribeFn, } from "./EventEmitter.js";
|
|
7
7
|
export { LockManager } from "./LockManager.js";
|
|
8
|
-
export { type ExtendedUserPresence, type PresenceExtension, } from "./PresenceExtension.js";
|
|
8
|
+
export { type ExtendedUserPresence, type PresenceExtension, type PresenceMessageHandlerResult, } from "./PresenceExtension.js";
|
|
9
9
|
export { PresenceManager } from "./PresenceManager.js";
|
|
10
10
|
export { RoomManager } from "./RoomManager.js";
|
|
11
11
|
export { IStorageAdapter, StorageOperation } from "./StorageAdapter.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/abstractions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACN,aAAa,EACb,iBAAiB,EACjB,aAAa,GACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACN,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/abstractions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY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