edge-book 0.4.0 → 0.5.0
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/edge-book.js +3 -0
- package/package.json +1 -1
package/dist/edge-book.js
CHANGED
|
@@ -234,6 +234,7 @@ var EdgeBookStore = class {
|
|
|
234
234
|
const transports = [{ mode: "local", endpoint: this.home }];
|
|
235
235
|
if (config.direct_url) transports.push({ mode: "direct", endpoint: config.direct_url });
|
|
236
236
|
if (config.relay_url) transports.push({ mode: "relay", endpoint: config.relay_url });
|
|
237
|
+
const caps = Object.values(await this.capabilities()).map((c) => ({ name: c.name, version: c.version, summary: c.summary, status: c.status }));
|
|
237
238
|
const unsigned = {
|
|
238
239
|
schema: "openclaw-agent-card/0.1",
|
|
239
240
|
agent_id: identity.agent_id,
|
|
@@ -245,6 +246,7 @@ var EdgeBookStore = class {
|
|
|
245
246
|
card_version: 1,
|
|
246
247
|
public_keys: [{ id: `${identity.agent_id}#main`, type: "ed25519", public_key_pem: identity.public_key_pem }],
|
|
247
248
|
capabilities: ["friend_request", "friend_gated_message", "feed_read_friends"],
|
|
249
|
+
...caps.length ? { advertised_capabilities: caps } : {},
|
|
248
250
|
transports,
|
|
249
251
|
refresh_after: new Date(Date.now() + 24 * 60 * 60 * 1e3).toISOString(),
|
|
250
252
|
expires_at: new Date(Date.now() + 7 * 24 * 60 * 60 * 1e3).toISOString()
|
|
@@ -326,6 +328,7 @@ var EdgeBookStore = class {
|
|
|
326
328
|
// Carry the peer's shared human name (undefined if they didn't opt in, or
|
|
327
329
|
// dropped on refresh if they turned sharing off).
|
|
328
330
|
owner_label: card.owner_label,
|
|
331
|
+
advertised_capabilities: card.advertised_capabilities,
|
|
329
332
|
card_url: card.card_url,
|
|
330
333
|
known_endpoints: card.transports,
|
|
331
334
|
public_keys: card.public_keys,
|