@meet-ai/cli 0.0.5 → 0.0.7

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/dist/index.js +39 -3
  2. package/package.json +23 -22
package/dist/index.js CHANGED
@@ -127,10 +127,15 @@ function createClient(baseUrl, apiKey) {
127
127
  const ws = new WebSocket(`${wsUrl}/api/rooms/${roomId}/ws${tokenParam}`);
128
128
  const connectTimeout = setTimeout(() => {
129
129
  if (ws.readyState !== WebSocket.OPEN) {
130
- wsLog({ event: "timeout", after_ms: 1e4 });
131
- ws.close(4000, "connect timeout");
130
+ wsLog({ event: "timeout", after_ms: 30000 });
131
+ try {
132
+ ws.close(4000, "connect timeout");
133
+ } catch {}
134
+ const delay = getReconnectDelay();
135
+ wsLog({ event: "reconnecting", attempt: reconnectAttempt, delay_ms: Math.round(delay) });
136
+ setTimeout(connect, delay);
132
137
  }
133
- }, 1e4);
138
+ }, 30000);
134
139
  ws.onopen = async () => {
135
140
  clearTimeout(connectTimeout);
136
141
  const wasReconnect = reconnectAttempt > 0;
@@ -180,6 +185,20 @@ function createClient(baseUrl, apiKey) {
180
185
  }
181
186
  return connect();
182
187
  },
188
+ async sendTeamInfo(roomId, payload) {
189
+ return withRetry(async () => {
190
+ const res = await fetch(`${baseUrl}/api/rooms/${roomId}/team-info`, {
191
+ method: "POST",
192
+ headers: headers(),
193
+ body: payload
194
+ });
195
+ if (!res.ok) {
196
+ const err = await res.json().catch(() => ({}));
197
+ throw new Error(err.error ?? `HTTP ${res.status}`);
198
+ }
199
+ return res.text();
200
+ });
201
+ },
183
202
  async generateKey() {
184
203
  const res = await fetch(`${baseUrl}/api/keys`, {
185
204
  method: "POST",
@@ -374,6 +393,22 @@ switch (command) {
374
393
  process.on("SIGTERM", shutdown);
375
394
  break;
376
395
  }
396
+ case "send-team-info": {
397
+ const [tiRoomId, tiPayload] = args;
398
+ if (!tiRoomId || !tiPayload) {
399
+ console.error("Usage: cli send-team-info <roomId> '<json-payload>'");
400
+ process.exit(1);
401
+ }
402
+ try {
403
+ JSON.parse(tiPayload);
404
+ } catch {
405
+ console.error("Error: payload must be valid JSON");
406
+ process.exit(1);
407
+ }
408
+ await client.sendTeamInfo(tiRoomId, tiPayload);
409
+ console.log("Team info sent");
410
+ break;
411
+ }
377
412
  case "generate-key": {
378
413
  const result = await client.generateKey();
379
414
  console.log(`API Key: ${result.key}`);
@@ -400,5 +435,6 @@ Commands:
400
435
  --sender-type <type> Filter by sender_type (human|agent)
401
436
  --team <name> Write to Claude Code team inbox
402
437
  --inbox <agent> Target agent inbox (requires --team)
438
+ send-team-info <roomId> '<json>' Send team info to a room
403
439
  generate-key Generate a new API key`);
404
440
  }
package/package.json CHANGED
@@ -1,42 +1,43 @@
1
1
  {
2
2
  "name": "@meet-ai/cli",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "CLI for meet-ai chat rooms — create rooms, send messages, and stream via WebSocket",
5
- "type": "module",
5
+ "keywords": [
6
+ "chat",
7
+ "cli",
8
+ "meet-ai",
9
+ "real-time",
10
+ "websocket"
11
+ ],
12
+ "license": "MIT",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/SoftWare-A-G/meet-ai",
16
+ "directory": "packages/cli"
17
+ },
6
18
  "bin": {
7
19
  "meet-ai": "./dist/index.js"
8
20
  },
21
+ "files": [
22
+ "dist"
23
+ ],
24
+ "type": "module",
9
25
  "main": "./dist/index.js",
10
26
  "exports": {
11
27
  ".": "./dist/index.js"
12
28
  },
13
- "files": [
14
- "dist"
15
- ],
16
29
  "scripts": {
17
30
  "start": "bun run src/index.ts",
18
31
  "build": "bun build src/index.ts --outdir dist --target node --format esm",
19
32
  "prepublishOnly": "bun run build",
20
- "test": "bun test"
33
+ "test": "bun test",
34
+ "typecheck": "tsc --noEmit"
21
35
  },
22
- "keywords": [
23
- "meet-ai",
24
- "cli",
25
- "chat",
26
- "websocket",
27
- "real-time"
28
- ],
29
- "license": "MIT",
30
- "repository": {
31
- "type": "git",
32
- "url": "https://github.com/SoftWare-A-G/meet-ai",
33
- "directory": "packages/cli"
36
+ "devDependencies": {
37
+ "@types/node": "25.0.10",
38
+ "typescript": "5.9.3"
34
39
  },
35
40
  "engines": {
36
41
  "node": ">=22"
37
- },
38
- "devDependencies": {
39
- "@types/node": "^22.0.0",
40
- "typescript": "5.9.3"
41
42
  }
42
43
  }