@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.
@@ -1871,7 +1871,7 @@ var CircuitBreaker = class {
1871
1871
  };
1872
1872
 
1873
1873
  // src/version.ts
1874
- var PACKAGE_VERSION = "0.7.82";
1874
+ var PACKAGE_VERSION = "0.7.821";
1875
1875
 
1876
1876
  // src/outbound.ts
1877
1877
  var DEFAULT_RETRY_POLICY = {
@@ -4850,75 +4850,77 @@ function profileToEntry(agent) {
4850
4850
  ...agent.avatar_url ? { avatarUrl: agent.avatar_url } : {}
4851
4851
  };
4852
4852
  }
4853
- var agentchatDirectoryAdapter = {
4854
- async self({ cfg, accountId }) {
4855
- const config = resolveAccount(cfg, accountId);
4856
- if (!config) return null;
4857
- const client = getClient({ accountId: accountId ?? "default", config });
4858
- try {
4859
- const me = await client.getMe();
4860
- return profileToEntry(me);
4861
- } catch {
4862
- return null;
4863
- }
4864
- },
4865
- async listPeers({ cfg, accountId, query, limit }) {
4866
- const config = resolveAccount(cfg, accountId);
4867
- if (!config) return [];
4868
- const q = (query ?? "").trim();
4869
- if (q.length < 2) return [];
4870
- const client = getClient({ accountId: accountId ?? "default", config });
4871
- try {
4872
- const result = await client.searchAgents(q, { limit: limit ?? 20 });
4873
- return result.agents.map(profileToEntry);
4874
- } catch {
4875
- return [];
4876
- }
4877
- },
4878
- async listPeersLive(params) {
4879
- return this.listPeers(params);
4880
- },
4881
- async listGroups({ cfg, accountId, query, limit }) {
4882
- const config = resolveAccount(cfg, accountId);
4883
- if (!config) return [];
4884
- const client = getClient({ accountId: accountId ?? "default", config });
4885
- try {
4886
- const convs = await client.listConversations();
4887
- const q = (query ?? "").trim().toLowerCase();
4888
- const groupRows = convs.filter((c) => c.type === "group");
4889
- const filtered = q ? groupRows.filter((c) => (c.group_name ?? "").toLowerCase().includes(q)) : groupRows;
4890
- const cap = limit ?? 50;
4891
- return filtered.slice(0, cap).map((c) => ({
4892
- kind: "group",
4893
- id: c.id,
4894
- name: c.group_name ?? "Untitled group",
4895
- ...c.group_avatar_url ? { avatarUrl: c.group_avatar_url } : {}
4896
- }));
4897
- } catch {
4898
- return [];
4899
- }
4900
- },
4901
- async listGroupsLive(params) {
4902
- return this.listGroups(params);
4903
- },
4904
- async listGroupMembers({ cfg, accountId, groupId, limit }) {
4905
- const config = resolveAccount(cfg, accountId);
4906
- if (!config) return [];
4907
- const client = getClient({ accountId: accountId ?? "default", config });
4908
- try {
4909
- const group = await client.getGroup(groupId);
4910
- const cap = limit ?? 256;
4911
- return group.members.slice(0, cap).map((m) => ({
4912
- kind: "user",
4913
- id: m.handle,
4914
- handle: m.handle,
4915
- name: m.display_name ?? m.handle
4916
- }));
4917
- } catch {
4918
- return [];
4919
- }
4853
+ var directorySelf = async ({ cfg, accountId }) => {
4854
+ const config = resolveAccount(cfg, accountId);
4855
+ if (!config) return null;
4856
+ const client = getClient({ accountId: accountId ?? "default", config });
4857
+ try {
4858
+ const me = await client.getMe();
4859
+ return profileToEntry(me);
4860
+ } catch {
4861
+ return null;
4920
4862
  }
4921
4863
  };
4864
+ var listPeers = async ({ cfg, accountId, query, limit }) => {
4865
+ const config = resolveAccount(cfg, accountId);
4866
+ if (!config) return [];
4867
+ const q = (query ?? "").trim();
4868
+ if (q.length < 2) return [];
4869
+ const client = getClient({ accountId: accountId ?? "default", config });
4870
+ try {
4871
+ const result = await client.searchAgents(q, { limit: limit ?? 20 });
4872
+ return result.agents.map(profileToEntry);
4873
+ } catch {
4874
+ return [];
4875
+ }
4876
+ };
4877
+ var listGroups = async ({ cfg, accountId, query, limit }) => {
4878
+ const config = resolveAccount(cfg, accountId);
4879
+ if (!config) return [];
4880
+ const client = getClient({ accountId: accountId ?? "default", config });
4881
+ try {
4882
+ const convs = await client.listConversations();
4883
+ const q = (query ?? "").trim().toLowerCase();
4884
+ const groupRows = convs.filter((c) => c.type === "group");
4885
+ const filtered = q ? groupRows.filter((c) => (c.group_name ?? "").toLowerCase().includes(q)) : groupRows;
4886
+ const cap = limit ?? 50;
4887
+ return filtered.slice(0, cap).map((c) => ({
4888
+ kind: "group",
4889
+ id: c.id,
4890
+ name: c.group_name ?? "Untitled group",
4891
+ ...c.group_avatar_url ? { avatarUrl: c.group_avatar_url } : {}
4892
+ }));
4893
+ } catch {
4894
+ return [];
4895
+ }
4896
+ };
4897
+ var listGroupMembers = async ({ cfg, accountId, groupId, limit }) => {
4898
+ const config = resolveAccount(cfg, accountId);
4899
+ if (!config) return [];
4900
+ const client = getClient({ accountId: accountId ?? "default", config });
4901
+ try {
4902
+ const group = await client.getGroup(groupId);
4903
+ const cap = limit ?? 256;
4904
+ return group.members.slice(0, cap).map((m) => ({
4905
+ kind: "user",
4906
+ id: m.handle,
4907
+ handle: m.handle,
4908
+ name: m.display_name ?? m.handle
4909
+ }));
4910
+ } catch {
4911
+ return [];
4912
+ }
4913
+ };
4914
+ var agentchatDirectoryAdapter = {
4915
+ self: directorySelf,
4916
+ listPeers,
4917
+ // `*Live` are literal aliases of the base impls — never `this.listPeers!`,
4918
+ // which breaks when the runtime forwards the method detached.
4919
+ listPeersLive: listPeers,
4920
+ listGroups,
4921
+ listGroupsLive: listGroups,
4922
+ listGroupMembers
4923
+ };
4922
4924
 
4923
4925
  // src/binding/resolver.ts
4924
4926
  function resolveAccount2(cfg, accountId) {