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