@bowmark/web 1.25.0 → 1.25.1

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
@@ -14,18 +14,6 @@
14
14
  lmstudio://add_mcp?name=bowmark&config=eyJ1cmwiOiJodHRwczovL2FwaS5ib3dtYXJrLmFpL21jcC9iYWRnZS1sbXN0dWRpbyJ9
15
15
  ```
16
16
 
17
- > **Status:** PUBLISHED · `@bowmark/web@1.0.0` on npm, 2026-08-06, alongside
18
- > `bowmark-web` and `bowmark-web-stubs` on PyPI at the same version. The plan that built it
19
- > is deleted; the reasoning is in the four
20
- > [`docs/decisions/2026-08-06-*`](../../../docs/decisions/) records and the enforceable half
21
- > is [`.claude/rules/public-types.md`](../../../.claude/rules/public-types.md). Since
22
- > 2026-09-01 the TARBALL ships compiled `dist/`, not raw `src/` — see
23
- > [`docs/decisions/2026-09-01-the-published-npm-client-ships-compiled-js.md`](../../../docs/decisions/2026-09-01-the-published-npm-client-ships-compiled-js.md).
24
- > **What would make THIS doc wrong:** the declarations moving out into a second package,
25
- > a runtime dependency landing in `package.json`, or a build step reappearing where a
26
- > CONSUMER or this MONOREPO has to run it — the one that ships is at publish time only,
27
- > in the public mirror's own CI, and neither of those two ever sees it.
28
-
29
17
  ```sh
30
18
  npm i @bowmark/web
31
19
  ```
@@ -119,6 +107,18 @@ literal gets no typechecking, so the generated types cover `session()` and `bowm
119
107
  and never this. It returns the envelope rather than throwing, because a script is
120
108
  composite: `status`, `logs` and `result` are read together.
121
109
 
110
+ **`run()` is designed for agents, not for you.** If you're writing code in your editor,
111
+ use `session()` instead. For **reading a page** — fetching and parsing HTML — use the
112
+ `read.page()` capability from within a `session()` callback:
113
+
114
+ ```ts
115
+ import { session } from "@bowmark/web";
116
+
117
+ const parsed = await session(async (bm) => {
118
+ return await bm.read.page(url); // fetches and parses the page
119
+ }, { apiKey: "bmk_…" });
120
+ ```
121
+
122
122
  ### Signing in — `login()`, `{ connection }`, and `bm.connections.*`
123
123
 
124
124
  ```ts
@@ -185,6 +185,13 @@ takes them — or set `BOWMARK_API_KEY` and `BOWMARK_API_URL`, read at CALL time
185
185
  is required**: without one the first call throws `code: "no_api_key"` and sends nothing.
186
186
  A caller header cannot displace the key.
187
187
 
188
+ ---
189
+
190
+ ## For maintainers of this package
191
+
192
+ Everything below describes how `@bowmark/web` is built, generated and published. Skip
193
+ this section unless you are changing how the SDK itself works.
194
+
188
195
  ## Internals — how this package is built, generated and published
189
196
 
190
197
  Everything above is what you need to call the library. Everything below is for someone
@@ -314,7 +321,8 @@ Why compiled at all: Node refuses to strip types out of a `.ts` file found insid
314
321
  `node_modules`, so shipping `main: src/index.ts` made plain `node app.mjs` fail with
315
322
  `ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING` for every consumer who was not already on
316
323
  `tsx`, Bun, or a bundler.
317
- [`docs/decisions/2026-09-01-the-published-npm-client-ships-compiled-js.md`](../../../docs/decisions/2026-09-01-the-published-npm-client-ships-compiled-js.md).
324
+ `docs/decisions/2026-09-01-the-published-npm-client-ships-compiled-js.md` in Bowmark's
325
+ internal engineering repo (not public).
318
326
 
319
327
  **One thing `tsc`'s declaration emit does not do on its own, and `build.mjs` does by
320
328
  hand:** `src/generated/library.d.ts` is ambient (no imports, no exports — see below) and