@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 +18 -4
- package/dist/generated/library.d.ts +855 -16
- package/dist/generated/validators.js +875 -4
- package/dist/transport.d.ts +16 -2
- package/dist/transport.js +12 -2
- package/package.json +1 -1
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
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
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
|
|