@bowmark/web 1.20.0 → 1.22.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/README.md CHANGED
@@ -30,6 +30,20 @@ lmstudio://add_mcp?name=bowmark&config=eyJ1cmwiOiJodHRwczovL2FwaS5ib3dtYXJrLmFpL
30
30
  npm i @bowmark/web
31
31
  ```
32
32
 
33
+ **You need an API key.** Sign up at https://bowmark.ai/sign-up, create a key at
34
+ https://bowmark.ai/dashboard/keys, and pass it in:
35
+
36
+ ```ts
37
+ import { session } from "@bowmark/web";
38
+
39
+ const total = await session(async (bm) => (await bm.music.search("aphex twin")).length, {
40
+ apiKey: "bmk_…", // or set BOWMARK_API_KEY and omit this
41
+ });
42
+ ```
43
+
44
+ A client with no key throws `BowmarkError` with `code: "no_api_key"` on its first call,
45
+ before anything is sent.
46
+
33
47
  **There is a Python client too**, from this same directory tree and the same generated
34
48
  surface: `pip install bowmark-web bowmark-web-stubs`
35
49
  ([`../python/README.md`](../python/README.md)). One `LibraryManifest` produces the
@@ -120,10 +134,10 @@ an agent that reads a failure retries, and retrying a login halt buys the same h
120
134
 
121
135
  ### Configuration
122
136
 
123
- `BOWMARK_API_KEY` and `BOWMARK_API_URL`, read at CALL time, or passed explicitly as
124
- `{ apiKey, baseUrl, fetch, headers, signal, onLog }`. A caller header cannot displace
125
- the key. Anonymous is legal every browserless capability works without one, on a
126
- smaller daily budget.
137
+ Pass `{ apiKey, baseUrl, fetch, headers, signal, onLog }` explicitly — every entry point
138
+ takes them or set `BOWMARK_API_KEY` and `BOWMARK_API_URL`, read at CALL time. **The key
139
+ is required**: without one the first call throws `code: "no_api_key"` and sends nothing.
140
+ A caller header cannot displace the key.
127
141
 
128
142
  ## The two halves, and why they are split
129
143