escobar 0.1.83__py3-none-any.whl → 0.1.85__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 +51 -12
- escobar/labextension/package.json +2 -2
- escobar/labextension/schemas/escobar/package.json.orig +1 -1
- escobar/labextension/static/{589.ebbc3fa44d2cf139e135.js → 237.beaeb8ce836d47bd4371.js} +1 -1
- escobar/labextension/static/{remoteEntry.6775afb69ee2175f0aae.js → remoteEntry.dc6b39d8df36751e9014.js} +1 -1
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/package.json +2 -2
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/schemas/escobar/package.json.orig +1 -1
- escobar-0.1.83.data/data/share/jupyter/labextensions/escobar/static/589.ebbc3fa44d2cf139e135.js → escobar-0.1.85.data/data/share/jupyter/labextensions/escobar/static/237.beaeb8ce836d47bd4371.js +1 -1
- escobar-0.1.83.data/data/share/jupyter/labextensions/escobar/static/remoteEntry.6775afb69ee2175f0aae.js → escobar-0.1.85.data/data/share/jupyter/labextensions/escobar/static/remoteEntry.dc6b39d8df36751e9014.js +1 -1
- {escobar-0.1.83.dist-info → escobar-0.1.85.dist-info}/METADATA +1 -1
- {escobar-0.1.83.dist-info → escobar-0.1.85.dist-info}/RECORD +27 -27
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/install.json +0 -0
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/schemas/escobar/plugin.json +0 -0
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/static/304.bf7e91be734e5b36cdc9.js +0 -0
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/static/346.8a1e61ca6789b6fddfa7.js +0 -0
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/static/379.40dd59dc19d4a6b42d25.js +0 -0
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/static/57.17e53b4b9a954f39c4d8.js +0 -0
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/static/648.a7d314faeacc762d891d.js +0 -0
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/static/666.3bc65aac3a3be183ee19.js +0 -0
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/static/874.c539726f31a1baa0267e.js +0 -0
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/static/986.cbcf9d7c1cd8d06be435.js +0 -0
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/static/style.js +0 -0
- {escobar-0.1.83.data → escobar-0.1.85.data}/data/share/jupyter/labextensions/escobar/static/third-party-licenses.json +0 -0
- {escobar-0.1.83.dist-info → escobar-0.1.85.dist-info}/WHEEL +0 -0
- {escobar-0.1.83.dist-info → escobar-0.1.85.dist-info}/entry_points.txt +0 -0
- {escobar-0.1.83.dist-info → escobar-0.1.85.dist-info}/licenses/LICENSE +0 -0
escobar/_version.py
CHANGED
escobar/handlers.py
CHANGED
@@ -424,16 +424,36 @@ class WebSocketProxyHandler(tornado.websocket.WebSocketHandler):
|
|
424
424
|
break
|
425
425
|
print(f"[ESCOBAR-WS] === END TARGET MESSAGE #{message_count} ===")
|
426
426
|
|
427
|
-
except websockets.exceptions.ConnectionClosed:
|
428
|
-
print(f"[ESCOBAR-WS]
|
429
|
-
|
427
|
+
except websockets.exceptions.ConnectionClosed as e:
|
428
|
+
print(f"[ESCOBAR-WS] === TARGET CONNECTION CLOSED DETAILS ===")
|
429
|
+
print(f"[ESCOBAR-WS] Target websocket connection closed")
|
430
|
+
print(f"[ESCOBAR-WS] Close code: {getattr(e, 'code', 'NO_CODE')}")
|
431
|
+
print(f"[ESCOBAR-WS] Close reason: {getattr(e, 'reason', 'NO_REASON')}")
|
432
|
+
print(f"[ESCOBAR-WS] Exception type: {type(e).__name__}")
|
433
|
+
print(f"[ESCOBAR-WS] Exception str: {str(e)}")
|
434
|
+
print(f"[ESCOBAR-WS] Target WS final state: {getattr(self.target_ws, 'state', 'NO_STATE') if self.target_ws else 'NO_TARGET_WS'}")
|
435
|
+
print(f"[ESCOBAR-WS] Messages processed before disconnect: {message_count}")
|
436
|
+
print(f"[ESCOBAR-WS] === END TARGET CONNECTION CLOSED DETAILS ===")
|
437
|
+
|
438
|
+
logging.info(f"Target websocket connection closed - code: {getattr(e, 'code', 'NO_CODE')}, reason: {getattr(e, 'reason', 'NO_REASON')}")
|
439
|
+
|
430
440
|
if not self.is_closing:
|
431
441
|
print(f"[ESCOBAR-WS] Closing client connection due to target disconnect")
|
432
442
|
self.close(code=1011, reason="Target server disconnected")
|
433
443
|
except Exception as e:
|
434
|
-
print(f"[ESCOBAR-WS]
|
435
|
-
print(f"[ESCOBAR-WS]
|
436
|
-
print(f"[ESCOBAR-WS]
|
444
|
+
print(f"[ESCOBAR-WS] === TARGET MESSAGE FORWARDING ERROR ===")
|
445
|
+
print(f"[ESCOBAR-WS] Error: {str(e)}")
|
446
|
+
print(f"[ESCOBAR-WS] Error type: {type(e).__name__}")
|
447
|
+
print(f"[ESCOBAR-WS] Messages processed before error: {message_count}")
|
448
|
+
print(f"[ESCOBAR-WS] Target WS state: {getattr(self.target_ws, 'state', 'NO_STATE') if self.target_ws else 'NO_TARGET_WS'}")
|
449
|
+
if hasattr(e, '__dict__'):
|
450
|
+
print(f"[ESCOBAR-WS] Error attributes: {e.__dict__}")
|
451
|
+
if hasattr(e, 'errno'):
|
452
|
+
print(f"[ESCOBAR-WS] Errno: {e.errno}")
|
453
|
+
if hasattr(e, 'strerror'):
|
454
|
+
print(f"[ESCOBAR-WS] Strerror: {e.strerror}")
|
455
|
+
print(f"[ESCOBAR-WS] === END TARGET MESSAGE FORWARDING ERROR ===")
|
456
|
+
|
437
457
|
logging.error(f"Error receiving from target websocket: {str(e)}")
|
438
458
|
if not self.is_closing:
|
439
459
|
print(f"[ESCOBAR-WS] Closing client connection due to target error")
|
@@ -463,17 +483,36 @@ class WebSocketProxyHandler(tornado.websocket.WebSocketHandler):
|
|
463
483
|
"""Safely close the target websocket connection"""
|
464
484
|
print(f"[ESCOBAR-WS] === CLOSING TARGET CONNECTION ===")
|
465
485
|
try:
|
466
|
-
if self.target_ws
|
467
|
-
print(f"[ESCOBAR-WS] Target WS
|
468
|
-
|
469
|
-
print(f"[ESCOBAR-WS] Target
|
470
|
-
|
486
|
+
if self.target_ws:
|
487
|
+
print(f"[ESCOBAR-WS] Target WS exists, checking state")
|
488
|
+
print(f"[ESCOBAR-WS] Target WS type: {type(self.target_ws)}")
|
489
|
+
print(f"[ESCOBAR-WS] Target WS state: {getattr(self.target_ws, 'state', 'NO_STATE_ATTR')}")
|
490
|
+
|
491
|
+
# Check if connection is already closed using the correct websockets library API
|
492
|
+
try:
|
493
|
+
is_closed = self.target_ws.state.name == 'CLOSED'
|
494
|
+
print(f"[ESCOBAR-WS] Target WS is closed: {is_closed}")
|
495
|
+
except AttributeError:
|
496
|
+
# Fallback: just try to close it regardless of state
|
497
|
+
print(f"[ESCOBAR-WS] Cannot check state, will attempt to close anyway")
|
498
|
+
is_closed = False
|
499
|
+
|
500
|
+
if not is_closed:
|
501
|
+
print(f"[ESCOBAR-WS] Target WS is open, closing it")
|
502
|
+
await self.target_ws.close()
|
503
|
+
print(f"[ESCOBAR-WS] Target connection closed successfully")
|
504
|
+
logging.info("Target websocket connection closed")
|
505
|
+
else:
|
506
|
+
print(f"[ESCOBAR-WS] Target WS already closed")
|
471
507
|
else:
|
472
|
-
print(f"[ESCOBAR-WS]
|
508
|
+
print(f"[ESCOBAR-WS] No target WS to close")
|
473
509
|
except Exception as e:
|
474
510
|
print(f"[ESCOBAR-WS] ERROR closing target connection:")
|
475
511
|
print(f"[ESCOBAR-WS] Error: {str(e)}")
|
476
512
|
print(f"[ESCOBAR-WS] Error type: {type(e).__name__}")
|
513
|
+
print(f"[ESCOBAR-WS] Target WS type: {type(self.target_ws) if self.target_ws else 'None'}")
|
514
|
+
if hasattr(e, '__dict__'):
|
515
|
+
print(f"[ESCOBAR-WS] Error attributes: {e.__dict__}")
|
477
516
|
logging.error(f"Error closing target websocket: {str(e)}")
|
478
517
|
|
479
518
|
print(f"[ESCOBAR-WS] === END CLOSING TARGET CONNECTION ===")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "escobar",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.85",
|
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.dc6b39d8df36751e9014.js",
|
127
127
|
"extension": "./extension",
|
128
128
|
"style": "./style"
|
129
129
|
}
|