@elizaos/server 1.3.0 → 1.3.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/client/assets/{index-TZ8BgtSM.js → index-Bag8VjjC.js} +23476 -22733
- package/dist/client/assets/index-Bag8VjjC.js.br +0 -0
- package/dist/client/assets/{index-TZ8BgtSM.js.map → index-Bag8VjjC.js.map} +1 -1
- package/dist/client/assets/{index-BQg5aCT3.js → index-Cg8M_OX7.js} +31 -28
- package/dist/client/assets/index-Cg8M_OX7.js.br +0 -0
- package/dist/client/assets/index-Cg8M_OX7.js.map +1 -0
- package/dist/client/assets/{vendor-BWTRqS51.js → vendor-H6SVl4X5.js} +69 -69
- package/dist/client/assets/vendor-H6SVl4X5.js.br +0 -0
- package/dist/client/assets/vendor-H6SVl4X5.js.map +1 -0
- package/dist/client/index.html +2 -2
- package/dist/index.d.ts +103 -1
- package/dist/index.js +789 -404
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/client/assets/index-BQg5aCT3.js.br +0 -0
- package/dist/client/assets/index-BQg5aCT3.js.map +0 -1
- package/dist/client/assets/index-TZ8BgtSM.js.br +0 -0
- package/dist/client/assets/vendor-BWTRqS51.js.br +0 -0
- package/dist/client/assets/vendor-BWTRqS51.js.map +0 -1
package/dist/client/index.html
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
15
15
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
16
16
|
<title>ElizaOS - Client</title>
|
|
17
|
-
<script type="module" crossorigin src="/assets/index-
|
|
18
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-
|
|
17
|
+
<script type="module" crossorigin src="/assets/index-Bag8VjjC.js"></script>
|
|
18
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-H6SVl4X5.js">
|
|
19
19
|
<link rel="stylesheet" crossorigin href="/assets/index-CuhlDCnv.css">
|
|
20
20
|
</head>
|
|
21
21
|
<body>
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,108 @@ import express from 'express';
|
|
|
3
3
|
import http from 'node:http';
|
|
4
4
|
import { Server } from 'socket.io';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Metadata associated with a session
|
|
8
|
+
*/
|
|
9
|
+
interface SessionMetadata {
|
|
10
|
+
platform?: string;
|
|
11
|
+
username?: string;
|
|
12
|
+
discriminator?: string;
|
|
13
|
+
avatar?: string;
|
|
14
|
+
[key: string]: string | number | boolean | undefined;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Represents a messaging session between a user and an agent
|
|
18
|
+
*/
|
|
19
|
+
interface Session {
|
|
20
|
+
id: string;
|
|
21
|
+
agentId: UUID;
|
|
22
|
+
channelId: UUID;
|
|
23
|
+
userId: UUID;
|
|
24
|
+
metadata: SessionMetadata;
|
|
25
|
+
createdAt: Date;
|
|
26
|
+
lastActivity: Date;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Request body for creating a session
|
|
30
|
+
*/
|
|
31
|
+
interface CreateSessionRequest {
|
|
32
|
+
agentId: string;
|
|
33
|
+
userId: string;
|
|
34
|
+
metadata?: SessionMetadata;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Response for session creation
|
|
38
|
+
*/
|
|
39
|
+
interface CreateSessionResponse {
|
|
40
|
+
sessionId: string;
|
|
41
|
+
agentId: UUID;
|
|
42
|
+
userId: UUID;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
metadata: SessionMetadata;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Request body for sending a message
|
|
48
|
+
*/
|
|
49
|
+
interface SendMessageRequest {
|
|
50
|
+
content: string;
|
|
51
|
+
attachments?: Array<{
|
|
52
|
+
type: string;
|
|
53
|
+
url: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
}>;
|
|
56
|
+
metadata?: Record<string, any>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Query parameters for retrieving messages
|
|
60
|
+
*/
|
|
61
|
+
interface GetMessagesQuery {
|
|
62
|
+
limit?: string;
|
|
63
|
+
before?: string;
|
|
64
|
+
after?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Simplified message format for API responses
|
|
68
|
+
*/
|
|
69
|
+
interface SimplifiedMessage {
|
|
70
|
+
id: string;
|
|
71
|
+
content: string;
|
|
72
|
+
authorId: string;
|
|
73
|
+
isAgent: boolean;
|
|
74
|
+
createdAt: Date;
|
|
75
|
+
metadata: {
|
|
76
|
+
thought?: string;
|
|
77
|
+
actions?: string[];
|
|
78
|
+
[key: string]: any;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Response for message retrieval
|
|
83
|
+
*/
|
|
84
|
+
interface GetMessagesResponse {
|
|
85
|
+
messages: SimplifiedMessage[];
|
|
86
|
+
hasMore: boolean;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Session info response
|
|
90
|
+
*/
|
|
91
|
+
interface SessionInfoResponse {
|
|
92
|
+
sessionId: string;
|
|
93
|
+
agentId: UUID;
|
|
94
|
+
userId: UUID;
|
|
95
|
+
createdAt: Date;
|
|
96
|
+
lastActivity: Date;
|
|
97
|
+
metadata: SessionMetadata;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Health check response
|
|
101
|
+
*/
|
|
102
|
+
interface HealthCheckResponse {
|
|
103
|
+
status: 'healthy' | 'unhealthy';
|
|
104
|
+
activeSessions: number;
|
|
105
|
+
timestamp: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
6
108
|
interface MessageServer {
|
|
7
109
|
id: UUID;
|
|
8
110
|
name: string;
|
|
@@ -261,4 +363,4 @@ declare class AgentServer {
|
|
|
261
363
|
private registerSignalHandlers;
|
|
262
364
|
}
|
|
263
365
|
|
|
264
|
-
export { AgentServer, type CentralRootMessage, type MessageChannel, type MessageServer, type MessageServiceStructure, type ServerMiddleware, type ServerOptions, expandTildePath, hasValidRemoteUrls, isWebUIEnabled, jsonToCharacter, loadCharacter, loadCharacterTryPath, loadCharacters, loadCharactersFromUrl, resolvePgliteDir, tryLoadFile };
|
|
366
|
+
export { AgentServer, type CentralRootMessage, type CreateSessionRequest, type CreateSessionResponse, type GetMessagesQuery, type GetMessagesResponse, type HealthCheckResponse, type MessageChannel, type MessageServer, type MessageServiceStructure, type SendMessageRequest, type ServerMiddleware, type ServerOptions, type Session, type SessionInfoResponse, type SessionMetadata, type SimplifiedMessage, expandTildePath, hasValidRemoteUrls, isWebUIEnabled, jsonToCharacter, loadCharacter, loadCharacterTryPath, loadCharacters, loadCharactersFromUrl, resolvePgliteDir, tryLoadFile };
|