@mulmobridge/chat-service 1.0.1 → 1.0.2
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/commands.d.ts +3 -3
- package/dist/relay.d.ts +3 -3
- package/dist/socket.d.ts +1 -1
- package/dist/types.d.ts +5 -5
- package/package.json +1 -1
package/dist/commands.d.ts
CHANGED
|
@@ -41,12 +41,12 @@ export declare function createCommandHandler(opts: {
|
|
|
41
41
|
getRole: (roleId: string) => Role;
|
|
42
42
|
resetChatState: ChatStateStore["resetChatState"];
|
|
43
43
|
connectSession: ChatStateStore["connectSession"];
|
|
44
|
-
listSessions?: ListSessionsFn;
|
|
45
|
-
getSessionHistory?: GetSessionHistoryFn;
|
|
44
|
+
listSessions?: ListSessionsFn | undefined;
|
|
45
|
+
getSessionHistory?: GetSessionHistoryFn | undefined;
|
|
46
46
|
/** Lists the skills the bridge command handler should expose.
|
|
47
47
|
* Drives both the slash-command allowlist (only matching names
|
|
48
48
|
* are forwarded to the agent) and the "Skills:" section in the
|
|
49
49
|
* `/help` reply. When omitted, every unknown slash is rejected
|
|
50
50
|
* and `/help` shows only the built-in commands. */
|
|
51
|
-
listRegisteredSkills?: () => Promise<BridgeSkillSummary[]
|
|
51
|
+
listRegisteredSkills?: (() => Promise<BridgeSkillSummary[]>) | undefined;
|
|
52
52
|
}): CommandHandler;
|
package/dist/relay.d.ts
CHANGED
|
@@ -5,17 +5,17 @@ export interface RelayParams {
|
|
|
5
5
|
transportId: string;
|
|
6
6
|
externalChatId: string;
|
|
7
7
|
text: string;
|
|
8
|
-
attachments?: Attachment[];
|
|
8
|
+
attachments?: Attachment[] | undefined;
|
|
9
9
|
/** Flat primitive bag captured at handshake time (string /
|
|
10
10
|
* number / boolean values only — see socket.ts sanitiser).
|
|
11
11
|
* Forwarded to the host app's startChat callback as
|
|
12
12
|
* `bridgeOptions`. Empty when the bridge didn't send any.
|
|
13
13
|
* See plans/done/feat-bridge-options-passthrough.md. */
|
|
14
|
-
bridgeOptions?: Readonly<Record<string, string | number | boolean
|
|
14
|
+
bridgeOptions?: Readonly<Record<string, string | number | boolean>> | undefined;
|
|
15
15
|
/** Called for each text chunk as the agent generates it. Used by
|
|
16
16
|
* the socket transport to stream text to the bridge in real time
|
|
17
17
|
* (Phase C of #268). */
|
|
18
|
-
onChunk?: (text: string) => void;
|
|
18
|
+
onChunk?: ((text: string) => void) | undefined;
|
|
19
19
|
}
|
|
20
20
|
export type RelayResult = {
|
|
21
21
|
kind: "ok";
|
package/dist/socket.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface ChatSocketDeps {
|
|
|
30
30
|
logger: Logger;
|
|
31
31
|
/** Current bearer token the handshake must carry. Null means
|
|
32
32
|
* bootstrap in progress — reject everything. Omit to disable. */
|
|
33
|
-
tokenProvider?: () => string | null;
|
|
33
|
+
tokenProvider?: (() => string | null) | undefined;
|
|
34
34
|
}
|
|
35
35
|
export interface ChatSocketHandle {
|
|
36
36
|
io: SocketServer;
|
package/dist/types.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface StartChatParams {
|
|
|
30
30
|
* server-side and rewrites them as path-bearing attachments
|
|
31
31
|
* before any other processing. */
|
|
32
32
|
selectedImageData?: string;
|
|
33
|
-
attachments?: Attachment[];
|
|
33
|
+
attachments?: Attachment[] | undefined;
|
|
34
34
|
/** Session origin — application-defined (e.g. "human", "bridge") */
|
|
35
35
|
origin?: string;
|
|
36
36
|
/** Flat primitive bag forwarded from the bridge handshake. Chat-
|
|
@@ -40,7 +40,7 @@ export interface StartChatParams {
|
|
|
40
40
|
* pollution. The host app is free to look up its own keys
|
|
41
41
|
* (e.g. `defaultRole`). Empty object when the bridge didn't
|
|
42
42
|
* send any. */
|
|
43
|
-
bridgeOptions?: Readonly<Record<string, string | number | boolean
|
|
43
|
+
bridgeOptions?: Readonly<Record<string, string | number | boolean>> | undefined;
|
|
44
44
|
}
|
|
45
45
|
export type StartChatResult = {
|
|
46
46
|
kind: "started";
|
|
@@ -99,18 +99,18 @@ export interface ChatServiceDeps {
|
|
|
99
99
|
* Omit in tests / unauth environments to skip the check. See
|
|
100
100
|
* `attachChatSocket` in ./socket.ts.
|
|
101
101
|
*/
|
|
102
|
-
tokenProvider?: () => string | null;
|
|
102
|
+
tokenProvider?: (() => string | null) | undefined;
|
|
103
103
|
/**
|
|
104
104
|
* List recent sessions from the server. Used by /sessions command.
|
|
105
105
|
* Omit if session listing is not available (command will reply
|
|
106
106
|
* "not available").
|
|
107
107
|
*/
|
|
108
|
-
listSessions?: ListSessionsFn;
|
|
108
|
+
listSessions?: ListSessionsFn | undefined;
|
|
109
109
|
/**
|
|
110
110
|
* Get recent messages from a session. Used by /history command.
|
|
111
111
|
* Returns newest-first array of {source, text} pairs.
|
|
112
112
|
*/
|
|
113
|
-
getSessionHistory?: GetSessionHistoryFn;
|
|
113
|
+
getSessionHistory?: GetSessionHistoryFn | undefined;
|
|
114
114
|
/**
|
|
115
115
|
* Resolve the roleId a given session was started with. Used by the HTTP
|
|
116
116
|
* `/connect` route so the persisted bridge state's role tracks the target
|
package/package.json
CHANGED