@agentchatme/openclaw 0.7.82 → 0.7.821

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.
@@ -1898,7 +1898,7 @@ var CircuitBreaker = class {
1898
1898
  };
1899
1899
 
1900
1900
  // src/version.ts
1901
- var PACKAGE_VERSION = "0.7.82";
1901
+ var PACKAGE_VERSION = "0.7.821";
1902
1902
 
1903
1903
  // src/outbound.ts
1904
1904
  var DEFAULT_RETRY_POLICY = {
@@ -4877,75 +4877,77 @@ function profileToEntry(agent) {
4877
4877
  ...agent.avatar_url ? { avatarUrl: agent.avatar_url } : {}
4878
4878
  };
4879
4879
  }
4880
- var agentchatDirectoryAdapter = {
4881
- async self({ cfg, accountId }) {
4882
- const config = resolveAccount(cfg, accountId);
4883
- if (!config) return null;
4884
- const client = getClient({ accountId: accountId ?? "default", config });
4885
- try {
4886
- const me = await client.getMe();
4887
- return profileToEntry(me);
4888
- } catch {
4889
- return null;
4890
- }
4891
- },
4892
- async listPeers({ cfg, accountId, query, limit }) {
4893
- const config = resolveAccount(cfg, accountId);
4894
- if (!config) return [];
4895
- const q = (query ?? "").trim();
4896
- if (q.length < 2) return [];
4897
- const client = getClient({ accountId: accountId ?? "default", config });
4898
- try {
4899
- const result = await client.searchAgents(q, { limit: limit ?? 20 });
4900
- return result.agents.map(profileToEntry);
4901
- } catch {
4902
- return [];
4903
- }
4904
- },
4905
- async listPeersLive(params) {
4906
- return this.listPeers(params);
4907
- },
4908
- async listGroups({ cfg, accountId, query, limit }) {
4909
- const config = resolveAccount(cfg, accountId);
4910
- if (!config) return [];
4911
- const client = getClient({ accountId: accountId ?? "default", config });
4912
- try {
4913
- const convs = await client.listConversations();
4914
- const q = (query ?? "").trim().toLowerCase();
4915
- const groupRows = convs.filter((c) => c.type === "group");
4916
- const filtered = q ? groupRows.filter((c) => (c.group_name ?? "").toLowerCase().includes(q)) : groupRows;
4917
- const cap = limit ?? 50;
4918
- return filtered.slice(0, cap).map((c) => ({
4919
- kind: "group",
4920
- id: c.id,
4921
- name: c.group_name ?? "Untitled group",
4922
- ...c.group_avatar_url ? { avatarUrl: c.group_avatar_url } : {}
4923
- }));
4924
- } catch {
4925
- return [];
4926
- }
4927
- },
4928
- async listGroupsLive(params) {
4929
- return this.listGroups(params);
4930
- },
4931
- async listGroupMembers({ cfg, accountId, groupId, limit }) {
4932
- const config = resolveAccount(cfg, accountId);
4933
- if (!config) return [];
4934
- const client = getClient({ accountId: accountId ?? "default", config });
4935
- try {
4936
- const group = await client.getGroup(groupId);
4937
- const cap = limit ?? 256;
4938
- return group.members.slice(0, cap).map((m) => ({
4939
- kind: "user",
4940
- id: m.handle,
4941
- handle: m.handle,
4942
- name: m.display_name ?? m.handle
4943
- }));
4944
- } catch {
4945
- return [];
4946
- }
4880
+ var directorySelf = async ({ cfg, accountId }) => {
4881
+ const config = resolveAccount(cfg, accountId);
4882
+ if (!config) return null;
4883
+ const client = getClient({ accountId: accountId ?? "default", config });
4884
+ try {
4885
+ const me = await client.getMe();
4886
+ return profileToEntry(me);
4887
+ } catch {
4888
+ return null;
4947
4889
  }
4948
4890
  };
4891
+ var listPeers = async ({ cfg, accountId, query, limit }) => {
4892
+ const config = resolveAccount(cfg, accountId);
4893
+ if (!config) return [];
4894
+ const q = (query ?? "").trim();
4895
+ if (q.length < 2) return [];
4896
+ const client = getClient({ accountId: accountId ?? "default", config });
4897
+ try {
4898
+ const result = await client.searchAgents(q, { limit: limit ?? 20 });
4899
+ return result.agents.map(profileToEntry);
4900
+ } catch {
4901
+ return [];
4902
+ }
4903
+ };
4904
+ var listGroups = async ({ cfg, accountId, query, limit }) => {
4905
+ const config = resolveAccount(cfg, accountId);
4906
+ if (!config) return [];
4907
+ const client = getClient({ accountId: accountId ?? "default", config });
4908
+ try {
4909
+ const convs = await client.listConversations();
4910
+ const q = (query ?? "").trim().toLowerCase();
4911
+ const groupRows = convs.filter((c) => c.type === "group");
4912
+ const filtered = q ? groupRows.filter((c) => (c.group_name ?? "").toLowerCase().includes(q)) : groupRows;
4913
+ const cap = limit ?? 50;
4914
+ return filtered.slice(0, cap).map((c) => ({
4915
+ kind: "group",
4916
+ id: c.id,
4917
+ name: c.group_name ?? "Untitled group",
4918
+ ...c.group_avatar_url ? { avatarUrl: c.group_avatar_url } : {}
4919
+ }));
4920
+ } catch {
4921
+ return [];
4922
+ }
4923
+ };
4924
+ var listGroupMembers = async ({ cfg, accountId, groupId, limit }) => {
4925
+ const config = resolveAccount(cfg, accountId);
4926
+ if (!config) return [];
4927
+ const client = getClient({ accountId: accountId ?? "default", config });
4928
+ try {
4929
+ const group = await client.getGroup(groupId);
4930
+ const cap = limit ?? 256;
4931
+ return group.members.slice(0, cap).map((m) => ({
4932
+ kind: "user",
4933
+ id: m.handle,
4934
+ handle: m.handle,
4935
+ name: m.display_name ?? m.handle
4936
+ }));
4937
+ } catch {
4938
+ return [];
4939
+ }
4940
+ };
4941
+ var agentchatDirectoryAdapter = {
4942
+ self: directorySelf,
4943
+ listPeers,
4944
+ // `*Live` are literal aliases of the base impls — never `this.listPeers!`,
4945
+ // which breaks when the runtime forwards the method detached.
4946
+ listPeersLive: listPeers,
4947
+ listGroups,
4948
+ listGroupsLive: listGroups,
4949
+ listGroupMembers
4950
+ };
4949
4951
 
4950
4952
  // src/binding/resolver.ts
4951
4953
  function resolveAccount2(cfg, accountId) {