@iveri/contracts 0.15.0 → 0.16.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/README.md +6 -0
- package/dist/cjs/api/unibox/index.d.ts +2 -0
- package/dist/cjs/api/unibox/index.d.ts.map +1 -1
- package/dist/cjs/api/unibox/index.js +2 -0
- package/dist/cjs/api/unibox/index.js.map +1 -1
- package/dist/cjs/api/unibox/realtime-event.enum.d.ts +24 -0
- package/dist/cjs/api/unibox/realtime-event.enum.d.ts.map +1 -0
- package/dist/cjs/api/unibox/realtime-event.enum.js +28 -0
- package/dist/cjs/api/unibox/realtime-event.enum.js.map +1 -0
- package/dist/cjs/api/unibox/realtime.type.d.ts +83 -0
- package/dist/cjs/api/unibox/realtime.type.d.ts.map +1 -0
- package/dist/cjs/api/unibox/realtime.type.js +23 -0
- package/dist/cjs/api/unibox/realtime.type.js.map +1 -0
- package/dist/cjs/enum/user-permission.enum.d.ts +13 -0
- package/dist/cjs/enum/user-permission.enum.d.ts.map +1 -1
- package/dist/cjs/enum/user-permission.enum.js +14 -0
- package/dist/cjs/enum/user-permission.enum.js.map +1 -1
- package/dist/esm/api/unibox/index.d.ts +2 -0
- package/dist/esm/api/unibox/index.d.ts.map +1 -1
- package/dist/esm/api/unibox/index.js +2 -0
- package/dist/esm/api/unibox/index.js.map +1 -1
- package/dist/esm/api/unibox/realtime-event.enum.d.ts +24 -0
- package/dist/esm/api/unibox/realtime-event.enum.d.ts.map +1 -0
- package/dist/esm/api/unibox/realtime-event.enum.js +25 -0
- package/dist/esm/api/unibox/realtime-event.enum.js.map +1 -0
- package/dist/esm/api/unibox/realtime.type.d.ts +83 -0
- package/dist/esm/api/unibox/realtime.type.d.ts.map +1 -0
- package/dist/esm/api/unibox/realtime.type.js +20 -0
- package/dist/esm/api/unibox/realtime.type.js.map +1 -0
- package/dist/esm/enum/user-permission.enum.d.ts +13 -0
- package/dist/esm/enum/user-permission.enum.d.ts.map +1 -1
- package/dist/esm/enum/user-permission.enum.js +14 -0
- package/dist/esm/enum/user-permission.enum.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
The wire contract every Iveri service and frontend compiles against: shared types and plain
|
|
4
4
|
enums, and nothing else.
|
|
5
5
|
|
|
6
|
+
Release `0.16.0` adds the Unibox realtime contract under `@iveri/contracts/unibox` —
|
|
7
|
+
`RealtimeConversationEvent`, the publish body, the socket message shapes and the event-name
|
|
8
|
+
constants — plus the `unibox:realtime:publish` permission. It is shared by three repos at once
|
|
9
|
+
(`unibox-api` publishes, `unibox-realtime` fans out, `unibox-web` subscribes), which is exactly
|
|
10
|
+
the case a hand-copied interface drifts on.
|
|
11
|
+
|
|
6
12
|
```bash
|
|
7
13
|
pnpm add @iveri/contracts
|
|
8
14
|
```
|
|
@@ -9,5 +9,7 @@ export * from './message-content-type.enum.js';
|
|
|
9
9
|
export * from './message-direction.enum.js';
|
|
10
10
|
export * from './message-status.enum.js';
|
|
11
11
|
export * from './message.type.js';
|
|
12
|
+
export * from './realtime-event.enum.js';
|
|
13
|
+
export * from './realtime.type.js';
|
|
12
14
|
export * from './team.type.js';
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/unibox/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/unibox/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
|
|
@@ -25,5 +25,7 @@ __exportStar(require("./message-content-type.enum.js"), exports);
|
|
|
25
25
|
__exportStar(require("./message-direction.enum.js"), exports);
|
|
26
26
|
__exportStar(require("./message-status.enum.js"), exports);
|
|
27
27
|
__exportStar(require("./message.type.js"), exports);
|
|
28
|
+
__exportStar(require("./realtime-event.enum.js"), exports);
|
|
29
|
+
__exportStar(require("./realtime.type.js"), exports);
|
|
28
30
|
__exportStar(require("./team.type.js"), exports);
|
|
29
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/unibox/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,6DAA2C;AAC3C,oDAAkC;AAClC,oDAAkC;AAClC,gEAA8C;AAC9C,yDAAuC;AACvC,gEAA8C;AAC9C,iEAA+C;AAC/C,8DAA4C;AAC5C,2DAAyC;AACzC,oDAAkC;AAClC,iDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/unibox/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,6DAA2C;AAC3C,oDAAkC;AAClC,oDAAkC;AAClC,gEAA8C;AAC9C,yDAAuC;AACvC,gEAA8C;AAC9C,iEAA+C;AAC/C,8DAA4C;AAC5C,2DAAyC;AACzC,oDAAkC;AAClC,2DAAyC;AACzC,qDAAmC;AACnC,iDAA+B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What happened to a conversation, as told to a live subscriber.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately a small closed set rather than a free-form string. A subscriber decides what to
|
|
5
|
+
* refetch from the event name, so an unrecognised one means either doing nothing — a live inbox
|
|
6
|
+
* that silently stops updating — or refetching everything, which is a stampede triggered by
|
|
7
|
+
* whatever a publisher felt like sending.
|
|
8
|
+
*
|
|
9
|
+
* **These are notifications, not state.** The payload carries identifiers, never the message
|
|
10
|
+
* body or the contact's details: an event is a prompt to read from `unibox-api`, which is the
|
|
11
|
+
* only thing that can answer for what the reader is allowed to see. That also keeps a missed
|
|
12
|
+
* event harmless — the next read is correct regardless.
|
|
13
|
+
*/
|
|
14
|
+
export declare enum RealtimeConversationEvent {
|
|
15
|
+
/** A message was appended. The reader refetches the conversation's messages. */
|
|
16
|
+
MESSAGE_CREATED = "message.created",
|
|
17
|
+
/** A message's delivery status moved — sent, delivered, read, failed. */
|
|
18
|
+
MESSAGE_STATUS_CHANGED = "message.status-changed",
|
|
19
|
+
/** Status, unread count, or another conversation-level field changed. */
|
|
20
|
+
CONVERSATION_UPDATED = "conversation.updated",
|
|
21
|
+
/** The conversation moved to another agent or team, or a human took over from the AI. */
|
|
22
|
+
CONVERSATION_ASSIGNED = "conversation.assigned"
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=realtime-event.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime-event.enum.d.ts","sourceRoot":"","sources":["../../../../src/api/unibox/realtime-event.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,oBAAY,yBAAyB;IACjC,gFAAgF;IAChF,eAAe,oBAAoB;IACnC,yEAAyE;IACzE,sBAAsB,2BAA2B;IACjD,yEAAyE;IACzE,oBAAoB,yBAAyB;IAC7C,yFAAyF;IACzF,qBAAqB,0BAA0B;CAClD"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RealtimeConversationEvent = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* What happened to a conversation, as told to a live subscriber.
|
|
6
|
+
*
|
|
7
|
+
* Deliberately a small closed set rather than a free-form string. A subscriber decides what to
|
|
8
|
+
* refetch from the event name, so an unrecognised one means either doing nothing — a live inbox
|
|
9
|
+
* that silently stops updating — or refetching everything, which is a stampede triggered by
|
|
10
|
+
* whatever a publisher felt like sending.
|
|
11
|
+
*
|
|
12
|
+
* **These are notifications, not state.** The payload carries identifiers, never the message
|
|
13
|
+
* body or the contact's details: an event is a prompt to read from `unibox-api`, which is the
|
|
14
|
+
* only thing that can answer for what the reader is allowed to see. That also keeps a missed
|
|
15
|
+
* event harmless — the next read is correct regardless.
|
|
16
|
+
*/
|
|
17
|
+
var RealtimeConversationEvent;
|
|
18
|
+
(function (RealtimeConversationEvent) {
|
|
19
|
+
/** A message was appended. The reader refetches the conversation's messages. */
|
|
20
|
+
RealtimeConversationEvent["MESSAGE_CREATED"] = "message.created";
|
|
21
|
+
/** A message's delivery status moved — sent, delivered, read, failed. */
|
|
22
|
+
RealtimeConversationEvent["MESSAGE_STATUS_CHANGED"] = "message.status-changed";
|
|
23
|
+
/** Status, unread count, or another conversation-level field changed. */
|
|
24
|
+
RealtimeConversationEvent["CONVERSATION_UPDATED"] = "conversation.updated";
|
|
25
|
+
/** The conversation moved to another agent or team, or a human took over from the AI. */
|
|
26
|
+
RealtimeConversationEvent["CONVERSATION_ASSIGNED"] = "conversation.assigned";
|
|
27
|
+
})(RealtimeConversationEvent || (exports.RealtimeConversationEvent = RealtimeConversationEvent = {}));
|
|
28
|
+
//# sourceMappingURL=realtime-event.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime-event.enum.js","sourceRoot":"","sources":["../../../../src/api/unibox/realtime-event.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;GAYG;AACH,IAAY,yBASX;AATD,WAAY,yBAAyB;IACjC,gFAAgF;IAChF,gEAAmC,CAAA;IACnC,yEAAyE;IACzE,8EAAiD,CAAA;IACjD,yEAAyE;IACzE,0EAA6C,CAAA;IAC7C,yFAAyF;IACzF,4EAA+C,CAAA;AACnD,CAAC,EATW,yBAAyB,yCAAzB,yBAAyB,QASpC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
2
|
+
import type { RealtimeConversationEvent } from './realtime-event.enum.js';
|
|
3
|
+
/** Socket.IO event names a client sends. */
|
|
4
|
+
export declare const REALTIME_CLIENT_EVENT: {
|
|
5
|
+
readonly SUBSCRIBE: "realtime.subscribe";
|
|
6
|
+
};
|
|
7
|
+
/** Socket.IO event names a client receives. */
|
|
8
|
+
export declare const REALTIME_SERVER_EVENT: {
|
|
9
|
+
readonly READY: "realtime.ready";
|
|
10
|
+
readonly SUBSCRIBED: "realtime.subscribed";
|
|
11
|
+
readonly CONVERSATION_UPDATED: "conversation.updated";
|
|
12
|
+
readonly ERROR: "realtime.error";
|
|
13
|
+
};
|
|
14
|
+
/** Bumped when a message shape changes incompatibly; the server announces it on connect. */
|
|
15
|
+
export declare const REALTIME_PROTOCOL_VERSION = 1;
|
|
16
|
+
/** Most conversations a single socket may watch. */
|
|
17
|
+
export declare const MAX_REALTIME_SUBSCRIPTIONS_PER_SOCKET = 100;
|
|
18
|
+
/** Largest serialized event, in bytes. */
|
|
19
|
+
export declare const MAX_REALTIME_EVENT_BYTES: number;
|
|
20
|
+
/** Longest event name accepted from a publisher. */
|
|
21
|
+
export declare const MAX_REALTIME_EVENT_NAME_LENGTH = 128;
|
|
22
|
+
/**
|
|
23
|
+
* The body a publishing service POSTs to `unibox-realtime`.
|
|
24
|
+
*
|
|
25
|
+
* **There is no `tenantId` field, and that absence is the security model.** The tenant comes
|
|
26
|
+
* from the publisher's own access token, so a compromised or buggy publisher cannot address
|
|
27
|
+
* another tenant's subscribers — it can only ever reach its own. A body field would make
|
|
28
|
+
* cross-tenant delivery a validation rule someone has to remember to write.
|
|
29
|
+
*/
|
|
30
|
+
export interface PublishConversationEventBody {
|
|
31
|
+
conversationId: UUID;
|
|
32
|
+
event: RealtimeConversationEvent;
|
|
33
|
+
/** Identifiers only. Never message content — see {@link RealtimeConversationEvent}. */
|
|
34
|
+
payload: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
/** `unibox-realtime`'s answer to a publish. */
|
|
37
|
+
export interface PublishConversationEventResponse {
|
|
38
|
+
/**
|
|
39
|
+
* Whether the event was accepted for fan-out.
|
|
40
|
+
*
|
|
41
|
+
* Never whether anyone received it. With the Redis adapter no single process knows that, and
|
|
42
|
+
* a publisher that waited to find out would be blocking a write on how many browsers happen
|
|
43
|
+
* to be open.
|
|
44
|
+
*/
|
|
45
|
+
accepted: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** Sent to a client once its token verifies. */
|
|
48
|
+
export interface RealtimeReadyMessage {
|
|
49
|
+
protocolVersion: typeof REALTIME_PROTOCOL_VERSION;
|
|
50
|
+
}
|
|
51
|
+
/** What a client asks to watch. */
|
|
52
|
+
export interface RealtimeSubscribeRequest {
|
|
53
|
+
conversationIds: UUID[];
|
|
54
|
+
}
|
|
55
|
+
/** The full set a socket is watching after a subscribe, not just the delta. */
|
|
56
|
+
export interface RealtimeSubscribedMessage {
|
|
57
|
+
conversationIds: UUID[];
|
|
58
|
+
}
|
|
59
|
+
export interface RealtimeErrorMessage {
|
|
60
|
+
code: 'UNAUTHENTICATED' | 'FORBIDDEN' | 'INVALID_SUBSCRIPTION' | 'PAYLOAD_TOO_LARGE';
|
|
61
|
+
message: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* What a subscribed client receives.
|
|
65
|
+
*
|
|
66
|
+
* **No tenant id.** The subscriber proved its own tenant to enter the room, so echoing it back
|
|
67
|
+
* says nothing it does not know and puts another tenant's identifier one bug away from a socket
|
|
68
|
+
* that must never see it.
|
|
69
|
+
*/
|
|
70
|
+
export interface ConversationUpdatedMessage {
|
|
71
|
+
conversationId: UUID;
|
|
72
|
+
event: RealtimeConversationEvent;
|
|
73
|
+
payload: Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
/** Acknowledgement returned to a client's `subscribe` call. */
|
|
76
|
+
export type RealtimeSubscriptionAck = {
|
|
77
|
+
ok: true;
|
|
78
|
+
message: RealtimeSubscribedMessage;
|
|
79
|
+
} | {
|
|
80
|
+
ok: false;
|
|
81
|
+
message: RealtimeErrorMessage;
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=realtime.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime.type.d.ts","sourceRoot":"","sources":["../../../../src/api/unibox/realtime.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,4CAA4C;AAC5C,eAAO,MAAM,qBAAqB;;CAExB,CAAC;AAEX,+CAA+C;AAC/C,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX,4FAA4F;AAC5F,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,oDAAoD;AACpD,eAAO,MAAM,qCAAqC,MAAM,CAAC;AAEzD,0CAA0C;AAC1C,eAAO,MAAM,wBAAwB,QAAY,CAAC;AAElD,oDAAoD;AACpD,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,WAAW,4BAA4B;IACzC,cAAc,EAAE,IAAI,CAAC;IACrB,KAAK,EAAE,yBAAyB,CAAC;IACjC,uFAAuF;IACvF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,+CAA+C;AAC/C,MAAM,WAAW,gCAAgC;IAC7C;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,gDAAgD;AAChD,MAAM,WAAW,oBAAoB;IACjC,eAAe,EAAE,OAAO,yBAAyB,CAAC;CACrD;AAED,mCAAmC;AACnC,MAAM,WAAW,wBAAwB;IACrC,eAAe,EAAE,IAAI,EAAE,CAAC;CAC3B;AAED,+EAA+E;AAC/E,MAAM,WAAW,yBAAyB;IACtC,eAAe,EAAE,IAAI,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,iBAAiB,GAAG,WAAW,GAAG,sBAAsB,GAAG,mBAAmB,CAAC;IACrF,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACvC,cAAc,EAAE,IAAI,CAAC;IACrB,KAAK,EAAE,yBAAyB,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,+DAA+D;AAC/D,MAAM,MAAM,uBAAuB,GAC/B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,yBAAyB,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_REALTIME_EVENT_NAME_LENGTH = exports.MAX_REALTIME_EVENT_BYTES = exports.MAX_REALTIME_SUBSCRIPTIONS_PER_SOCKET = exports.REALTIME_PROTOCOL_VERSION = exports.REALTIME_SERVER_EVENT = exports.REALTIME_CLIENT_EVENT = void 0;
|
|
4
|
+
/** Socket.IO event names a client sends. */
|
|
5
|
+
exports.REALTIME_CLIENT_EVENT = {
|
|
6
|
+
SUBSCRIBE: 'realtime.subscribe',
|
|
7
|
+
};
|
|
8
|
+
/** Socket.IO event names a client receives. */
|
|
9
|
+
exports.REALTIME_SERVER_EVENT = {
|
|
10
|
+
READY: 'realtime.ready',
|
|
11
|
+
SUBSCRIBED: 'realtime.subscribed',
|
|
12
|
+
CONVERSATION_UPDATED: 'conversation.updated',
|
|
13
|
+
ERROR: 'realtime.error',
|
|
14
|
+
};
|
|
15
|
+
/** Bumped when a message shape changes incompatibly; the server announces it on connect. */
|
|
16
|
+
exports.REALTIME_PROTOCOL_VERSION = 1;
|
|
17
|
+
/** Most conversations a single socket may watch. */
|
|
18
|
+
exports.MAX_REALTIME_SUBSCRIPTIONS_PER_SOCKET = 100;
|
|
19
|
+
/** Largest serialized event, in bytes. */
|
|
20
|
+
exports.MAX_REALTIME_EVENT_BYTES = 64 * 1024;
|
|
21
|
+
/** Longest event name accepted from a publisher. */
|
|
22
|
+
exports.MAX_REALTIME_EVENT_NAME_LENGTH = 128;
|
|
23
|
+
//# sourceMappingURL=realtime.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime.type.js","sourceRoot":"","sources":["../../../../src/api/unibox/realtime.type.ts"],"names":[],"mappings":";;;AAIA,4CAA4C;AAC/B,QAAA,qBAAqB,GAAG;IACjC,SAAS,EAAE,oBAAoB;CACzB,CAAC;AAEX,+CAA+C;AAClC,QAAA,qBAAqB,GAAG;IACjC,KAAK,EAAE,gBAAgB;IACvB,UAAU,EAAE,qBAAqB;IACjC,oBAAoB,EAAE,sBAAsB;IAC5C,KAAK,EAAE,gBAAgB;CACjB,CAAC;AAEX,4FAA4F;AAC/E,QAAA,yBAAyB,GAAG,CAAC,CAAC;AAE3C,oDAAoD;AACvC,QAAA,qCAAqC,GAAG,GAAG,CAAC;AAEzD,0CAA0C;AAC7B,QAAA,wBAAwB,GAAG,EAAE,GAAG,IAAI,CAAC;AAElD,oDAAoD;AACvC,QAAA,8BAA8B,GAAG,GAAG,CAAC"}
|
|
@@ -190,6 +190,19 @@ export declare enum UserPermission {
|
|
|
190
190
|
UNIBOX_CANNED_REPLY_READ = "unibox:canned-reply:read",
|
|
191
191
|
/** Author the saved replies every agent in the tenant will send. */
|
|
192
192
|
UNIBOX_CANNED_REPLY_MANAGE = "unibox:canned-reply:manage",
|
|
193
|
+
/**
|
|
194
|
+
* Publish a conversation event into the live inbox.
|
|
195
|
+
*
|
|
196
|
+
* **A service permission, not a human one**, and deliberately absent from the seeded `ADMIN`
|
|
197
|
+
* role — unlike `CONDUIT_DISPATCH_SEND`, which an admin holds so they can prove a connection
|
|
198
|
+
* works. There is no equivalent thing to prove here: publishing means putting a message in
|
|
199
|
+
* front of every agent watching a conversation, so the only legitimate holder is the service
|
|
200
|
+
* that owns what actually happened to that conversation.
|
|
201
|
+
*
|
|
202
|
+
* Reading the live stream is `UNIBOX_CONVERSATION_READ` — the same permission that guards
|
|
203
|
+
* reading the inbox over HTTP, because it is the same data arriving by another route.
|
|
204
|
+
*/
|
|
205
|
+
UNIBOX_REALTIME_PUBLISH = "unibox:realtime:publish",
|
|
193
206
|
/** Allows a trusted service principal to submit bounded conversation context for generation. */
|
|
194
207
|
UNIBOX_AI_RUN = "unibox:ai:run",
|
|
195
208
|
/** Read tenant MCP server metadata; credential values are never returned. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-permission.enum.d.ts","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,cAAc;IAItB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,sFAAsF;IACtF,aAAa,kBAAkB;IAG/B,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAG3B,eAAe,oBAAoB;IACnC,6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ACzF,uBAAuB,4BAA4B;IAKnD,kFAAkF;IAClF,mBAAmB,wBAAwB;IAC3C;;;;;;OAMG;IACH,qBAAqB,0BAA0B;IAG/C,2FAA2F;IAC3F,mBAAmB,wBAAwB;IAC3C,gDAAgD;IAChD,qBAAqB,0BAA0B;IAG/C;;;;;;;OAOG;IACH,wBAAwB,6BAA6B;IACrD,yFAAyF;IACzF,0BAA0B,+BAA+B;IACzD;;;;;;OAMG;IACH,0BAA0B,+BAA+B;IAGzD;;;;;;OAMG;IACH,mBAAmB,wBAAwB;IAG3C,gBAAgB,qBAAqB;IACrC,8FAA8F;IAC9F,kBAAkB,uBAAuB;IAGzC,wBAAwB,6BAA6B;IACrD,oEAAoE;IACpE,0BAA0B,+BAA+B;IAGzD,gGAAgG;IAChG,aAAa,kBAAkB;IAG/B,6EAA6E;IAC7E,eAAe,oBAAoB;IACnC,wDAAwD;IACxD,iBAAiB,sBAAsB;IAKvC,8CAA8C;IAC9C,iBAAiB,sBAAsB;IACvC,sDAAsD;IACtD,mBAAmB,wBAAwB;IAG3C,6DAA6D;IAC7D,yBAAyB,8BAA8B;IACvD,qDAAqD;IACrD,2BAA2B,gCAAgC;IAG3D,yCAAyC;IACzC,kBAAkB,uBAAuB;IACzC,2DAA2D;IAC3D,oBAAoB,yBAAyB;IAG7C,+DAA+D;IAC/D,oBAAoB,yBAAyB;IAC7C,+EAA+E;IAC/E,sBAAsB,2BAA2B;IAGjD,2DAA2D;IAC3D,oBAAoB,yBAAyB;IAC7C,gDAAgD;IAChD,sBAAsB,2BAA2B;CACpD;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,cAAc,EAAiD,CAAC"}
|
|
1
|
+
{"version":3,"file":"user-permission.enum.d.ts","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,cAAc;IAItB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC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}
|
|
@@ -221,6 +221,20 @@ var UserPermission;
|
|
|
221
221
|
UserPermission["UNIBOX_CANNED_REPLY_READ"] = "unibox:canned-reply:read";
|
|
222
222
|
/** Author the saved replies every agent in the tenant will send. */
|
|
223
223
|
UserPermission["UNIBOX_CANNED_REPLY_MANAGE"] = "unibox:canned-reply:manage";
|
|
224
|
+
// ── Realtime ────────────────────────────────────────────────────────────
|
|
225
|
+
/**
|
|
226
|
+
* Publish a conversation event into the live inbox.
|
|
227
|
+
*
|
|
228
|
+
* **A service permission, not a human one**, and deliberately absent from the seeded `ADMIN`
|
|
229
|
+
* role — unlike `CONDUIT_DISPATCH_SEND`, which an admin holds so they can prove a connection
|
|
230
|
+
* works. There is no equivalent thing to prove here: publishing means putting a message in
|
|
231
|
+
* front of every agent watching a conversation, so the only legitimate holder is the service
|
|
232
|
+
* that owns what actually happened to that conversation.
|
|
233
|
+
*
|
|
234
|
+
* Reading the live stream is `UNIBOX_CONVERSATION_READ` — the same permission that guards
|
|
235
|
+
* reading the inbox over HTTP, because it is the same data arriving by another route.
|
|
236
|
+
*/
|
|
237
|
+
UserPermission["UNIBOX_REALTIME_PUBLISH"] = "unibox:realtime:publish";
|
|
224
238
|
// ── AI runtime ──────────────────────────────────────────────────────────
|
|
225
239
|
/** Allows a trusted service principal to submit bounded conversation context for generation. */
|
|
226
240
|
UserPermission["UNIBOX_AI_RUN"] = "unibox:ai:run";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-permission.enum.js","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"user-permission.enum.js","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,IAAY,cA6RX;AA7RD,WAAY,cAAc;IACtB,4EAA4E;IAE5E,2EAA2E;IAC3E,6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,CAAA;IAE3C,yEAAyE;IACzE,6DAA6D;IAC7D,yEAAuD,CAAA;IACvD,qDAAqD;IACrD,6EAA2D,CAAA;IAE3D,0EAA0E;IAC1E,yCAAyC;IACzC,2DAAyC,CAAA;IACzC,2DAA2D;IAC3D,+DAA6C,CAAA;IAE7C,0EAA0E;IAC1E,+DAA+D;IAC/D,+DAA6C,CAAA;IAC7C,+EAA+E;IAC/E,mEAAiD,CAAA;IAEjD,0EAA0E;IAC1E,2DAA2D;IAC3D,+DAA6C,CAAA;IAC7C,gDAAgD;IAChD,mEAAiD,CAAA;AACrD,CAAC,EA7RW,cAAc,8BAAd,cAAc,QA6RzB;AAED;;;;;GAKG;AACU,QAAA,oBAAoB,GAA8B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC"}
|
|
@@ -9,5 +9,7 @@ export * from './message-content-type.enum.js';
|
|
|
9
9
|
export * from './message-direction.enum.js';
|
|
10
10
|
export * from './message-status.enum.js';
|
|
11
11
|
export * from './message.type.js';
|
|
12
|
+
export * from './realtime-event.enum.js';
|
|
13
|
+
export * from './realtime.type.js';
|
|
12
14
|
export * from './team.type.js';
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/unibox/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/unibox/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
|
|
@@ -9,5 +9,7 @@ export * from './message-content-type.enum.js';
|
|
|
9
9
|
export * from './message-direction.enum.js';
|
|
10
10
|
export * from './message-status.enum.js';
|
|
11
11
|
export * from './message.type.js';
|
|
12
|
+
export * from './realtime-event.enum.js';
|
|
13
|
+
export * from './realtime.type.js';
|
|
12
14
|
export * from './team.type.js';
|
|
13
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/unibox/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/unibox/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What happened to a conversation, as told to a live subscriber.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately a small closed set rather than a free-form string. A subscriber decides what to
|
|
5
|
+
* refetch from the event name, so an unrecognised one means either doing nothing — a live inbox
|
|
6
|
+
* that silently stops updating — or refetching everything, which is a stampede triggered by
|
|
7
|
+
* whatever a publisher felt like sending.
|
|
8
|
+
*
|
|
9
|
+
* **These are notifications, not state.** The payload carries identifiers, never the message
|
|
10
|
+
* body or the contact's details: an event is a prompt to read from `unibox-api`, which is the
|
|
11
|
+
* only thing that can answer for what the reader is allowed to see. That also keeps a missed
|
|
12
|
+
* event harmless — the next read is correct regardless.
|
|
13
|
+
*/
|
|
14
|
+
export declare enum RealtimeConversationEvent {
|
|
15
|
+
/** A message was appended. The reader refetches the conversation's messages. */
|
|
16
|
+
MESSAGE_CREATED = "message.created",
|
|
17
|
+
/** A message's delivery status moved — sent, delivered, read, failed. */
|
|
18
|
+
MESSAGE_STATUS_CHANGED = "message.status-changed",
|
|
19
|
+
/** Status, unread count, or another conversation-level field changed. */
|
|
20
|
+
CONVERSATION_UPDATED = "conversation.updated",
|
|
21
|
+
/** The conversation moved to another agent or team, or a human took over from the AI. */
|
|
22
|
+
CONVERSATION_ASSIGNED = "conversation.assigned"
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=realtime-event.enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime-event.enum.d.ts","sourceRoot":"","sources":["../../../../src/api/unibox/realtime-event.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,oBAAY,yBAAyB;IACjC,gFAAgF;IAChF,eAAe,oBAAoB;IACnC,yEAAyE;IACzE,sBAAsB,2BAA2B;IACjD,yEAAyE;IACzE,oBAAoB,yBAAyB;IAC7C,yFAAyF;IACzF,qBAAqB,0BAA0B;CAClD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What happened to a conversation, as told to a live subscriber.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately a small closed set rather than a free-form string. A subscriber decides what to
|
|
5
|
+
* refetch from the event name, so an unrecognised one means either doing nothing — a live inbox
|
|
6
|
+
* that silently stops updating — or refetching everything, which is a stampede triggered by
|
|
7
|
+
* whatever a publisher felt like sending.
|
|
8
|
+
*
|
|
9
|
+
* **These are notifications, not state.** The payload carries identifiers, never the message
|
|
10
|
+
* body or the contact's details: an event is a prompt to read from `unibox-api`, which is the
|
|
11
|
+
* only thing that can answer for what the reader is allowed to see. That also keeps a missed
|
|
12
|
+
* event harmless — the next read is correct regardless.
|
|
13
|
+
*/
|
|
14
|
+
export var RealtimeConversationEvent;
|
|
15
|
+
(function (RealtimeConversationEvent) {
|
|
16
|
+
/** A message was appended. The reader refetches the conversation's messages. */
|
|
17
|
+
RealtimeConversationEvent["MESSAGE_CREATED"] = "message.created";
|
|
18
|
+
/** A message's delivery status moved — sent, delivered, read, failed. */
|
|
19
|
+
RealtimeConversationEvent["MESSAGE_STATUS_CHANGED"] = "message.status-changed";
|
|
20
|
+
/** Status, unread count, or another conversation-level field changed. */
|
|
21
|
+
RealtimeConversationEvent["CONVERSATION_UPDATED"] = "conversation.updated";
|
|
22
|
+
/** The conversation moved to another agent or team, or a human took over from the AI. */
|
|
23
|
+
RealtimeConversationEvent["CONVERSATION_ASSIGNED"] = "conversation.assigned";
|
|
24
|
+
})(RealtimeConversationEvent || (RealtimeConversationEvent = {}));
|
|
25
|
+
//# sourceMappingURL=realtime-event.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime-event.enum.js","sourceRoot":"","sources":["../../../../src/api/unibox/realtime-event.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,IAAY,yBASX;AATD,WAAY,yBAAyB;IACjC,gFAAgF;IAChF,gEAAmC,CAAA;IACnC,yEAAyE;IACzE,8EAAiD,CAAA;IACjD,yEAAyE;IACzE,0EAA6C,CAAA;IAC7C,yFAAyF;IACzF,4EAA+C,CAAA;AACnD,CAAC,EATW,yBAAyB,KAAzB,yBAAyB,QASpC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { UUID } from '../../type/uuid.type.js';
|
|
2
|
+
import type { RealtimeConversationEvent } from './realtime-event.enum.js';
|
|
3
|
+
/** Socket.IO event names a client sends. */
|
|
4
|
+
export declare const REALTIME_CLIENT_EVENT: {
|
|
5
|
+
readonly SUBSCRIBE: "realtime.subscribe";
|
|
6
|
+
};
|
|
7
|
+
/** Socket.IO event names a client receives. */
|
|
8
|
+
export declare const REALTIME_SERVER_EVENT: {
|
|
9
|
+
readonly READY: "realtime.ready";
|
|
10
|
+
readonly SUBSCRIBED: "realtime.subscribed";
|
|
11
|
+
readonly CONVERSATION_UPDATED: "conversation.updated";
|
|
12
|
+
readonly ERROR: "realtime.error";
|
|
13
|
+
};
|
|
14
|
+
/** Bumped when a message shape changes incompatibly; the server announces it on connect. */
|
|
15
|
+
export declare const REALTIME_PROTOCOL_VERSION = 1;
|
|
16
|
+
/** Most conversations a single socket may watch. */
|
|
17
|
+
export declare const MAX_REALTIME_SUBSCRIPTIONS_PER_SOCKET = 100;
|
|
18
|
+
/** Largest serialized event, in bytes. */
|
|
19
|
+
export declare const MAX_REALTIME_EVENT_BYTES: number;
|
|
20
|
+
/** Longest event name accepted from a publisher. */
|
|
21
|
+
export declare const MAX_REALTIME_EVENT_NAME_LENGTH = 128;
|
|
22
|
+
/**
|
|
23
|
+
* The body a publishing service POSTs to `unibox-realtime`.
|
|
24
|
+
*
|
|
25
|
+
* **There is no `tenantId` field, and that absence is the security model.** The tenant comes
|
|
26
|
+
* from the publisher's own access token, so a compromised or buggy publisher cannot address
|
|
27
|
+
* another tenant's subscribers — it can only ever reach its own. A body field would make
|
|
28
|
+
* cross-tenant delivery a validation rule someone has to remember to write.
|
|
29
|
+
*/
|
|
30
|
+
export interface PublishConversationEventBody {
|
|
31
|
+
conversationId: UUID;
|
|
32
|
+
event: RealtimeConversationEvent;
|
|
33
|
+
/** Identifiers only. Never message content — see {@link RealtimeConversationEvent}. */
|
|
34
|
+
payload: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
/** `unibox-realtime`'s answer to a publish. */
|
|
37
|
+
export interface PublishConversationEventResponse {
|
|
38
|
+
/**
|
|
39
|
+
* Whether the event was accepted for fan-out.
|
|
40
|
+
*
|
|
41
|
+
* Never whether anyone received it. With the Redis adapter no single process knows that, and
|
|
42
|
+
* a publisher that waited to find out would be blocking a write on how many browsers happen
|
|
43
|
+
* to be open.
|
|
44
|
+
*/
|
|
45
|
+
accepted: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** Sent to a client once its token verifies. */
|
|
48
|
+
export interface RealtimeReadyMessage {
|
|
49
|
+
protocolVersion: typeof REALTIME_PROTOCOL_VERSION;
|
|
50
|
+
}
|
|
51
|
+
/** What a client asks to watch. */
|
|
52
|
+
export interface RealtimeSubscribeRequest {
|
|
53
|
+
conversationIds: UUID[];
|
|
54
|
+
}
|
|
55
|
+
/** The full set a socket is watching after a subscribe, not just the delta. */
|
|
56
|
+
export interface RealtimeSubscribedMessage {
|
|
57
|
+
conversationIds: UUID[];
|
|
58
|
+
}
|
|
59
|
+
export interface RealtimeErrorMessage {
|
|
60
|
+
code: 'UNAUTHENTICATED' | 'FORBIDDEN' | 'INVALID_SUBSCRIPTION' | 'PAYLOAD_TOO_LARGE';
|
|
61
|
+
message: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* What a subscribed client receives.
|
|
65
|
+
*
|
|
66
|
+
* **No tenant id.** The subscriber proved its own tenant to enter the room, so echoing it back
|
|
67
|
+
* says nothing it does not know and puts another tenant's identifier one bug away from a socket
|
|
68
|
+
* that must never see it.
|
|
69
|
+
*/
|
|
70
|
+
export interface ConversationUpdatedMessage {
|
|
71
|
+
conversationId: UUID;
|
|
72
|
+
event: RealtimeConversationEvent;
|
|
73
|
+
payload: Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
/** Acknowledgement returned to a client's `subscribe` call. */
|
|
76
|
+
export type RealtimeSubscriptionAck = {
|
|
77
|
+
ok: true;
|
|
78
|
+
message: RealtimeSubscribedMessage;
|
|
79
|
+
} | {
|
|
80
|
+
ok: false;
|
|
81
|
+
message: RealtimeErrorMessage;
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=realtime.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime.type.d.ts","sourceRoot":"","sources":["../../../../src/api/unibox/realtime.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,4CAA4C;AAC5C,eAAO,MAAM,qBAAqB;;CAExB,CAAC;AAEX,+CAA+C;AAC/C,eAAO,MAAM,qBAAqB;;;;;CAKxB,CAAC;AAEX,4FAA4F;AAC5F,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C,oDAAoD;AACpD,eAAO,MAAM,qCAAqC,MAAM,CAAC;AAEzD,0CAA0C;AAC1C,eAAO,MAAM,wBAAwB,QAAY,CAAC;AAElD,oDAAoD;AACpD,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,WAAW,4BAA4B;IACzC,cAAc,EAAE,IAAI,CAAC;IACrB,KAAK,EAAE,yBAAyB,CAAC;IACjC,uFAAuF;IACvF,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,+CAA+C;AAC/C,MAAM,WAAW,gCAAgC;IAC7C;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,gDAAgD;AAChD,MAAM,WAAW,oBAAoB;IACjC,eAAe,EAAE,OAAO,yBAAyB,CAAC;CACrD;AAED,mCAAmC;AACnC,MAAM,WAAW,wBAAwB;IACrC,eAAe,EAAE,IAAI,EAAE,CAAC;CAC3B;AAED,+EAA+E;AAC/E,MAAM,WAAW,yBAAyB;IACtC,eAAe,EAAE,IAAI,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,iBAAiB,GAAG,WAAW,GAAG,sBAAsB,GAAG,mBAAmB,CAAC;IACrF,OAAO,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACvC,cAAc,EAAE,IAAI,CAAC;IACrB,KAAK,EAAE,yBAAyB,CAAC;IACjC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,+DAA+D;AAC/D,MAAM,MAAM,uBAAuB,GAC/B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,yBAAyB,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,oBAAoB,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Socket.IO event names a client sends. */
|
|
2
|
+
export const REALTIME_CLIENT_EVENT = {
|
|
3
|
+
SUBSCRIBE: 'realtime.subscribe',
|
|
4
|
+
};
|
|
5
|
+
/** Socket.IO event names a client receives. */
|
|
6
|
+
export const REALTIME_SERVER_EVENT = {
|
|
7
|
+
READY: 'realtime.ready',
|
|
8
|
+
SUBSCRIBED: 'realtime.subscribed',
|
|
9
|
+
CONVERSATION_UPDATED: 'conversation.updated',
|
|
10
|
+
ERROR: 'realtime.error',
|
|
11
|
+
};
|
|
12
|
+
/** Bumped when a message shape changes incompatibly; the server announces it on connect. */
|
|
13
|
+
export const REALTIME_PROTOCOL_VERSION = 1;
|
|
14
|
+
/** Most conversations a single socket may watch. */
|
|
15
|
+
export const MAX_REALTIME_SUBSCRIPTIONS_PER_SOCKET = 100;
|
|
16
|
+
/** Largest serialized event, in bytes. */
|
|
17
|
+
export const MAX_REALTIME_EVENT_BYTES = 64 * 1024;
|
|
18
|
+
/** Longest event name accepted from a publisher. */
|
|
19
|
+
export const MAX_REALTIME_EVENT_NAME_LENGTH = 128;
|
|
20
|
+
//# sourceMappingURL=realtime.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realtime.type.js","sourceRoot":"","sources":["../../../../src/api/unibox/realtime.type.ts"],"names":[],"mappings":"AAIA,4CAA4C;AAC5C,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,SAAS,EAAE,oBAAoB;CACzB,CAAC;AAEX,+CAA+C;AAC/C,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,KAAK,EAAE,gBAAgB;IACvB,UAAU,EAAE,qBAAqB;IACjC,oBAAoB,EAAE,sBAAsB;IAC5C,KAAK,EAAE,gBAAgB;CACjB,CAAC;AAEX,4FAA4F;AAC5F,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAE3C,oDAAoD;AACpD,MAAM,CAAC,MAAM,qCAAqC,GAAG,GAAG,CAAC;AAEzD,0CAA0C;AAC1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,GAAG,IAAI,CAAC;AAElD,oDAAoD;AACpD,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC"}
|
|
@@ -190,6 +190,19 @@ export declare enum UserPermission {
|
|
|
190
190
|
UNIBOX_CANNED_REPLY_READ = "unibox:canned-reply:read",
|
|
191
191
|
/** Author the saved replies every agent in the tenant will send. */
|
|
192
192
|
UNIBOX_CANNED_REPLY_MANAGE = "unibox:canned-reply:manage",
|
|
193
|
+
/**
|
|
194
|
+
* Publish a conversation event into the live inbox.
|
|
195
|
+
*
|
|
196
|
+
* **A service permission, not a human one**, and deliberately absent from the seeded `ADMIN`
|
|
197
|
+
* role — unlike `CONDUIT_DISPATCH_SEND`, which an admin holds so they can prove a connection
|
|
198
|
+
* works. There is no equivalent thing to prove here: publishing means putting a message in
|
|
199
|
+
* front of every agent watching a conversation, so the only legitimate holder is the service
|
|
200
|
+
* that owns what actually happened to that conversation.
|
|
201
|
+
*
|
|
202
|
+
* Reading the live stream is `UNIBOX_CONVERSATION_READ` — the same permission that guards
|
|
203
|
+
* reading the inbox over HTTP, because it is the same data arriving by another route.
|
|
204
|
+
*/
|
|
205
|
+
UNIBOX_REALTIME_PUBLISH = "unibox:realtime:publish",
|
|
193
206
|
/** Allows a trusted service principal to submit bounded conversation context for generation. */
|
|
194
207
|
UNIBOX_AI_RUN = "unibox:ai:run",
|
|
195
208
|
/** Read tenant MCP server metadata; credential values are never returned. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-permission.enum.d.ts","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,cAAc;IAItB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,sFAAsF;IACtF,aAAa,kBAAkB;IAG/B,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAG3B,eAAe,oBAAoB;IACnC,6EAA6E;IAC7E,iBAAiB,sBAAsB;IACvC;;;OAGG;IACH,sBAAsB,2BAA2B;IAGjD,SAAS,cAAc;IACvB,WAAW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0B;IAG/C,2FAA2F;IAC3F,mBAAmB,wBAAwB;IAC3C,gDAAgD;IAChD,qBAAqB,0BAA0B;IAG/C;;;;;;;OAOG;IACH,wBAAwB,6BAA6B;IACrD,yFAAyF;IACzF,0BAA0B,+BAA+B;IACzD;;;;;;OAMG;IACH,0BAA0B,+BAA+B;IAGzD;;;;;;OAMG;IACH,mBAAmB,wBAAwB;IAG3C,gBAAgB,qBAAqB;IACrC,8FAA8F;IAC9F,kBAAkB,uBAAuB;IAGzC,wBAAwB,6BAA6B;IACrD,oEAAoE;IACpE,0BAA0B,+BAA+B;IAGzD,gGAAgG;IAChG,aAAa,kBAAkB;IAG/B,6EAA6E;IAC7E,eAAe,oBAAoB;IACnC,wDAAwD;IACxD,iBAAiB,sBAAsB;IAKvC,8CAA8C;IAC9C,iBAAiB,sBAAsB;IACvC,sDAAsD;IACtD,mBAAmB,wBAAwB;IAG3C,6DAA6D;IAC7D,yBAAyB,8BAA8B;IACvD,qDAAqD;IACrD,2BAA2B,gCAAgC;IAG3D,yCAAyC;IACzC,kBAAkB,uBAAuB;IACzC,2DAA2D;IAC3D,oBAAoB,yBAAyB;IAG7C,+DAA+D;IAC/D,oBAAoB,yBAAyB;IAC7C,+EAA+E;IAC/E,sBAAsB,2BAA2B;IAGjD,2DAA2D;IAC3D,oBAAoB,yBAAyB;IAC7C,gDAAgD;IAChD,sBAAsB,2BAA2B;CACpD;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,cAAc,EAAiD,CAAC"}
|
|
1
|
+
{"version":3,"file":"user-permission.enum.d.ts","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,cAAc;IAItB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,sFAAsF;IACtF,aAAa,kBAAkB;IAG/B,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC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:read";
|
|
219
219
|
/** Author the saved replies every agent in the tenant will send. */
|
|
220
220
|
UserPermission["UNIBOX_CANNED_REPLY_MANAGE"] = "unibox:canned-reply:manage";
|
|
221
|
+
// ── Realtime ────────────────────────────────────────────────────────────
|
|
222
|
+
/**
|
|
223
|
+
* Publish a conversation event into the live inbox.
|
|
224
|
+
*
|
|
225
|
+
* **A service permission, not a human one**, and deliberately absent from the seeded `ADMIN`
|
|
226
|
+
* role — unlike `CONDUIT_DISPATCH_SEND`, which an admin holds so they can prove a connection
|
|
227
|
+
* works. There is no equivalent thing to prove here: publishing means putting a message in
|
|
228
|
+
* front of every agent watching a conversation, so the only legitimate holder is the service
|
|
229
|
+
* that owns what actually happened to that conversation.
|
|
230
|
+
*
|
|
231
|
+
* Reading the live stream is `UNIBOX_CONVERSATION_READ` — the same permission that guards
|
|
232
|
+
* reading the inbox over HTTP, because it is the same data arriving by another route.
|
|
233
|
+
*/
|
|
234
|
+
UserPermission["UNIBOX_REALTIME_PUBLISH"] = "unibox:realtime:publish";
|
|
221
235
|
// ── AI runtime ──────────────────────────────────────────────────────────
|
|
222
236
|
/** Allows a trusted service principal to submit bounded conversation context for generation. */
|
|
223
237
|
UserPermission["UNIBOX_AI_RUN"] = "unibox:ai:run";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-permission.enum.js","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"user-permission.enum.js","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAN,IAAY,cA6RX;AA7RD,WAAY,cAAc;IACtB,4EAA4E;IAE5E,2EAA2E;IAC3E,6CAA2B,CAAA;IAC3B,iDAA+B,CAAA;IAC/B,sFAAsF;IACtF,iDAA+B,CAAA;IAE/B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