@giselles-ai/browser-tool 0.1.25 → 0.1.27
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/dist/mcp-server/index.js +22 -0
- package/package.json +1 -1
package/dist/mcp-server/index.js
CHANGED
|
@@ -188,12 +188,29 @@ var RelayClient = class {
|
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
190
|
const body = await response.json().catch(() => null);
|
|
191
|
+
console.error("[relay-client] dispatch response", {
|
|
192
|
+
url: this.url,
|
|
193
|
+
status: response.status,
|
|
194
|
+
ok: response.ok,
|
|
195
|
+
body
|
|
196
|
+
});
|
|
191
197
|
const failure = dispatchErrorSchema.safeParse(body);
|
|
192
198
|
if (failure.success) {
|
|
199
|
+
console.error("[relay-client] dispatch failure payload", {
|
|
200
|
+
url: this.url,
|
|
201
|
+
status: response.status,
|
|
202
|
+
errorCode: failure.data.errorCode,
|
|
203
|
+
message: failure.data.message
|
|
204
|
+
});
|
|
193
205
|
throw new Error(`[${failure.data.errorCode}] ${failure.data.message}`);
|
|
194
206
|
}
|
|
195
207
|
const success = dispatchSuccessSchema.safeParse(body);
|
|
196
208
|
if (!success.success) {
|
|
209
|
+
console.error("[relay-client] dispatch invalid payload", {
|
|
210
|
+
url: this.url,
|
|
211
|
+
status: response.status,
|
|
212
|
+
body
|
|
213
|
+
});
|
|
197
214
|
throw new Error(
|
|
198
215
|
[
|
|
199
216
|
"Relay dispatch returned an unexpected payload.",
|
|
@@ -204,6 +221,11 @@ var RelayClient = class {
|
|
|
204
221
|
);
|
|
205
222
|
}
|
|
206
223
|
if (!response.ok) {
|
|
224
|
+
console.error("[relay-client] dispatch non-ok response", {
|
|
225
|
+
url: this.url,
|
|
226
|
+
status: response.status,
|
|
227
|
+
body
|
|
228
|
+
});
|
|
207
229
|
throw new Error(`Relay dispatch failed with HTTP ${response.status}.`);
|
|
208
230
|
}
|
|
209
231
|
const parsedResponse = relayResponseSchema.parse(success.data.response);
|