escobar 0.1.84__py3-none-any.whl → 0.1.86__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.
Files changed (27) hide show
  1. escobar/_version.py +1 -1
  2. escobar/handlers.py +53 -13
  3. escobar/labextension/package.json +2 -2
  4. escobar/labextension/schemas/escobar/package.json.orig +1 -1
  5. escobar/labextension/static/{237.87a9a7e07854bba71f49.js → 237.aad587546e18d44b3d40.js} +1 -1
  6. escobar/labextension/static/{remoteEntry.31ea89463b75c6ad65cb.js → remoteEntry.47499e159c447c9de143.js} +1 -1
  7. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/package.json +2 -2
  8. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/schemas/escobar/package.json.orig +1 -1
  9. escobar-0.1.84.data/data/share/jupyter/labextensions/escobar/static/237.87a9a7e07854bba71f49.js → escobar-0.1.86.data/data/share/jupyter/labextensions/escobar/static/237.aad587546e18d44b3d40.js +1 -1
  10. escobar-0.1.84.data/data/share/jupyter/labextensions/escobar/static/remoteEntry.31ea89463b75c6ad65cb.js → escobar-0.1.86.data/data/share/jupyter/labextensions/escobar/static/remoteEntry.47499e159c447c9de143.js +1 -1
  11. {escobar-0.1.84.dist-info → escobar-0.1.86.dist-info}/METADATA +1 -1
  12. {escobar-0.1.84.dist-info → escobar-0.1.86.dist-info}/RECORD +27 -27
  13. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/install.json +0 -0
  14. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/schemas/escobar/plugin.json +0 -0
  15. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/static/304.bf7e91be734e5b36cdc9.js +0 -0
  16. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/static/346.8a1e61ca6789b6fddfa7.js +0 -0
  17. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/static/379.40dd59dc19d4a6b42d25.js +0 -0
  18. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/static/57.17e53b4b9a954f39c4d8.js +0 -0
  19. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/static/648.a7d314faeacc762d891d.js +0 -0
  20. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/static/666.3bc65aac3a3be183ee19.js +0 -0
  21. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/static/874.c539726f31a1baa0267e.js +0 -0
  22. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/static/986.cbcf9d7c1cd8d06be435.js +0 -0
  23. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/static/style.js +0 -0
  24. {escobar-0.1.84.data → escobar-0.1.86.data}/data/share/jupyter/labextensions/escobar/static/third-party-licenses.json +0 -0
  25. {escobar-0.1.84.dist-info → escobar-0.1.86.dist-info}/WHEEL +0 -0
  26. {escobar-0.1.84.dist-info → escobar-0.1.86.dist-info}/entry_points.txt +0 -0
  27. {escobar-0.1.84.dist-info → escobar-0.1.86.dist-info}/licenses/LICENSE +0 -0
escobar/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # This file is auto-generated by Hatchling. As such, do not:
2
2
  # - modify
3
3
  # - track in version control e.g. be sure to add to .gitignore
4
- __version__ = VERSION = '0.1.84'
4
+ __version__ = VERSION = '0.1.86'
escobar/handlers.py CHANGED
@@ -343,7 +343,8 @@ class WebSocketProxyHandler(tornado.websocket.WebSocketHandler):
343
343
  additional_headers=headers,
344
344
  ssl=ssl_context,
345
345
  ping_interval=20,
346
- ping_timeout=10
346
+ ping_timeout=10,
347
+ max_size=100 * 1024 * 1024
347
348
  )
348
349
 
349
350
  end_time = time.time()
@@ -424,16 +425,36 @@ class WebSocketProxyHandler(tornado.websocket.WebSocketHandler):
424
425
  break
425
426
  print(f"[ESCOBAR-WS] === END TARGET MESSAGE #{message_count} ===")
426
427
 
427
- except websockets.exceptions.ConnectionClosed:
428
- print(f"[ESCOBAR-WS] Target websocket connection closed normally")
429
- logging.info("Target websocket connection closed")
428
+ except websockets.exceptions.ConnectionClosed as e:
429
+ print(f"[ESCOBAR-WS] === TARGET CONNECTION CLOSED DETAILS ===")
430
+ print(f"[ESCOBAR-WS] Target websocket connection closed")
431
+ print(f"[ESCOBAR-WS] Close code: {getattr(e, 'code', 'NO_CODE')}")
432
+ print(f"[ESCOBAR-WS] Close reason: {getattr(e, 'reason', 'NO_REASON')}")
433
+ print(f"[ESCOBAR-WS] Exception type: {type(e).__name__}")
434
+ print(f"[ESCOBAR-WS] Exception str: {str(e)}")
435
+ print(f"[ESCOBAR-WS] Target WS final state: {getattr(self.target_ws, 'state', 'NO_STATE') if self.target_ws else 'NO_TARGET_WS'}")
436
+ print(f"[ESCOBAR-WS] Messages processed before disconnect: {message_count}")
437
+ print(f"[ESCOBAR-WS] === END TARGET CONNECTION CLOSED DETAILS ===")
438
+
439
+ logging.info(f"Target websocket connection closed - code: {getattr(e, 'code', 'NO_CODE')}, reason: {getattr(e, 'reason', 'NO_REASON')}")
440
+
430
441
  if not self.is_closing:
