escobar 0.1.91__py3-none-any.whl → 0.1.92__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 (28) hide show
  1. escobar/_version.py +1 -1
  2. escobar/handlers.py +26 -3
  3. escobar/labextension/package.json +5 -3
  4. escobar/labextension/schemas/escobar/package.json.orig +4 -2
  5. escobar/labextension/static/{653.cd0a1dbb61ede2a5de00.js → 653.2348cd42bb15caeb6a4d.js} +1 -1
  6. escobar/labextension/static/{remoteEntry.48a97be89d680e21e498.js → remoteEntry.4b2f86eacb2c83e28f43.js} +1 -1
  7. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/package.json +5 -3
  8. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/schemas/escobar/package.json.orig +4 -2
  9. escobar-0.1.91.data/data/share/jupyter/labextensions/escobar/static/653.cd0a1dbb61ede2a5de00.js → escobar-0.1.92.data/data/share/jupyter/labextensions/escobar/static/653.2348cd42bb15caeb6a4d.js +1 -1
  10. escobar-0.1.92.data/data/share/jupyter/labextensions/escobar/static/oauth-callback.html +131 -0
  11. escobar-0.1.91.data/data/share/jupyter/labextensions/escobar/static/remoteEntry.48a97be89d680e21e498.js → escobar-0.1.92.data/data/share/jupyter/labextensions/escobar/static/remoteEntry.4b2f86eacb2c83e28f43.js +1 -1
  12. {escobar-0.1.91.dist-info → escobar-0.1.92.dist-info}/METADATA +1 -1
  13. {escobar-0.1.91.dist-info → escobar-0.1.92.dist-info}/RECORD +28 -27
  14. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/install.json +0 -0
  15. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/schemas/escobar/plugin.json +0 -0
  16. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/static/304.bf7e91be734e5b36cdc9.js +0 -0
  17. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/static/346.8a1e61ca6789b6fddfa7.js +0 -0
  18. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/static/379.40dd59dc19d4a6b42d25.js +0 -0
  19. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/static/57.17e53b4b9a954f39c4d8.js +0 -0
  20. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/static/648.a7d314faeacc762d891d.js +0 -0
  21. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/static/666.3bc65aac3a3be183ee19.js +0 -0
  22. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/static/874.c539726f31a1baa0267e.js +0 -0
  23. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/static/986.cbcf9d7c1cd8d06be435.js +0 -0
  24. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/static/style.js +0 -0
  25. {escobar-0.1.91.data → escobar-0.1.92.data}/data/share/jupyter/labextensions/escobar/static/third-party-licenses.json +0 -0
  26. {escobar-0.1.91.dist-info → escobar-0.1.92.dist-info}/WHEEL +0 -0
  27. {escobar-0.1.91.dist-info → escobar-0.1.92.dist-info}/entry_points.txt +0 -0
  28. {escobar-0.1.91.dist-info → escobar-0.1.92.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.91'
4
+ __version__ = VERSION = '0.1.92'
escobar/handlers.py CHANGED
@@ -34,9 +34,32 @@ class OAuthCallbackHandler(JupyterHandler):
34
34
  try:
35
35
  # Get the path to the static directory
36
36
  import os
37
- current_dir = os.path.dirname(os.path.abspath(__file__))
38
- project_root = os.path.dirname(current_dir)
39
- callback_file_path = os.path.join(project_root, 'static', 'oauth-callback.html')
37
+ import pkg_resources
38
+
39
+ # Try to get the file from the installed package first
40
+ try:
41
+ # This works when the package is installed via pip
42
+ # The static files are installed in the labextension directory
43
+ callback_content = pkg_resources.resource_string('escobar', 'labextension/static/oauth-callback.html').decode('utf-8')
44
+
45
+ self.log.info(f"🔐 CALLBACK: Serving OAuth callback from installed package")
46
+
47
+ # Set proper headers
48
+ self.set_header('Content-Type', 'text/html; charset=UTF-8')
49
+ self.set_header('Cache-Control', 'no-cache, no-store, must-revalidate')
50
+ self.set_header('Pragma', 'no-cache')
51
+ self.set_header('Expires', '0')
52
+
53
+ # Write the HTML content
54
+ self.write(callback_content)
55
+ self.log.info(f"🔐 CALLBACK: Successfully served OAuth callback HTML from package")
56
+ return
57
+
58
+ except (ImportError, FileNotFoundError, OSError):
59
+ # Fallback to file system path for development
60
+ current_dir = os.path.dirname(os.path.abspath(__file__))
61
+ project_root = os.path.dirname(current_dir)
62
+ callback_file_path = os.path.join(project_root, 'static', 'oauth-callback.html')
40
63
 
41
64
  self.log.info(f"🔐 CALLBACK: Serving OAuth callback from: {callback_file_path}")
42
65
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escobar",
3
- "version": "0.1.91",
3
+ "version": "0.1.92",
4
4
  "description": "AI CHAT EXTENSION",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -19,7 +19,9 @@
19
19
  "files": [
20
20
  "lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
21
21
  "style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
22
- "schema/*.json"
22
+ "schema/*.json",
23
+ "static/**/*",
24
+ "src/icons/*.svg"
23
25
  ],
24
26
  "main": "lib/index.js",
25
27
  "types": "lib/index.d.ts",
@@ -123,7 +125,7 @@
123
125
  "outputDir": "escobar/labextension",
124
126
  "schemaDir": "schema",
125
127
  "_build": {
126
- "load": "static/remoteEntry.48a97be89d680e21e498.js",
128
+ "load": "static/remoteEntry.4b2f86eacb2c83e28f43.js",
127
129
  "extension": "./extension",
128
130
  "style": "./style"
129
131
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "escobar",
3
- "version": "0.1.91",
3
+ "version": "0.1.92",
4
4
  "description": "AI CHAT EXTENSION",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -19,7 +19,9 @@
19
19
  "files": [
20
20
  "lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
21
21
  "style/**/*.{css,js,eot,gif,html,jpg,json,png,svg,woff2,ttf}",
22
- "schema/*.json"
22
+ "schema/*.json",
23
+ "static/**/*",
24
+ "src/icons/*.svg"
23
25
  ],
24
26
  "main": "lib/index.js",
25
27
  "types": "lib/index.d.ts",