From 35d09e237929a904fbf680b544860c49f8f38226 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 14:10:40 +0000 Subject: [PATCH 1/2] docs(ai): update quickstart and contributing (agent) Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- README.md | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 91d96ca8..66eb7f5c 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,16 @@ To run **bitvid** locally: _(Note: The default port is 3000, but `npx serve` may select a different port if 3000 is in use. Check your terminal output.)_ - _Note: If you prefer manual steps, you can run `npm run build` followed by `npx serve dist`._ + _Note: If you prefer manual steps, you can run `npm run build` followed by `npx serve dist` (or `cd dist && python3 -m http.server`)._ + +5. Verify setup: + + Run tests and linting to ensure everything is working correctly. + + ```bash + npm run test:unit + npm run format + ``` #### Quick Reference @@ -257,7 +266,7 @@ const event = buildVideoPostEvent({ console.log("Event constructed:", event); -// 2. Publish using the high-level client (requires browser/extension or active signer) +// 2. Publish the event (requires browser/extension or active signer) /* import { nostrClient } from "./js/nostrClientFacade.js"; @@ -265,14 +274,10 @@ import { nostrClient } from "./js/nostrClientFacade.js"; await nostrClient.init(); // Login (prompts NIP-07 extension) -await nostrClient.login(); +await nostrClient.loginWithExtension(); -// Publish! (Handles signing and relay broadcasting) -await nostrClient.publishVideo({ - title: "My First Video", - url: "https://example.com/video.mp4", - description: "Published via bitvid SDK" -}, nostrClient.pubkey); +// Publish the built event +await nostrClient.signAndPublishEvent(event); */ ``` From f2002b66c21d249d1e7d02c50b7ed0d78c349a6f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 14:17:44 +0000 Subject: [PATCH 2/2] fix(test): update client count resilience test to access unreachableRelays via connectionManager Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- tests/unit/client-count-resilience.test.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/client-count-resilience.test.mjs b/tests/unit/client-count-resilience.test.mjs index 41ccb679..5fc6f34a 100644 --- a/tests/unit/client-count-resilience.test.mjs +++ b/tests/unit/client-count-resilience.test.mjs @@ -39,7 +39,7 @@ test("NostrClient resilience to COUNT timeouts", async (t) => { client.getRequestTimeoutMs = () => 10; // 10ms timeout // Verify initial state - assert.strictEqual(client.unreachableRelays.has(relayUrl), false); + assert.strictEqual(client.connectionManager.unreachableRelays.has(relayUrl), false); // Trigger the count await client.countEventsAcrossRelays([{ kinds: [1] }]); @@ -51,7 +51,7 @@ test("NostrClient resilience to COUNT timeouts", async (t) => { // 3. countEventsAcrossRelays catches 'count-timeout' // 4. currently calls markRelayUnreachable - const isUnreachable = client.unreachableRelays.has(relayUrl); + const isUnreachable = client.connectionManager.unreachableRelays.has(relayUrl); assert.strictEqual(isUnreachable, false, "Relay should NOT be marked unreachable after count timeout"); });