@bowmark/web 1.25.1 → 1.25.2
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 +30 -19
- package/dist/generated/library.d.ts +1493 -78
- package/dist/generated/validators.js +1705 -31
- package/dist/session.js +34 -11
- package/package.json +1 -1
package/dist/session.js
CHANGED
|
@@ -111,25 +111,48 @@ function connectionsApi(client) {
|
|
|
111
111
|
update: (id, patch) => updateConnection(client, id, patch),
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
/** `get_library`
|
|
114
|
+
/** `get_library` and `report` are real, and neither is here.
|
|
115
115
|
*
|
|
116
|
-
*
|
|
117
|
-
* package — so `bowmark.get_library({ query })` raises the bad-path error
|
|
118
|
-
* and, until 2026-09-19, said nothing about where the thing actually
|
|
119
|
-
* newcomer who hit it read an 88,000-line generated `.d.ts` by hand
|
|
116
|
+
* `get_library` is an MCP tool and `GET /v1/library?query=`, never an export of
|
|
117
|
+
* this package — so `bowmark.get_library({ query })` raises the bad-path error
|
|
118
|
+
* above and, until 2026-09-19, said nothing about where the thing actually
|
|
119
|
+
* lives. A newcomer who hit it read an 88,000-line generated `.d.ts` by hand
|
|
120
|
+
* instead.
|
|
121
|
+
*
|
|
122
|
+
* `report` is an MCP tool ONLY — the third one, alongside `get_library` and
|
|
123
|
+
* `run` — with no HTTP route and no SDK method at all. `bowmark.report({ report
|
|
124
|
+
* })` raises the same bad-path error and, until this fix, said nothing about
|
|
125
|
+
* that either.
|
|
120
126
|
*
|
|
121
127
|
* A LOCAL COPY on purpose: this package has zero runtime dependencies,
|
|
122
128
|
* deliberately and permanently, so it cannot import `OTHER_CHANNEL` from
|
|
123
129
|
* `@bowmark/runtime`. `tests/unit/other-channel-hint.test.ts` holds the three
|
|
124
130
|
* copies (here, the Python client, the runtime) to the same names.
|
|
125
|
-
* `agents/richard/problems/newcomer-get-library-shown-as-callable-in-own-code.md
|
|
126
|
-
|
|
131
|
+
* `agents/richard/problems/newcomer-get-library-shown-as-callable-in-own-code.md`,
|
|
132
|
+
* `agents/richard/problems/newcomer-report-global-not-defined.md`. */
|
|
133
|
+
// A Map, not an object literal — biome's `useLiteralKeys` strips the quotes off an
|
|
134
|
+
// object property key, and `tests/unit/other-channel-hint.test.ts` greps this file
|
|
135
|
+
// for the quoted name literally. An array-literal key is immune to that rewrite.
|
|
136
|
+
const OTHER_CHANNEL = new Map([
|
|
137
|
+
[
|
|
138
|
+
"get_library",
|
|
139
|
+
" — `get_library` is a DISCOVERY channel, not something this package exports: it is an MCP " +
|
|
140
|
+
"tool your agent calls directly, and `GET /v1/library?query=…` over HTTP with your " +
|
|
141
|
+
"`BOWMARK_API_KEY`. Read the library BEFORE you write the call, then call what you came for.",
|
|
142
|
+
],
|
|
143
|
+
[
|
|
144
|
+
"report",
|
|
145
|
+
" — `report` is an MCP tool ONLY, not something this package exports: it is the third tool " +
|
|
146
|
+
"your agent calls directly (`get_library`, `run`, `report`). There is no HTTP route and no " +
|
|
147
|
+
"SDK method for it. An empty or unmatched `get_library` result is already counted as demand " +
|
|
148
|
+
"automatically.",
|
|
149
|
+
],
|
|
150
|
+
]);
|
|
151
|
+
OTHER_CHANNEL.set("getLibrary", OTHER_CHANNEL.get("get_library"));
|
|
127
152
|
function otherChannelSuffix(first) {
|
|
128
|
-
if (first === undefined
|
|
153
|
+
if (first === undefined)
|
|
129
154
|
return "";
|
|
130
|
-
return (
|
|
131
|
-
"tool your agent calls directly, and `GET /v1/library?query=…` over HTTP with your " +
|
|
132
|
-
"`BOWMARK_API_KEY`. Read the library BEFORE you write the call, then call what you came for.");
|
|
155
|
+
return OTHER_CHANNEL.get(first) ?? "";
|
|
133
156
|
}
|
|
134
157
|
/** One dispatch: validate the path, refuse a non-wire argument, then send it. */
|
|
135
158
|
function dispatchThrough(send) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bowmark/web",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The public client for the Bowmark capability library — real TypeScript for the whole bowmark.* surface, with no Bowmark source on the caller's disk. ZERO runtime dependencies, deliberately and permanently.",
|
|
6
6
|
"license": "MIT",
|