@agent-link/server 0.1.84 → 0.1.85
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 +10 -3
- package/dist/context.d.ts +11 -0
- package/dist/context.js +38 -0
- package/dist/context.js.map +1 -1
- package/dist/index.js +7 -19
- package/dist/index.js.map +1 -1
- package/package.json +19 -1
- package/web/modules/connection.js +1 -0
package/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# AgentLink Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@agent-link/server)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
Relay server for [AgentLink](https://github.com/yilee/agentlink) — use Claude Code from any browser.
|
|
7
|
+
|
|
8
|
+
AgentLink lets you run Claude Code on your local machine and access it through a web interface. The server acts as an encrypted WebSocket relay between your browser and the local agent. No data is stored on the server.
|
|
6
9
|
|
|
7
10
|
## Install
|
|
8
11
|
|
|
@@ -25,6 +28,9 @@ agentlink-server stop
|
|
|
25
28
|
# Check status
|
|
26
29
|
agentlink-server status
|
|
27
30
|
|
|
31
|
+
# Upgrade to latest version
|
|
32
|
+
agentlink-server upgrade
|
|
33
|
+
|
|
28
34
|
# Auto-start on boot
|
|
29
35
|
agentlink-server service install --port 3456
|
|
30
36
|
agentlink-server service uninstall
|
|
@@ -37,8 +43,9 @@ Browser ↔ AgentLink Server ↔ AgentLink Client ↔ Claude Code
|
|
|
37
43
|
(web) (relay) (your machine) (CLI)
|
|
38
44
|
```
|
|
39
45
|
|
|
40
|
-
The server is a lightweight Express + WebSocket relay. It serves the web UI and forwards messages between the browser and the agent.
|
|
46
|
+
The server is a lightweight Express + WebSocket relay. It serves the web UI, assigns unique session URLs, and forwards encrypted messages between the browser and the agent.
|
|
41
47
|
|
|
42
48
|
## Related
|
|
43
49
|
|
|
44
50
|
- **[@agent-link/agent](https://www.npmjs.com/package/@agent-link/agent)** — Local agent CLI (install this on your dev machine)
|
|
51
|
+
- [GitHub](https://github.com/yilee/agentlink)
|
package/dist/context.d.ts
CHANGED
|
@@ -35,3 +35,14 @@ export declare const serverSecret: NonSharedBuffer;
|
|
|
35
35
|
* Generate a short, URL-safe session ID
|
|
36
36
|
*/
|
|
37
37
|
export declare function generateSessionId(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Clean up dead WebSocket connections detected by heartbeat.
|
|
40
|
+
* Terminates dead sockets, removes them from maps, pings alive ones,
|
|
41
|
+
* and notifies web clients when their agent disconnects.
|
|
42
|
+
*/
|
|
43
|
+
export declare function cleanupDeadConnections(notifyFn: (client: WebClient, msg: {
|
|
44
|
+
type: string;
|
|
45
|
+
}) => void): {
|
|
46
|
+
removedAgents: string[];
|
|
47
|
+
removedClients: string[];
|
|
48
|
+
};
|
package/dist/context.js
CHANGED
|
@@ -16,4 +16,42 @@ export const serverSecret = randomBytes(32);
|
|
|
16
16
|
export function generateSessionId() {
|
|
17
17
|
return randomBytes(12).toString('base64url');
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Clean up dead WebSocket connections detected by heartbeat.
|
|
21
|
+
* Terminates dead sockets, removes them from maps, pings alive ones,
|
|
22
|
+
* and notifies web clients when their agent disconnects.
|
|
23
|
+
*/
|
|
24
|
+
export function cleanupDeadConnections(notifyFn) {
|
|
25
|
+
const removedAgents = [];
|
|
26
|
+
const removedClients = [];
|
|
27
|
+
for (const [agentId, agent] of agents) {
|
|
28
|
+
if (!agent.isAlive) {
|
|
29
|
+
console.log(`[Heartbeat] Agent ${agent.name} timed out`);
|
|
30
|
+
agent.ws.terminate();
|
|
31
|
+
sessionToAgent.delete(agent.sessionId);
|
|
32
|
+
agents.delete(agentId);
|
|
33
|
+
removedAgents.push(agentId);
|
|
34
|
+
// Notify connected web clients that agent is gone
|
|
35
|
+
for (const [, client] of webClients) {
|
|
36
|
+
if (client.sessionId === agent.sessionId) {
|
|
37
|
+
notifyFn(client, { type: 'agent_disconnected' });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
agent.isAlive = false;
|
|
43
|
+
agent.ws.ping();
|
|
44
|
+
}
|
|
45
|
+
for (const [clientId, client] of webClients) {
|
|
46
|
+
if (!client.isAlive) {
|
|
47
|
+
client.ws.terminate();
|
|
48
|
+
webClients.delete(clientId);
|
|
49
|
+
removedClients.push(clientId);
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
client.isAlive = false;
|
|
53
|
+
client.ws.ping();
|
|
54
|
+
}
|
|
55
|
+
return { removedAgents, removedClients };
|
|
56
|
+
}
|
|
19
57
|
//# sourceMappingURL=context.js.map
|
package/dist/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AA0BrC,yCAAyC;AACzC,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAwB,CAAC;AAEtD,wCAAwC;AACxC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,EAAkB,CAAC;AAExD,oCAAoC;AACpC,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,GAAG,EAAqB,CAAC;AAOvD,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,EAA4B,CAAC;AAEhE,kFAAkF;AAClF,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,GAAG,EAAkB,CAAC;AAErD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;AAE5C;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;AAC/C,CAAC"}
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","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AM,CAAC,IAAI,UAAU,EAAE,CAAC;gBACpC,IAAI,MAAM,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,EAAE,CAAC;oBACzC,QAAQ,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC,CAAC;gBACnD,CAAC;YACH,CAAC;YACD,SAAS;QACX,CAAC;QACD,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;QACtB,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IAClB,CAAC;IAED,KAAK,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC;YACtB,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC5B,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC9B,SAAS;QACX,CAAC;QACD,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,CAAC;AAC3C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import { createServer } from 'http';
|
|
3
3
|
import { createRequire } from 'module';
|
|
4
|
-
import { WebSocketServer } from 'ws';
|
|
4
|
+
import { WebSocket, WebSocketServer } from 'ws';
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
import { dirname, join } from 'path';
|
|
7
|
-
import { agents, webClients } from './context.js';
|
|
7
|
+
import { agents, webClients, cleanupDeadConnections } from './context.js';
|
|
8
8
|
import { handleAgentConnection } from './ws-agent.js';
|
|
9
9
|
import { handleWebConnection } from './ws-client.js';
|
|
10
10
|
import { saveServerRuntimeState, clearServerRuntimeState } from './config.js';
|
|
11
|
+
import { encryptAndSend } from './encryption.js';
|
|
11
12
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
12
13
|
const require = createRequire(import.meta.url);
|
|
13
14
|
const pkg = require('../package.json');
|
|
@@ -95,24 +96,11 @@ wss.on('connection', (ws, req) => {
|
|
|
95
96
|
});
|
|
96
97
|
// Heartbeat every 30s to detect dead connections
|
|
97
98
|
setInterval(() => {
|
|
98
|
-
|
|
99
|
-
if (
|
|
100
|
-
|
|
101
|
-
agent.ws.terminate();
|
|
102
|
-
continue;
|
|
99
|
+
cleanupDeadConnections((client, msg) => {
|
|
100
|
+
if (client.ws.readyState === WebSocket.OPEN) {
|
|
101
|
+
encryptAndSend(client.ws, msg, client.sessionKey);
|
|
103
102
|
}
|
|
104
|
-
|
|
105
|
-
agent.ws.ping();
|
|
106
|
-
}
|
|
107
|
-
for (const [clientId, client] of webClients) {
|
|
108
|
-
if (!client.isAlive) {
|
|
109
|
-
client.ws.terminate();
|
|
110
|
-
webClients.delete(clientId);
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
client.isAlive = false;
|
|
114
|
-
client.ws.ping();
|
|
115
|
-
}
|
|
103
|
+
});
|
|
116
104
|
}, 30_000);
|
|
117
105
|
server.listen(PORT, () => {
|
|
118
106
|
console.log(`[AgentLink] Server listening on http://localhost:${PORT}`);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,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AAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,iCAAiC;AACjC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;AAC5C,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,GAAG,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5E,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,GAAG,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-link/server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.85",
|
|
4
4
|
"description": "AgentLink relay server",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/yilee/agentlink.git",
|
|
9
|
+
"directory": "server"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/yilee/agentlink",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/yilee/agentlink/issues"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"agentlink",
|
|
17
|
+
"claude",
|
|
18
|
+
"claude-code",
|
|
19
|
+
"relay",
|
|
20
|
+
"websocket",
|
|
21
|
+
"ai-agent"
|
|
22
|
+
],
|
|
5
23
|
"type": "module",
|
|
6
24
|
"main": "dist/index.js",
|
|
7
25
|
"types": "dist/index.d.ts",
|
|
@@ -261,6 +261,7 @@ export function createConnection(deps) {
|
|
|
261
261
|
finalizeStreamingMsg(scheduleHighlight);
|
|
262
262
|
isProcessing.value = false;
|
|
263
263
|
isCompacting.value = false;
|
|
264
|
+
toolMsgMap.clear();
|
|
264
265
|
if (msg.type === 'execution_cancelled') {
|
|
265
266
|
messages.value.push({
|
|
266
267
|
id: streaming.nextId(), role: 'system',
|