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