@meet-ai/cli 0.0.11 → 0.0.12

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 +9 -44
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -227,7 +227,8 @@ function createClient(baseUrl, apiKey) {
227
227
  });
228
228
  if (!res.ok) {
229
229
  const err = await res.json().catch(() => ({}));
230
- throw new Error(err.error ?? `HTTP ${res.status}`);
230
+ const msg = err.error;
231
+ throw new Error(typeof msg === "string" ? msg : msg ? JSON.stringify(msg) : `HTTP ${res.status}`);
231
232
  }
232
233
  return res.text();
233
234
  });
@@ -688,57 +689,22 @@ switch (command) {
688
689
  }
689
690
  case "send-team-info": {
690
691
  if (args.includes("--help")) {
691
- console.log(`Usage: meet-ai send-team-info <roomId> '<json>' [--team-name <name>]
692
-
693
- Accepts two JSON formats:
694
-
695
- 1. Full format (passed through as-is):
696
- '{"team_name":"my-team","members":[{"name":"agent1","role":"dev","status":"active","color":"#fff","model":"opus","joinedAt":1234567890}]}'
697
-
698
- 2. Members-only array (requires --team-name):
699
- '[{"name":"agent1","role":"dev","status":"active","color":"#fff"}]' --team-name my-team
700
-
701
- Missing fields get defaults: model="claude-opus-4-6", joinedAt=<now>`);
692
+ console.log("Usage: meet-ai send-team-info <roomId> '<json>'");
702
693
  process.exit(0);
703
694
  }
704
- const { positional: tiPos, flags: tiFlags } = parseFlags(args);
705
- rejectFlagLikeArgs(tiPos, "meet-ai send-team-info <roomId> '<json>' [--team-name <name>]");
706
- const [tiRoomId, tiPayload] = tiPos;
695
+ rejectFlagLikeArgs(args, "meet-ai send-team-info <roomId> '<json>'");
696
+ const [tiRoomId, tiPayload] = args;
707
697
  if (!tiRoomId || !tiPayload) {
708
- console.error("Usage: meet-ai send-team-info <roomId> '<json>' [--team-name <name>]");
698
+ console.error("Usage: meet-ai send-team-info <roomId> '<json>'");
709
699
  process.exit(1);
710
700
  }
711
- let tiParsed;
712
701
  try {
713
- tiParsed = JSON.parse(tiPayload);
702
+ JSON.parse(tiPayload);
714
703
  } catch {
715
704
  console.error("Error: payload must be valid JSON");
716
705
  process.exit(1);
717
706
  }
718
- let tiBody;
719
- if (Array.isArray(tiParsed)) {
720
- const teamName = tiFlags["team-name"];
721
- if (!teamName) {
722
- console.error("Error: when passing a members array, --team-name is required");
723
- console.error("Usage: meet-ai send-team-info <roomId> '[...]' --team-name <name>");
724
- process.exit(1);
725
- }
726
- const now = Date.now();
727
- tiBody = {
728
- team_name: teamName,
729
- members: tiParsed.map((m) => ({
730
- model: "claude-opus-4-6",
731
- joinedAt: now,
732
- ...m
733
- }))
734
- };
735
- } else if (tiParsed && typeof tiParsed === "object" && "team_name" in tiParsed && "members" in tiParsed) {
736
- tiBody = tiParsed;
737
- } else {
738
- console.error("Error: JSON must be either a members array or an object with { team_name, members }");
739
- process.exit(1);
740
- }
741
- await client.sendTeamInfo(tiRoomId, JSON.stringify(tiBody));
707
+ await client.sendTeamInfo(tiRoomId, tiPayload);
742
708
  console.log("Team info sent");
743
709
  break;
744
710
  }
@@ -844,8 +810,7 @@ Commands:
844
810
  --team <name> Write to Claude Code team inbox
845
811
  --inbox <agent> Target agent inbox (requires --team)
846
812
  download-attachment <attachmentId> Download an attachment to /tmp
847
- send-team-info <roomId> '<json>' [options] Send team info to a room
848
- --team-name <name> Team name (required when passing members array)
813
+ send-team-info <roomId> '<json>' Send team info to a room
849
814
  send-tasks <roomId> '<json>' Send tasks info to a room
850
815
  generate-key Generate a new API key`);
851
816
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meet-ai/cli",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "CLI for meet-ai chat rooms — create rooms, send messages, and stream via WebSocket",
5
5
  "keywords": [
6
6
  "chat",