@mulmobridge/protocol 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/dist/attachment.d.ts +8 -0
- package/dist/attachment.js +2 -0
- package/dist/events.d.ts +14 -0
- package/dist/events.js +18 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +11 -0
- package/dist/routes.d.ts +4 -0
- package/dist/routes.js +6 -0
- package/dist/socket.d.ts +6 -0
- package/dist/socket.js +6 -0
- package/package.json +38 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface Attachment {
|
|
2
|
+
/** IANA media type, e.g. "image/png". */
|
|
3
|
+
mimeType: string;
|
|
4
|
+
/** Raw base64-encoded payload (no `data:` prefix, no whitespace). */
|
|
5
|
+
data: string;
|
|
6
|
+
/** Optional original filename. Untrusted — sanitise before use on disk. */
|
|
7
|
+
filename?: string;
|
|
8
|
+
}
|
package/dist/events.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const EVENT_TYPES: {
|
|
2
|
+
readonly status: "status";
|
|
3
|
+
readonly text: "text";
|
|
4
|
+
readonly toolCall: "tool_call";
|
|
5
|
+
readonly toolCallResult: "tool_call_result";
|
|
6
|
+
readonly toolResult: "tool_result";
|
|
7
|
+
readonly switchRole: "switch_role";
|
|
8
|
+
readonly error: "error";
|
|
9
|
+
readonly claudeSessionId: "claude_session_id";
|
|
10
|
+
readonly sessionFinished: "session_finished";
|
|
11
|
+
readonly sessionMeta: "session_meta";
|
|
12
|
+
readonly rolesUpdated: "roles_updated";
|
|
13
|
+
};
|
|
14
|
+
export type EventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES];
|
package/dist/events.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Event type constants for the agent SSE / socket.io wire protocol.
|
|
2
|
+
//
|
|
3
|
+
// These are the string values that appear in `{ type: "..." }` on
|
|
4
|
+
// every event flowing between the server and clients (both the Vue
|
|
5
|
+
// frontend and external bridges).
|
|
6
|
+
export const EVENT_TYPES = {
|
|
7
|
+
status: "status",
|
|
8
|
+
text: "text",
|
|
9
|
+
toolCall: "tool_call",
|
|
10
|
+
toolCallResult: "tool_call_result",
|
|
11
|
+
toolResult: "tool_result",
|
|
12
|
+
switchRole: "switch_role",
|
|
13
|
+
error: "error",
|
|
14
|
+
claudeSessionId: "claude_session_id",
|
|
15
|
+
sessionFinished: "session_finished",
|
|
16
|
+
sessionMeta: "session_meta",
|
|
17
|
+
rolesUpdated: "roles_updated",
|
|
18
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// @mulmobridge/protocol — shared constants and interfaces for the
|
|
2
|
+
// MulmoBridge chat protocol.
|
|
3
|
+
//
|
|
4
|
+
// This package defines the wire-level contract between:
|
|
5
|
+
// - The chat-service (server-side socket.io + REST)
|
|
6
|
+
// - External bridges (CLI, Telegram, future platforms)
|
|
7
|
+
//
|
|
8
|
+
// No runtime dependencies. Types + const-only.
|
|
9
|
+
export { EVENT_TYPES } from "./events.js";
|
|
10
|
+
export { CHAT_SOCKET_PATH, CHAT_SOCKET_EVENTS, } from "./socket.js";
|
|
11
|
+
export { CHAT_SERVICE_ROUTES } from "./routes.js";
|
package/dist/routes.d.ts
ADDED
package/dist/routes.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Chat-service route patterns. Only the subset needed by the
|
|
2
|
+
// chat-service package — the full API_ROUTES lives in the root app.
|
|
3
|
+
export const CHAT_SERVICE_ROUTES = {
|
|
4
|
+
message: "/api/transports/:transportId/chats/:externalChatId",
|
|
5
|
+
connect: "/api/transports/:transportId/chats/:externalChatId/connect",
|
|
6
|
+
};
|
package/dist/socket.d.ts
ADDED
package/dist/socket.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mulmobridge/protocol",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Shared types and constants for the MulmoBridge protocol",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/index.ts",
|
|
7
|
+
"types": "./src/index.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./src/index.ts",
|
|
11
|
+
"types": "./src/index.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc",
|
|
19
|
+
"prepack": "yarn build",
|
|
20
|
+
"typecheck": "tsc --noEmit",
|
|
21
|
+
"test": "tsx --test test/test_*.ts"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"main": "./dist/index.js",
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/index.js"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"author": "Receptron Team",
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"typescript": "^5.8.0"
|
|
37
|
+
}
|
|
38
|
+
}
|