escobar 0.1.88__py3-none-any.whl → 0.1.89__py3-none-any.whl
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.
- escobar/_version.py +1 -1
- escobar/handlers.py +62 -6
- escobar/labextension/package.json +2 -2
- escobar/labextension/schemas/escobar/package.json.orig +1 -1
- escobar/labextension/static/{237.7cdcf9d22d73d4d1125c.js → 237.23439249688997c395a8.js} +1 -1
- escobar/labextension/static/{remoteEntry.9cac46200eb4dafe68a5.js → remoteEntry.a8ae0b901c4a30b269e4.js} +1 -1
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/package.json +2 -2
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/schemas/escobar/package.json.orig +1 -1
- escobar-0.1.88.data/data/share/jupyter/labextensions/escobar/static/237.7cdcf9d22d73d4d1125c.js → escobar-0.1.89.data/data/share/jupyter/labextensions/escobar/static/237.23439249688997c395a8.js +1 -1
- escobar-0.1.88.data/data/share/jupyter/labextensions/escobar/static/remoteEntry.9cac46200eb4dafe68a5.js → escobar-0.1.89.data/data/share/jupyter/labextensions/escobar/static/remoteEntry.a8ae0b901c4a30b269e4.js +1 -1
- {escobar-0.1.88.dist-info → escobar-0.1.89.dist-info}/METADATA +1 -1
- {escobar-0.1.88.dist-info → escobar-0.1.89.dist-info}/RECORD +27 -27
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/install.json +0 -0
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/schemas/escobar/plugin.json +0 -0
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/static/304.bf7e91be734e5b36cdc9.js +0 -0
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/static/346.8a1e61ca6789b6fddfa7.js +0 -0
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/static/379.40dd59dc19d4a6b42d25.js +0 -0
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/static/57.17e53b4b9a954f39c4d8.js +0 -0
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/static/648.a7d314faeacc762d891d.js +0 -0
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/static/666.3bc65aac3a3be183ee19.js +0 -0
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/static/874.c539726f31a1baa0267e.js +0 -0
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/static/986.cbcf9d7c1cd8d06be435.js +0 -0
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/static/style.js +0 -0
- {escobar-0.1.88.data → escobar-0.1.89.data}/data/share/jupyter/labextensions/escobar/static/third-party-licenses.json +0 -0
- {escobar-0.1.88.dist-info → escobar-0.1.89.dist-info}/WHEEL +0 -0
- {escobar-0.1.88.dist-info → escobar-0.1.89.dist-info}/entry_points.txt +0 -0
- {escobar-0.1.88.dist-info → escobar-0.1.89.dist-info}/licenses/LICENSE +0 -0
escobar/_version.py
CHANGED
escobar/handlers.py
CHANGED
@@ -383,18 +383,74 @@ class WebSocketProxyHandler(tornado.websocket.WebSocketHandler):
|
|
383
383
|
print(f"[ESCOBAR-WS] Is closing: {self.is_closing}")
|
384
384
|
|
385
385
|
if self.target_ws and not self.is_closing:
|
386
|
+
# Enhanced debugging before forwarding
|
387
|
+
print(f"[ESCOBAR-WS] === PRE-FORWARD DIAGNOSTICS ===")
|
388
|
+
print(f"[ESCOBAR-WS] Target WS type: {type(self.target_ws)}")
|
389
|
+
print(f"[ESCOBAR-WS] Target WS state: {getattr(self.target_ws, 'state', 'NO_STATE_ATTR')}")
|
390
|
+
|
391
|
+
# Check if connection is actually open
|
392
|
+
try:
|
393
|
+
is_open = self.target_ws.state.name == 'OPEN'
|
394
|
+
print(f"[ESCOBAR-WS] Target WS is OPEN: {is_open}")
|
395
|
+
except AttributeError:
|
396
|
+
print(f"[ESCOBAR-WS] Cannot check target WS state - no state attribute")
|
397
|
+
is_open = True # Assume open and let send() fail with proper error
|
398
|
+
|
399
|
+
# Check connection properties
|
400
|
+
try:
|
401
|
+
print(f"[ESCOBAR-WS] Target WS closed property: {getattr(self.target_ws, 'closed', 'NO_CLOSED_ATTR')}")
|
402
|
+
except:
|
403
|
+
print(f"[ESCOBAR-WS] Cannot access target WS closed property")
|
404
|
+
|
405
|
+
# Message type analysis
|
406
|
+
if isinstance(message, str):
|
407
|
+
print(f"[ESCOBAR-WS] Message is TEXT (string)")
|
408
|
+
elif isinstance(message, bytes):
|
409
|
+
print(f"[ESCOBAR-WS] Message is BINARY (bytes)")
|
410
|
+
else:
|
411
|
+
print(f"[ESCOBAR-WS] Message is UNKNOWN type: {type(message)}")
|
412
|
+
|
413
|
+
print(f"[ESCOBAR-WS] === ATTEMPTING MESSAGE FORWARD ===")
|
414
|
+
|
386
415
|
try:
|
387
|
-
print(f"[ESCOBAR-WS] Forwarding message to target server")
|
388
416
|
# Forward message to target server
|
389
417
|
await self.target_ws.send(message)
|
390
|
-
print(f"[ESCOBAR-WS] Message successfully forwarded to target")
|
418
|
+
print(f"[ESCOBAR-WS] ✅ Message successfully forwarded to target")
|
391
419
|
logging.debug(f"Forwarded message to target: {message[:100]}...")
|
392
420
|
except Exception as e:
|
393
|
-
print(f"[ESCOBAR-WS] ERROR forwarding message to target:")
|
394
|
-
print(f"[ESCOBAR-WS]
|
395
|
-
print(f"[ESCOBAR-WS]
|
421
|
+
print(f"[ESCOBAR-WS] ❌ CRITICAL ERROR forwarding message to target:")
|
422
|
+
print(f"[ESCOBAR-WS] Exception type: {type(e).__name__}")
|
423
|
+
print(f"[ESCOBAR-WS] Exception message: {str(e)}")
|
424
|
+
print(f"[ESCOBAR-WS] Exception args: {getattr(e, 'args', 'NO_ARGS')}")
|
425
|
+
|
426
|
+
# Check target connection state after error
|
427
|
+
try:
|
428
|
+
print(f"[ESCOBAR-WS] Target WS state after error: {self.target_ws.state}")
|
429
|
+
except:
|
430
|
+
print(f"[ESCOBAR-WS] Cannot check target WS state after error")
|
431
|
+
|
432
|
+
# Additional exception details
|
433
|
+
if hasattr(e, '__dict__'):
|
434
|
+
print(f"[ESCOBAR-WS] Exception attributes: {e.__dict__}")
|
435
|
+
if hasattr(e, 'errno'):
|
436
|
+
print(f"[ESCOBAR-WS] Errno: {e.errno}")
|
437
|
+
if hasattr(e, 'strerror'):
|
438
|
+
print(f"[ESCOBAR-WS] Strerror: {e.strerror}")
|
439
|
+
|
440
|
+
# Import specific exception types for better diagnosis
|
441
|
+
import websockets.exceptions
|
442
|
+
if isinstance(e, websockets.exceptions.ConnectionClosed):
|
443
|
+
print(f"[ESCOBAR-WS] ConnectionClosed - code: {e.code}, reason: {e.reason}")
|
444
|
+
elif isinstance(e, websockets.exceptions.InvalidState):
|
445
|
+
print(f"[ESCOBAR-WS] InvalidState - connection in wrong state")
|
446
|
+
elif isinstance(e, websockets.exceptions.PayloadTooBig):
|
447
|
+
print(f"[ESCOBAR-WS] PayloadTooBig - message too large")
|
448
|
+
|
396
449
|
logging.error(f"Error forwarding message to target: {str(e)}")
|
397
|
-
|
450
|
+
|
451
|
+
# Don't close immediately - let's see if we can recover
|
452
|
+
print(f"[ESCOBAR-WS] Closing client connection due to forward error")
|
453
|
+
self.close(code=1011, reason=f"Target forward error: {type(e).__name__}")
|
398
454
|
else:
|
399
455
|
print(f"[ESCOBAR-WS] Cannot forward message - target_ws: {self.target_ws}, is_closing: {self.is_closing}")
|
400
456
|
print(f"[ESCOBAR-WS] === END CLIENT MESSAGE ===")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "escobar",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.89",
|
4
4
|
"description": "AI CHAT EXTENSION",
|
5
5
|
"keywords": [
|
6
6
|
"jupyter",
|
@@ -123,7 +123,7 @@
|
|
123
123
|
"outputDir": "escobar/labextension",
|
124
124
|
"schemaDir": "schema",
|
125
125
|
"_build": {
|
126
|
-
"load": "static/remoteEntry.
|
126
|
+
"load": "static/remoteEntry.a8ae0b901c4a30b269e4.js",
|
127
127
|
"extension": "./extension",
|
128
128
|
"style": "./style"
|
129
129
|
}
|