multiclaws 0.3.3 → 0.3.4

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/index.js CHANGED
@@ -193,7 +193,7 @@ function createTools(getService) {
193
193
  };
194
194
  const multiclawsTeamMembers = {
195
195
  name: "multiclaws_team_members",
196
- description: "List all members of a team.",
196
+ description: "List all members of a team. If teamId is omitted, returns all teams and their members.",
197
197
  parameters: {
198
198
  type: "object",
199
199
  additionalProperties: false,
@@ -73,6 +73,11 @@ export declare class MulticlawsService extends EventEmitter {
73
73
  listTeamMembers(teamId?: string): Promise<{
74
74
  team: TeamRecord;
75
75
  members: TeamMember[];
76
+ } | {
77
+ teams: Array<{
78
+ team: TeamRecord;
79
+ members: TeamMember[];
80
+ }>;
76
81
  } | null>;
77
82
  private mountTeamRoutes;
78
83
  private broadcastProfileToTeams;
@@ -385,12 +385,18 @@ class MulticlawsService extends node_events_1.EventEmitter {
385
385
  this.log("info", `left team ${team.teamId}`);
386
386
  }
387
387
  async listTeamMembers(teamId) {
388
- const team = teamId
389
- ? await this.teamStore.getTeam(teamId)
390
- : await this.teamStore.getFirstTeam();
391
- if (!team)
388
+ if (teamId) {
389
+ const team = await this.teamStore.getTeam(teamId);
390
+ if (!team)
391
+ return null;
392
+ return { team, members: team.members };
393
+ }
394
+ const all = await this.teamStore.listTeams();
395
+ if (all.length === 0)
392
396
  return null;
393
- return { team, members: team.members };
397
+ if (all.length === 1)
398
+ return { team: all[0], members: all[0].members };
399
+ return { teams: all.map((team) => ({ team, members: team.members })) };
394
400
  }
395
401
  /* ---------------------------------------------------------------- */
396
402
  /* Team REST routes */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "multiclaws",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "MultiClaws plugin for OpenClaw collaboration via A2A protocol",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",