thinknagent 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/lib/connect.js +15 -14
  2. package/package.json +1 -1
package/lib/connect.js CHANGED
@@ -28,20 +28,21 @@ class Connection {
28
28
  }
29
29
 
30
30
  connect() {
31
- const cfg = store.read();
32
-
33
- this.socket = io(`${this.serverUrl}${NAMESPACE}`, {
34
- reconnection: true,
35
- reconnectionDelay: RECONNECT_DELAY,
36
- reconnectionAttempts: Infinity,
37
- auth: {
38
- agentId: cfg.agentId,
39
- agentToken: cfg.agentToken || null, // null = first time / pending
40
- name: cfg.name,
41
- hostname: require('os').hostname(),
42
- version: require('../package.json').version,
43
- }
44
- });
31
+ const cfg = store.read();
32
+
33
+ this.socket = io(`${this.serverUrl}${NAMESPACE}`, {
34
+ reconnection: true,
35
+ reconnectionDelay: RECONNECT_DELAY,
36
+ reconnectionAttempts: Infinity,
37
+ auth: {
38
+ agentId: cfg.agentId,
39
+ agentToken: cfg.agentToken || null,
40
+ name: cfg.name,
41
+ hostname: require('os').hostname(),
42
+ version: require('../package.json').version,
43
+ roomId: cfg.roomId || null, // ← yeh add karo
44
+ }
45
+ });
45
46
 
46
47
  this._bind();
47
48
  return this.socket;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinknagent",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "ThinkNCollab server agent — metrics, logs, alerts, shell bridge",
5
5
  "main": "lib/agent.js",
6
6
  "bin": {