@kybernesis/buzz 0.6.2 → 0.6.3

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.
@@ -24,11 +24,13 @@ async function queryRelay(relayHttpUrl, secretKey, filters) {
24
24
  ],
25
25
  content: ""
26
26
  }, secretKey);
27
+ const authTag = process.env.BUZZ_AUTH_TAG?.trim();
27
28
  const response = await fetch(url, {
28
29
  method: "POST",
29
30
  headers: {
30
31
  authorization: `Nostr ${Buffer.from(JSON.stringify(auth)).toString("base64")}`,
31
- "content-type": "application/json"
32
+ "content-type": "application/json",
33
+ ...authTag ? { "x-auth-tag": authTag } : {}
32
34
  },
33
35
  body
34
36
  });
@@ -4,5 +4,5 @@ import { createRequire as __eveCreateRequire } from "node:module";
4
4
  const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
- import { t as find_default } from "../../_chunks/find-B2f5dymb.mjs";
7
+ import { t as find_default } from "../../_chunks/find-Dww643iv.mjs";
8
8
  export { find_default as default };
package/dist/query.js CHANGED
@@ -44,11 +44,23 @@ export async function queryRelay(relayHttpUrl, secretKey, filters) {
44
44
  // than the one that signed it can arrive unauthenticated — which this relay
45
45
  // answers with an empty list rather than a refusal, so it reads as "nothing
46
46
  // here" instead of "you are not who you said you were".
47
+ /**
48
+ * The owner-attestation tag, when the workspace issues one.
49
+ *
50
+ * @remarks
51
+ * NIP-98 proves which key made the request; this proves the workspace agreed
52
+ * that key may act on someone's behalf. Some operations — owner-reviewed
53
+ * agent drafts among them — are refused without it, and the refusal names
54
+ * neither the tag nor the header, so it reads as a permissions problem with
55
+ * no obvious cause. Optional, because most of the surface never asks.
56
+ */
57
+ const authTag = process.env.BUZZ_AUTH_TAG?.trim();
47
58
  const response = await fetch(url, {
48
59
  method: "POST",
49
60
  headers: {
50
61
  authorization: `Nostr ${Buffer.from(JSON.stringify(auth)).toString("base64")}`,
51
62
  "content-type": "application/json",
63
+ ...(authTag ? { "x-auth-tag": authTag } : {}),
52
64
  },
53
65
  body,
54
66
  });
@@ -5,5 +5,5 @@ const __filename = __eveFileURLToPath(import.meta.url);
5
5
  __eveDirname(__filename);
6
6
  __eveCreateRequire(import.meta.url);
7
7
  import buzz_default from "../extension/tools/buzz.mjs";
8
- import { t as find_default } from "../_chunks/find-B2f5dymb.mjs";
8
+ import { t as find_default } from "../_chunks/find-Dww643iv.mjs";
9
9
  export { buzz_default as buzz, find_default as find };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kybernesis/buzz",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Put an eve agent in a Buzz workspace as a member: per-speaker verified identity resolved through the control plane, self-service identity linking, presence, typing and seen signals.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",