431
442
  print(f"[ESCOBAR-WS] Closing client connection due to target disconnect")
432
443
  self.close(code=1011, reason="Target server disconnected")
433
444
  except Exception as e:
434
- print(f"[ESCOBAR-WS] ERROR in target message forwarding:")
435
- print(f"[ESCOBAR-WS] Error: {str(e)}")
436
- print(f"[ESCOBAR-WS] Error type: {type(e).__name__}")
445
+ print(f"[ESCOBAR-WS] === TARGET MESSAGE FORWARDING ERROR ===")
446
+ print(f"[ESCOBAR-WS] Error: {str(e)}")
447
+ print(f"[ESCOBAR-WS] Error type: {type(e).__name__}")
448
+ print(f"[ESCOBAR-WS] Messages processed before error: {message_count}")
449
+ print(f"[ESCOBAR-WS] Target WS state: {getattr(self.target_ws, 'state', 'NO_STATE') if self.target_ws else 'NO_TARGET_WS'}")
450
+ if hasattr(e, '__dict__'):
451
+ print(f"[ESCOBAR-WS] Error attributes: {e.__dict__}")
452
+ if hasattr(e, 'errno'):
453
+ print(f"[ESCOBAR-WS] Errno: {e.errno}")
454
+ if hasattr(e, 'strerror'):
455
+ print(f"[ESCOBAR-WS] Strerror: {e.strerror}")
456
+ print(f"[ESCOBAR-WS] === END TARGET MESSAGE FORWARDING ERROR ===")
457
+
437
458
  logging.error(f"Error receiving from target websocket: {str(e)}")
438
459
  if not self.is_closing:
439
460
  print(f"[ESCOBAR-WS] Closing client connection due to target error")
@@ -463,17 +484,36 @@ class WebSocketProxyHandler(tornado.websocket.WebSocketHandler):
463
484
  """Safely close the target websocket connection"""
464
485
  print(f"[ESCOBAR-WS] === CLOSING TARGET CONNECTION ===")
465
486
  try:
466
- if self.target_ws and not self.target_ws.closed:
467
- print(f"[ESCOBAR-WS] Target WS is open, closing it")
468
- await self.target_ws.close()
469
- print(f"[ESCOBAR-WS] Target connection closed successfully")
470
- logging.info("Target websocket connection closed")
487
+ if self.target_ws:
488
+ print(f"[ESCOBAR-WS] Target WS exists, checking state")
489
+ print(f"[ESCOBAR-WS] Target WS type: {type(self.target_ws)}")
490
+ print(f"[ESCOBAR-WS] Target WS state: {getattr(self.target_ws, 'state', 'NO_STATE_ATTR')}")
491
+
492
+ # Check if connection is already closed using the correct websockets library API
493
+ try:
494
+ is_closed = self.target_ws.state.name == 'CLOSED'
495
+ print(f"[ESCOBAR-WS] Target WS is closed: {is_closed}")
496
+ except AttributeError:
497
+ # Fallback: just try to close it regardless of state
498
+ print(f"[ESCOBAR-WS] Cannot check state, will attempt to close anyway")
499
+ is_closed = False
500
+
501
+ if not is_closed:
502
+ print(f"[ESCOBAR-WS] Target WS is open, closing it")
503
+ await self.target_ws.close()
504
+ print(f"[ESCOBAR-WS] Target connection closed successfully")
505
+ logging.info("Target websocket connection closed")
506
+ else:
507
+ print(f"[ESCOBAR-WS] Target WS already closed")
471
508
  else:
472
- print(f"[ESCOBAR-WS] Target WS already closed or None")
509
+ print(f"[ESCOBAR-WS] No target WS to close")
473
510
  except Exception as e:
474
511
  print(f"[ESCOBAR-WS] ERROR closing target connection:")
475
512
  print(f"[ESCOBAR-WS] Error: {str(e)}")
476
513
  print(f"[ESCOBAR-WS] Error type: {type(e).__name__}")
514
+ print(f"[ESCOBAR-WS] Target WS type: {type(self.target_ws) if self.target_ws else 'None'}")
515
+ if hasattr(e, '__dict__'):
516
+ print(f"[ESCOBAR-WS] Error attributes: {e.__dict__}")
477
517
  logging.error(f"Error closing target websocket: {str(e)}")
478
518
 
479
519
  print(f"[ESCOBAR-WS] === END CLOSING TARGET CONNECTION ===")
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escobar",
3
- "version": "0.1.84",
3
+ "version": "0.1.86",
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.31ea89463b75c6ad65cb.js",
126
+ "load": "static/remoteEntry.47499e159c447c9de143.js",
127
127
  "extension": "./extension",
128
128
  "style": "./style"
129
129
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escobar",
3
- "version": "0.1.84",
3
+ "version": "0.1.86",
4
4
  "description": "AI CHAT EXTENSION",
5
5
  "keywords": [
6
6
  "jupyter",