beaker-notebook 2.0.3__tar.gz → 2.0.5__tar.gz
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.
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/.gitignore +5 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/PKG-INFO +3 -2
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/pyproject.toml +7 -5
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/__init__.py +0 -2
- beaker_notebook-2.0.5/src/beaker_notebook/app/api/notebook.py +162 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/base.py +7 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/error_templates/404.html +85 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/error_templates/500.html +85 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/error_templates/_base.html.txt +6 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/error_templates/error.html +86 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/handlers.py +15 -4
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/notebook_app.py +9 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/index.html +2 -2
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/BaseQueryCell-lRFHF6HS.js +1 -0
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/BeakerAdmin-Bil84Jda.js → beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/BeakerAdmin-hw7BXw3y.js +18 -18
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/BeakerQueryCell-CID3wcYR.css +1 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/BeakerQueryCell.vue_vue_type_style_index_0_lang-BAEKEEHQ.js +1 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/BeakerRawCell-C9sITReV.css +1 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/BeakerRawCell.vue_vue_type_style_index_0_lang-tbMDi-24.js +1550 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/ChatInterface-CUeGcWvy.js +1324 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/ChatInterface-D5H52vSA.css +1 -0
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/IntegrationsInterface-CN9rV7Gm.js → beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/IntegrationsInterface-DiVWgFkK.js +146 -152
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/NotebookInterface-BemnGrN9.css +1 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/NotebookInterface-CvRyyOvQ.js +23628 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/NotebookSvg-CM9ktVtJ.js +1 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/PlaygroundInterface-CnxgF0-G.css +1 -0
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/PlaygroundInterface-VxAWzzw1.js +1 -0
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/index-BXVDNu4g.js → beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/index-DnOc0XzB.js +130 -145
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/primevue-5u7OH24P.js → beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/primevue-Dsj7e3aU.js +125 -415
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/renderers-D-Qegloi.js → beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/renderers-BiXAsJpz.js +8002 -7212
- beaker_notebook-2.0.5/src/beaker_notebook/app/ui/static/renderers-Cw-hT4HV.css +1 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/kernel.py +33 -40
- beaker_notebook-2.0.5/src/beaker_notebook/lib/chat_history.py +530 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/config.py +24 -4
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/context.py +30 -61
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/notebook_state.py +1 -1
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/utils.py +62 -14
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/workflow.py +45 -13
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/context/handlers.py +3 -1
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/context/manager.py +15 -2
- beaker_notebook-2.0.5/src/beaker_notebook/services/storage/__init__.py +72 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/storage/base.py +11 -17
- beaker_notebook-2.0.5/src/beaker_notebook/services/storage/notebook.py +269 -0
- beaker_notebook-2.0.3/src/beaker_notebook/app/api/notebook.py +0 -118
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/BaseQueryCell-MSGIE7xq.js +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/BeakerNotebookPanel-DlwDdhcR.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/BeakerNotebookPanel.vue_vue_type_style_index_0_lang-C7LYGFhD.js +0 -2352
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/BeakerQueryCell-CLP87HiT.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/BeakerQueryCell.vue_vue_type_style_index_0_lang-Cew0csRn.js +0 -364
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/BeakerRawCell-CYX7jUwf.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/BeakerRawCell.vue_vue_type_style_index_0_lang-JXLcPcJa.js +0 -845
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/BrainIcon-ouUTaJTv.js +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/ChatInterface-B5i4bh2f.js +0 -1065
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/ChatInterface-DKDl_3ZW.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/DevInterface-BzckMFnQ.js +0 -1171
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/DevInterface-CX6JI9k4.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/IntegrationPanel-DKP_5B7W.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/IntegrationPanel.vue_vue_type_style_index_0_lang-BlH6CjAH.js +0 -762
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/MediaPanel-DNCoIEA4.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/MediaPanel.vue_vue_type_style_index_0_lang-LWlWoHig.js +0 -709
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/NextBeakerQueryCell-C426bZbZ.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/NextBeakerQueryCell.vue_vue_type_style_index_0_lang-DwTGiZMb.js +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/NextNotebookInterface-DxBYBP58.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/NextNotebookInterface-sAm39Afy.js +0 -1094
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/NotebookInterface-BdxzVo_D.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/NotebookInterface-C5YWMaQc.js +0 -601
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/NotebookSvg-CSnCr93M.js +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/PlaygroundInterface-BJbd0AwT.js +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/PlaygroundInterface-BiWl-IG6.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/WorkflowOutputPanel-D3REEIWj.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/WorkflowOutputPanel.vue_vue_type_style_index_0_lang-CQ0MdGts.js +0 -20241
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/cellOperations-DiO7UBn1.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/cellOperations-Gj7Nqxq-.js +0 -296
- beaker_notebook-2.0.3/src/beaker_notebook/app/ui/static/renderers-DTrMDJiK.css +0 -1
- beaker_notebook-2.0.3/src/beaker_notebook/lib/exporters/full_context_notebook.py +0 -24
- beaker_notebook-2.0.3/src/beaker_notebook/services/storage/notebook.py +0 -361
- beaker_notebook-2.0.3/src/beaker_notebook/util/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/LICENSE.txt +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/README.md +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_kernel/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/api/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/api/handlers.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/api/integrations.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/api/subkernels.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/dev_app.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/server_app.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/beaker.svg +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/favicon.ico +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/BeakerAdmin-CmINXWMq.css +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/IntegrationsInterface-BzFBE6eg.css +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/_plugin-vue_export-helper-DlAUqK2U.js +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/codemirror-CEJpu35t.js +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/index-CDHrXzwd.css +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/jupyterlab-DCB4j3g5.js +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-300-CGqVYVBd.woff2 +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-300-D-Ix9km9.woff +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-700-CCBIyjkE.woff +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-700-C_mCopxe.woff2 +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-regular-Dz3ZLxjK.woff +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/lato-v17-latin-ext_latin-regular-GAITDyQJ.woff2 +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/pdf.worker-BQQyum15.mjs +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/pdfjs-B7zhfHd9.js +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/primeicons-C6QP2o4f.woff2 +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/primeicons-DMOk5skT.eot +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/primeicons-Dr5RGzOO.svg +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/primeicons-MpK4pl85.ttf +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/primeicons-WjwUDZjB.woff +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/vue.esm-browser.prod.js +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/app/ui/static/xlsx-C3u7rb2R.js +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/builder/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/builder/beaker.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/builder/hooks.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/builder/templates.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/builder/utils.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/cli/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/cli/app.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/cli/config.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/cli/context.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/cli/helpers.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/cli/main.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/cli/project.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/cli/running.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/cli/server.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/cli/subkernel.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/contexts/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/contexts/default/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/contexts/default/agent.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/contexts/default/context.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/contexts/default/default_payload.json +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/kernel.json +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/admin.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/agent.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/agent_tasks.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/app.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/autodiscovery.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/code_analysis/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/code_analysis/analysis_agent.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/code_analysis/analysis_types.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/code_analysis/analyzer.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/code_analysis/message_types.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/code_analysis/rules/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/code_analysis/rules/base.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/code_analysis/rules/trust/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/code_analysis/rules/trust/categories.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/code_analysis/rules/trust/rules.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/context_dump.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/exporters/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/exporters/chat.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/exporters/streamline.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/extension.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/integrations/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/integrations/adhoc.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/integrations/base.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/integrations/registry.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/integrations/skill.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/integrations/types.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/jupyter_kernel_proxy.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/kernel_state.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/message_types.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/reflector.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/subkernel.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/templates/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/templates/agent_file.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/templates/context_file.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/templates/paths.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/templates/procedure_file.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/templates/readme_file.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/templates/subkernel_file.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/lib/types.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/auth/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/auth/dummy.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/auth/notebook.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/context/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/context/discovery_service.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/context/util.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/kernel/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/kernel/manager.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/kernel/mappingmanager.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/kernel/provisioner.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/kernel/spec.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/services/session/__init__.py +0 -0
- {beaker_notebook-2.0.3/src/beaker_notebook/services/storage → beaker_notebook-2.0.5/src/beaker_notebook/subkernels}/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/julia/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/julia/procedures/.gitkeep +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/julia/procedures/fetch_state.jl +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/julia/procedures/reflectors/array.jl +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/julia/procedures/reflectors/default.jl +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/julia/procedures/reflectors/dict.jl +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/julia/procedures/reflectors/function.jl +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/julia/procedures/reflectors/module.jl +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/julia/procedures/reflectors/type.jl +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/julia/subkernel.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/.gitkeep +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/describe_variables.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/fetch_state.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/reflectors/class.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/reflectors/dataframe.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/reflectors/default.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/reflectors/function.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/reflectors/mapping.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/reflectors/module.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/reflectors/ndarray.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/reflectors/primitive.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/reflectors/sequence.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/reflectors/series.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/procedures/reflectors/string.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/python/subkernel.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/rlang/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/rlang/procedures/.gitkeep +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/rlang/procedures/fetch_state.r +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/rlang/procedures/reflectors/data_frame.r +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/rlang/procedures/reflectors/default.r +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/rlang/procedures/reflectors/function.r +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/rlang/procedures/reflectors/list.r +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/rlang/procedures/reflectors/vector.r +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/subkernels/rlang/subkernel.py +0 -0
- {beaker_notebook-2.0.3/src/beaker_notebook/subkernels → beaker_notebook-2.0.5/src/beaker_notebook/util}/__init__.py +0 -0
- {beaker_notebook-2.0.3 → beaker_notebook-2.0.5}/src/beaker_notebook/util/refactor.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: beaker-notebook
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.5
|
|
4
4
|
Summary: Beaker Notebook is a general-purpose, computational notebook with embedded agentic AI designed . It provides a flexible context system that enables domain-specific customization for domains such as data science, research, and computational workflows through specialized AI agents, integrations with external data sources and APIs, and structured workflows.
|
|
5
5
|
Project-URL: Documentation, https://github.com/jataware/beaker-kernel#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/jataware/beaker-kernel/issues
|
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
16
16
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
17
17
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
18
18
|
Requires-Python: >=3.11
|
|
19
|
-
Requires-Dist: archytas>=2.0.
|
|
19
|
+
Requires-Dist: archytas>=2.0.4
|
|
20
20
|
Requires-Dist: click~=8.1
|
|
21
21
|
Requires-Dist: dill
|
|
22
22
|
Requires-Dist: hatch
|
|
@@ -27,6 +27,7 @@ Requires-Dist: matplotlib
|
|
|
27
27
|
Requires-Dist: numpy
|
|
28
28
|
Requires-Dist: openpyxl
|
|
29
29
|
Requires-Dist: pandas
|
|
30
|
+
Requires-Dist: platformdirs
|
|
30
31
|
Requires-Dist: python-dotenv~=1.0
|
|
31
32
|
Requires-Dist: requests<3,>=2.24
|
|
32
33
|
Requires-Dist: scipy
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "beaker-notebook"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.5"
|
|
8
8
|
description = "Beaker Notebook is a general-purpose, computational notebook with embedded agentic AI designed . It provides a flexible context system that enables domain-specific customization for domains such as data science, research, and computational workflows through specialized AI agents, integrations with external data sources and APIs, and structured workflows."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -25,7 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
26
26
|
]
|
|
27
27
|
dependencies = [
|
|
28
|
-
"archytas>=2.0.
|
|
28
|
+
"archytas>=2.0.4",
|
|
29
29
|
"jupyterlab~=4.0",
|
|
30
30
|
"jupyterlab-server>=2.22.1,<3",
|
|
31
31
|
"requests>=2.24,<3",
|
|
@@ -36,6 +36,7 @@ dependencies = [
|
|
|
36
36
|
"click~=8.1",
|
|
37
37
|
"python-dotenv~=1.0",
|
|
38
38
|
"hatch",
|
|
39
|
+
"platformdirs",
|
|
39
40
|
"toml",
|
|
40
41
|
"dill",
|
|
41
42
|
"pandas",
|
|
@@ -82,7 +83,7 @@ path = "src/beaker_notebook/builder/beaker.py"
|
|
|
82
83
|
|
|
83
84
|
|
|
84
85
|
[tool.bumpversion]
|
|
85
|
-
current_version="2.0.
|
|
86
|
+
current_version="2.0.5"
|
|
86
87
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)((?P<release>[ab])(?P<revision>\\d+))?"
|
|
87
88
|
serialize = [
|
|
88
89
|
"{major}.{minor}.{patch}{release}{revision}",
|
|
@@ -93,7 +94,7 @@ replace = "{new_version}"
|
|
|
93
94
|
regex = false
|
|
94
95
|
ignore_missing_version = false
|
|
95
96
|
ignore_missing_files = false
|
|
96
|
-
tag =
|
|
97
|
+
tag = false
|
|
97
98
|
sign_tags = false
|
|
98
99
|
tag_name = "v{new_version}"
|
|
99
100
|
tag_message = "Bump version: {current_version} → {new_version}"
|
|
@@ -276,6 +277,8 @@ exclude_lines = [
|
|
|
276
277
|
|
|
277
278
|
|
|
278
279
|
|
|
280
|
+
|
|
281
|
+
|
|
279
282
|
[tool.hatch.envs.hatch-test]
|
|
280
283
|
extra-dependencies = [
|
|
281
284
|
"pytest",
|
|
@@ -289,7 +292,6 @@ asyncio_default_fixture_loop_scope = "function"
|
|
|
289
292
|
|
|
290
293
|
[project.entry-points."nbconvert.exporters"]
|
|
291
294
|
streamline = "beaker_notebook.lib.exporters.streamline:StreamlineExporter"
|
|
292
|
-
full_context_notebook = "beaker_notebook.lib.exporters.full_context_notebook:FullContextNotebookExporter"
|
|
293
295
|
chat = "beaker_notebook.lib.exporters.chat:ChatExporter"
|
|
294
296
|
|
|
295
297
|
[project.entry-points."jupyter_client.kernel_provisioners"]
|
|
@@ -79,7 +79,6 @@ redirect_map: ImportRedirectMap = {
|
|
|
79
79
|
},
|
|
80
80
|
'beaker_kernel.service.storage.notebook': {
|
|
81
81
|
'BaseNotebookManager': 'beaker_kernel.services.storage.notebook',
|
|
82
|
-
'BrowserLocalDataNotebookManager': 'beaker_kernel.services.storage.notebook',
|
|
83
82
|
'FileNotebookManager': 'beaker_kernel.services.storage.notebook',
|
|
84
83
|
'NotebookInfo': 'beaker_kernel.services.storage.notebook',
|
|
85
84
|
'with_hidden_files': 'beaker_kernel.services.storage.notebook',
|
|
@@ -162,7 +161,6 @@ redirect_map: ImportRedirectMap = {
|
|
|
162
161
|
},
|
|
163
162
|
'beaker_notebook.service.storage.notebook': {
|
|
164
163
|
'BaseNotebookManager': 'beaker_notebook.services.storage.notebook',
|
|
165
|
-
'BrowserLocalDataNotebookManager': 'beaker_notebook.services.storage.notebook',
|
|
166
164
|
'FileNotebookManager': 'beaker_notebook.services.storage.notebook',
|
|
167
165
|
'NotebookInfo': 'beaker_notebook.services.storage.notebook',
|
|
168
166
|
'with_hidden_files': 'beaker_notebook.services.storage.notebook',
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
import json
|
|
3
|
+
import logging
|
|
4
|
+
import typing
|
|
5
|
+
import uuid
|
|
6
|
+
from dataclasses import is_dataclass, asdict
|
|
7
|
+
from queue import Empty
|
|
8
|
+
|
|
9
|
+
from jupyter_client.jsonutil import json_default
|
|
10
|
+
from jupyter_server.base.handlers import JupyterHandler
|
|
11
|
+
|
|
12
|
+
from beaker_notebook.lib.utils import ensure_async
|
|
13
|
+
|
|
14
|
+
import tornado
|
|
15
|
+
|
|
16
|
+
if typing.TYPE_CHECKING:
|
|
17
|
+
from beaker_notebook.services.storage.notebook import BaseNotebookManager, NotebookInfo, NotebookContent
|
|
18
|
+
|
|
19
|
+
logger = logging.getLogger(__name__)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class NotebookHandler(JupyterHandler):
|
|
23
|
+
"""
|
|
24
|
+
Base handler for Beaker notebook-related API endpoints.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
def set_default_headers(self):
|
|
28
|
+
self.set_header("Content-Type", "application/json")
|
|
29
|
+
|
|
30
|
+
def write(self, chunk):
|
|
31
|
+
if is_dataclass(chunk):
|
|
32
|
+
chunk = asdict(chunk)
|
|
33
|
+
elif isinstance(chunk, list):
|
|
34
|
+
chunk = [asdict(item) if is_dataclass(item) else item for item in chunk]
|
|
35
|
+
if isinstance(chunk, (dict, list)):
|
|
36
|
+
chunk = json.dumps(chunk, default=json_default)
|
|
37
|
+
return super().write(chunk)
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def notebook_manager(self) -> "BaseNotebookManager":
|
|
41
|
+
notebook_manager = getattr(self.serverapp, "notebook_manager", None)
|
|
42
|
+
if notebook_manager is None:
|
|
43
|
+
raise tornado.web.HTTPError(404, "Notebook manager not found")
|
|
44
|
+
return notebook_manager
|
|
45
|
+
|
|
46
|
+
async def head(self, notebook_id=None):
|
|
47
|
+
self.write({})
|
|
48
|
+
|
|
49
|
+
async def get(self, notebook_id=None):
|
|
50
|
+
notebook_id = notebook_id or None
|
|
51
|
+
try:
|
|
52
|
+
notebook = await self.notebook_manager.get_notebook(notebook_id)
|
|
53
|
+
except FileNotFoundError:
|
|
54
|
+
notebook = None
|
|
55
|
+
if notebook is None:
|
|
56
|
+
raise tornado.web.HTTPError(404, "Notebook not found")
|
|
57
|
+
self.write(notebook)
|
|
58
|
+
|
|
59
|
+
async def post(self, notebook_id=None):
|
|
60
|
+
notebook_id = notebook_id or None
|
|
61
|
+
session = self.get_query_argument("session", None)
|
|
62
|
+
name = self.get_query_argument("name", None)
|
|
63
|
+
body = tornado.escape.json_decode(self.request.body)
|
|
64
|
+
content: "typing.Optional[NotebookContent]" = body.get("content", None)
|
|
65
|
+
if content is None:
|
|
66
|
+
raise tornado.web.HTTPError(400, "No notebook content provided in request body")
|
|
67
|
+
|
|
68
|
+
notebook: "NotebookInfo" = await self.notebook_manager.save_notebook(
|
|
69
|
+
content=content,
|
|
70
|
+
notebook_id=notebook_id,
|
|
71
|
+
session=session,
|
|
72
|
+
name=name,
|
|
73
|
+
)
|
|
74
|
+
self.write(notebook)
|
|
75
|
+
|
|
76
|
+
async def delete(self, notebook_id=None):
|
|
77
|
+
if not notebook_id:
|
|
78
|
+
raise tornado.web.HTTPError(400, "No notebook ID provided for deletion")
|
|
79
|
+
await self.notebook_manager.delete_notebook(notebook_id)
|
|
80
|
+
self.set_status(204)
|
|
81
|
+
# self.finish()
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class SnapshotHandler(JupyterHandler):
|
|
85
|
+
"""
|
|
86
|
+
Handler for session based notebook snapshots.
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
def set_default_headers(self):
|
|
90
|
+
self.set_header("Content-Type", "application/json")
|
|
91
|
+
|
|
92
|
+
def write(self, chunk):
|
|
93
|
+
if is_dataclass(chunk):
|
|
94
|
+
chunk = asdict(chunk)
|
|
95
|
+
elif isinstance(chunk, list):
|
|
96
|
+
chunk = [asdict(item) if is_dataclass(item) else item for item in chunk]
|
|
97
|
+
if isinstance(chunk, (dict, list)):
|
|
98
|
+
chunk = json.dumps(chunk, default=json_default)
|
|
99
|
+
return super().write(chunk)
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def notebook_manager(self) -> "BaseNotebookManager":
|
|
103
|
+
notebook_manager = getattr(self.serverapp, "notebook_manager", None)
|
|
104
|
+
if notebook_manager is None:
|
|
105
|
+
raise tornado.web.HTTPError(404, "Notebook manager not found")
|
|
106
|
+
return notebook_manager
|
|
107
|
+
|
|
108
|
+
def _safe_session_id(self, session_id: str) -> str:
|
|
109
|
+
"""Ensure the session id is a single, traversal-free path component.
|
|
110
|
+
|
|
111
|
+
The session id is taken straight from the URL and used to build the
|
|
112
|
+
snapshot filename, so reject anything that could escape the snapshot
|
|
113
|
+
directory before it reaches the storage layer.
|
|
114
|
+
"""
|
|
115
|
+
if not session_id:
|
|
116
|
+
raise tornado.web.HTTPError(400, "No session ID provided")
|
|
117
|
+
if session_id in (".", "..") or "/" in session_id or "\\" in session_id or "\x00" in session_id:
|
|
118
|
+
raise tornado.web.HTTPError(400, "Invalid session ID")
|
|
119
|
+
return session_id
|
|
120
|
+
|
|
121
|
+
async def head(self, session_id=None):
|
|
122
|
+
try:
|
|
123
|
+
snapshots = await self.notebook_manager.list_snapshots()
|
|
124
|
+
self.write(snapshots)
|
|
125
|
+
except Exception:
|
|
126
|
+
self.write({})
|
|
127
|
+
|
|
128
|
+
async def get(self, session_id):
|
|
129
|
+
session_id = self._safe_session_id(session_id)
|
|
130
|
+
try:
|
|
131
|
+
notebook = await self.notebook_manager.get_snapshot(session_id)
|
|
132
|
+
except FileNotFoundError:
|
|
133
|
+
notebook = None
|
|
134
|
+
if notebook is None:
|
|
135
|
+
raise tornado.web.HTTPError(404, "Notebook not found")
|
|
136
|
+
self.write(notebook)
|
|
137
|
+
|
|
138
|
+
async def post(self, session_id):
|
|
139
|
+
session_id = self._safe_session_id(session_id)
|
|
140
|
+
name = self.get_query_argument("name", None)
|
|
141
|
+
body = tornado.escape.json_decode(self.request.body)
|
|
142
|
+
content: "typing.Optional[NotebookContent]" = body.get("content", None)
|
|
143
|
+
if content is None:
|
|
144
|
+
raise tornado.web.HTTPError(400, "No notebook content provided in request body")
|
|
145
|
+
|
|
146
|
+
notebook: "NotebookInfo" = await self.notebook_manager.save_snapshot(
|
|
147
|
+
session_id=session_id,
|
|
148
|
+
content=content,
|
|
149
|
+
name=name,
|
|
150
|
+
)
|
|
151
|
+
self.write(notebook)
|
|
152
|
+
|
|
153
|
+
async def delete(self, session_id):
|
|
154
|
+
session_id = self._safe_session_id(session_id)
|
|
155
|
+
await self.notebook_manager.delete_snapshot(session_id)
|
|
156
|
+
self.set_status(204)
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
handlers = [
|
|
160
|
+
(r"/notebook/snapshot/?(?P<session_id>.*)/?$", SnapshotHandler),
|
|
161
|
+
(r"/notebook/?(?P<notebook_id>.*)/?$", NotebookHandler),
|
|
162
|
+
]
|
|
@@ -165,6 +165,13 @@ class BaseBeakerApp(ServerApp):
|
|
|
165
165
|
url_prefix = os.environ.get("BEAKER_SERVER_PREFIX", "").rstrip("/")
|
|
166
166
|
self.base_url = url_prefix
|
|
167
167
|
|
|
168
|
+
# Register Beaker-branded error templates ahead of Jupyter's defaults so that
|
|
169
|
+
# 404/500/generic error pages match the Beaker interface instead of the stock
|
|
170
|
+
# Jupyter pages. The jinja FileSystemLoader searches extra_template_paths first.
|
|
171
|
+
error_template_path = os.path.join(os.path.dirname(__file__), "error_templates")
|
|
172
|
+
if error_template_path not in self.extra_template_paths:
|
|
173
|
+
self.extra_template_paths = [*self.extra_template_paths, error_template_path]
|
|
174
|
+
|
|
168
175
|
super().initialize(argv, find_extensions, new_httpserver, starter_extension, **kwargs)
|
|
169
176
|
|
|
170
177
|
self.config["KernelProvisionerFactory"].setdefault("default_provisioner_name", "beaker-local-provisioner")
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Page not found · Beaker</title>
|
|
7
|
+
<link rel="icon" href="{{ base_url }}favicon.ico" />
|
|
8
|
+
<style>
|
|
9
|
+
html, body {
|
|
10
|
+
height: 100%;
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
13
|
+
body {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
padding: 1.5rem;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
background-color: #eff3f8;
|
|
20
|
+
color: #043d75;
|
|
21
|
+
font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
22
|
+
-webkit-font-smoothing: antialiased;
|
|
23
|
+
}
|
|
24
|
+
.beaker-error-card {
|
|
25
|
+
width: 100%;
|
|
26
|
+
max-width: 30rem;
|
|
27
|
+
background-color: #ffffff;
|
|
28
|
+
border: 1px solid #dfe7ef;
|
|
29
|
+
border-radius: 0.75rem;
|
|
30
|
+
box-shadow: 0 1px 3px rgba(4, 61, 117, 0.08);
|
|
31
|
+
padding: 2.5rem 2rem;
|
|
32
|
+
text-align: center;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
}
|
|
35
|
+
.beaker-error-logo {
|
|
36
|
+
width: 4rem;
|
|
37
|
+
height: 4rem;
|
|
38
|
+
margin-bottom: 1rem;
|
|
39
|
+
}
|
|
40
|
+
.beaker-error-code {
|
|
41
|
+
font-size: 3.5rem;
|
|
42
|
+
font-weight: 700;
|
|
43
|
+
line-height: 1;
|
|
44
|
+
color: #7254f3;
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
47
|
+
.beaker-error-title {
|
|
48
|
+
font-size: 1.35rem;
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
margin: 0.75rem 0 0.5rem;
|
|
51
|
+
}
|
|
52
|
+
.beaker-error-message {
|
|
53
|
+
font-size: 1rem;
|
|
54
|
+
line-height: 1.5;
|
|
55
|
+
color: #708da9;
|
|
56
|
+
margin: 0 0 1.75rem;
|
|
57
|
+
}
|
|
58
|
+
.beaker-error-button {
|
|
59
|
+
display: inline-block;
|
|
60
|
+
padding: 0.6rem 1.4rem;
|
|
61
|
+
background-color: #7254f3;
|
|
62
|
+
color: #ffffff;
|
|
63
|
+
font-size: 0.95rem;
|
|
64
|
+
font-weight: 700;
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
border-radius: 0.5rem;
|
|
67
|
+
transition: background-color 0.15s ease-in-out;
|
|
68
|
+
}
|
|
69
|
+
.beaker-error-button:hover {
|
|
70
|
+
background-color: #5f43e0;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
73
|
+
</head>
|
|
74
|
+
<body>
|
|
75
|
+
<main class="beaker-error-card">
|
|
76
|
+
<p class="beaker-error-code">404</p>
|
|
77
|
+
<h1 class="beaker-error-title">Page not found</h1>
|
|
78
|
+
<p class="beaker-error-message">
|
|
79
|
+
We couldn’t find the page you were looking for. It may have been moved
|
|
80
|
+
or no longer exists.
|
|
81
|
+
</p>
|
|
82
|
+
<a class="beaker-error-button" href="{{ base_url }}">Return to Beaker</a>
|
|
83
|
+
</main>
|
|
84
|
+
</body>
|
|
85
|
+
</html>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Something went wrong · Beaker</title>
|
|
7
|
+
<link rel="icon" href="{{ base_url }}favicon.ico" />
|
|
8
|
+
<style>
|
|
9
|
+
html, body {
|
|
10
|
+
height: 100%;
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
13
|
+
body {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
padding: 1.5rem;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
background-color: #eff3f8;
|
|
20
|
+
color: #043d75;
|
|
21
|
+
font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
22
|
+
-webkit-font-smoothing: antialiased;
|
|
23
|
+
}
|
|
24
|
+
.beaker-error-card {
|
|
25
|
+
width: 100%;
|
|
26
|
+
max-width: 30rem;
|
|
27
|
+
background-color: #ffffff;
|
|
28
|
+
border: 1px solid #dfe7ef;
|
|
29
|
+
border-radius: 0.75rem;
|
|
30
|
+
box-shadow: 0 1px 3px rgba(4, 61, 117, 0.08);
|
|
31
|
+
padding: 2.5rem 2rem;
|
|
32
|
+
text-align: center;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
}
|
|
35
|
+
.beaker-error-logo {
|
|
36
|
+
width: 4rem;
|
|
37
|
+
height: 4rem;
|
|
38
|
+
margin-bottom: 1rem;
|
|
39
|
+
}
|
|
40
|
+
.beaker-error-code {
|
|
41
|
+
font-size: 3.5rem;
|
|
42
|
+
font-weight: 700;
|
|
43
|
+
line-height: 1;
|
|
44
|
+
color: #7254f3;
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
47
|
+
.beaker-error-title {
|
|
48
|
+
font-size: 1.35rem;
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
margin: 0.75rem 0 0.5rem;
|
|
51
|
+
}
|
|
52
|
+
.beaker-error-message {
|
|
53
|
+
font-size: 1rem;
|
|
54
|
+
line-height: 1.5;
|
|
55
|
+
color: #708da9;
|
|
56
|
+
margin: 0 0 1.75rem;
|
|
57
|
+
}
|
|
58
|
+
.beaker-error-button {
|
|
59
|
+
display: inline-block;
|
|
60
|
+
padding: 0.6rem 1.4rem;
|
|
61
|
+
background-color: #7254f3;
|
|
62
|
+
color: #ffffff;
|
|
63
|
+
font-size: 0.95rem;
|
|
64
|
+
font-weight: 700;
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
border-radius: 0.5rem;
|
|
67
|
+
transition: background-color 0.15s ease-in-out;
|
|
68
|
+
}
|
|
69
|
+
.beaker-error-button:hover {
|
|
70
|
+
background-color: #5f43e0;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
73
|
+
</head>
|
|
74
|
+
<body>
|
|
75
|
+
<main class="beaker-error-card">
|
|
76
|
+
<p class="beaker-error-code">500</p>
|
|
77
|
+
<h1 class="beaker-error-title">Something went wrong</h1>
|
|
78
|
+
<p class="beaker-error-message">
|
|
79
|
+
Beaker ran into an unexpected problem while handling your request. Try again
|
|
80
|
+
in a moment — if the issue persists, check the server logs.
|
|
81
|
+
</p>
|
|
82
|
+
<a class="beaker-error-button" href="{{ base_url }}">Return to Beaker</a>
|
|
83
|
+
</main>
|
|
84
|
+
</body>
|
|
85
|
+
</html>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
NOTE: This directory holds Beaker-branded error pages that override Jupyter's
|
|
2
|
+
default error templates. They are plain HTML rendered through Jupyter's jinja
|
|
3
|
+
environment (via `extra_template_paths`), so the only template variables used
|
|
4
|
+
are the standard Jupyter namespace values (`base_url`, `status_code`,
|
|
5
|
+
`status_message`). Keep these pages self-contained: no external CSS/JS, and use
|
|
6
|
+
only the `{base_url}/beaker.svg` asset that the server already serves.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>Error {{ status_code }} · Beaker</title>
|
|
7
|
+
<link rel="icon" href="{{ base_url }}/favicon.ico" />
|
|
8
|
+
<style>
|
|
9
|
+
html, body {
|
|
10
|
+
height: 100%;
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
13
|
+
body {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
padding: 1.5rem;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
background-color: #eff3f8;
|
|
20
|
+
color: #043d75;
|
|
21
|
+
font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
22
|
+
-webkit-font-smoothing: antialiased;
|
|
23
|
+
}
|
|
24
|
+
.beaker-error-card {
|
|
25
|
+
width: 100%;
|
|
26
|
+
max-width: 30rem;
|
|
27
|
+
background-color: #ffffff;
|
|
28
|
+
border: 1px solid #dfe7ef;
|
|
29
|
+
border-radius: 0.75rem;
|
|
30
|
+
box-shadow: 0 1px 3px rgba(4, 61, 117, 0.08);
|
|
31
|
+
padding: 2.5rem 2rem;
|
|
32
|
+
text-align: center;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
}
|
|
35
|
+
.beaker-error-logo {
|
|
36
|
+
width: 4rem;
|
|
37
|
+
height: 4rem;
|
|
38
|
+
margin-bottom: 1rem;
|
|
39
|
+
}
|
|
40
|
+
.beaker-error-code {
|
|
41
|
+
font-size: 3.5rem;
|
|
42
|
+
font-weight: 700;
|
|
43
|
+
line-height: 1;
|
|
44
|
+
color: #7254f3;
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
47
|
+
.beaker-error-title {
|
|
48
|
+
font-size: 1.35rem;
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
margin: 0.75rem 0 0.5rem;
|
|
51
|
+
}
|
|
52
|
+
.beaker-error-message {
|
|
53
|
+
font-size: 1rem;
|
|
54
|
+
line-height: 1.5;
|
|
55
|
+
color: #708da9;
|
|
56
|
+
margin: 0 0 1.75rem;
|
|
57
|
+
}
|
|
58
|
+
.beaker-error-button {
|
|
59
|
+
display: inline-block;
|
|
60
|
+
padding: 0.6rem 1.4rem;
|
|
61
|
+
background-color: #7254f3;
|
|
62
|
+
color: #ffffff;
|
|
63
|
+
font-size: 0.95rem;
|
|
64
|
+
font-weight: 700;
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
border-radius: 0.5rem;
|
|
67
|
+
transition: background-color 0.15s ease-in-out;
|
|
68
|
+
}
|
|
69
|
+
.beaker-error-button:hover {
|
|
70
|
+
background-color: #5f43e0;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
73
|
+
</head>
|
|
74
|
+
<body>
|
|
75
|
+
<main class="beaker-error-card">
|
|
76
|
+
<img class="beaker-error-logo" src="{{ base_url }}/beaker.svg" alt="Beaker" />
|
|
77
|
+
<p class="beaker-error-code">{{ status_code }}</p>
|
|
78
|
+
<h1 class="beaker-error-title">{{ status_message }}</h1>
|
|
79
|
+
<p class="beaker-error-message">
|
|
80
|
+
Something went wrong while handling your request. You can head back and try
|
|
81
|
+
again.
|
|
82
|
+
</p>
|
|
83
|
+
<a class="beaker-error-button" href="{{ base_url }}/">Return to Beaker</a>
|
|
84
|
+
</main>
|
|
85
|
+
</body>
|
|
86
|
+
</html>
|
|
@@ -157,12 +157,16 @@ class ConfigController(JupyterHandler):
|
|
|
157
157
|
if type_args:
|
|
158
158
|
if isinstance(type_obj, UnionType):
|
|
159
159
|
type_def["type_str"] = repr(type_obj)
|
|
160
|
-
elif issubclass(type_origin, Choice):
|
|
160
|
+
elif isinstance(type_origin, type) and issubclass(type_origin, Choice):
|
|
161
161
|
source = get_args(type_args[0])[0]
|
|
162
162
|
type_def["type_str"] = f"{type_origin.__name__}['{source}']"
|
|
163
163
|
type_def["choice_source"] = source
|
|
164
|
+
elif isinstance(type_origin, type):
|
|
165
|
+
type_def["type_str"] = f"{type_origin.__name__}[{', '.join(getattr(arg, '__name__', repr(arg)) for arg in type_args)}]"
|
|
164
166
|
else:
|
|
165
|
-
|
|
167
|
+
# Non-class origins (e.g. typing.Literal[...]) have no __name__
|
|
168
|
+
# and aren't valid issubclass() args; represent them directly.
|
|
169
|
+
type_def["type_str"] = repr(type_obj)
|
|
166
170
|
if type_origin:
|
|
167
171
|
type_def["type_origin"] = ConfigController.map_type(type_origin)
|
|
168
172
|
if type_args:
|
|
@@ -185,7 +189,8 @@ class ConfigController(JupyterHandler):
|
|
|
185
189
|
type_def["default_value"] = default_value
|
|
186
190
|
except TypeError:
|
|
187
191
|
pass
|
|
188
|
-
except:
|
|
192
|
+
except Exception:
|
|
193
|
+
logger.exception("Failed to build config schema for type %r; falling back to repr", type_obj)
|
|
189
194
|
type_def["type_str"] = repr(type_obj)
|
|
190
195
|
return type_def
|
|
191
196
|
|
|
@@ -202,7 +207,13 @@ class ConfigController(JupyterHandler):
|
|
|
202
207
|
description = metadata.pop("description", None)
|
|
203
208
|
option_func = metadata.pop("options", None)
|
|
204
209
|
if option_func and callable(option_func):
|
|
205
|
-
|
|
210
|
+
try:
|
|
211
|
+
metadata["options"] = option_func()
|
|
212
|
+
except Exception:
|
|
213
|
+
# A failing options provider must not blank out the field (and,
|
|
214
|
+
# for nested schemas, the entire config form). Degrade gracefully.
|
|
215
|
+
logger.exception("Failed to resolve options for config field %r", field_name)
|
|
216
|
+
metadata["options"] = None
|
|
206
217
|
field_result = {
|
|
207
218
|
"name": field.name,
|
|
208
219
|
"description": description,
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
1
3
|
from beaker_notebook.app.base import BaseBeakerApp
|
|
2
4
|
from beaker_notebook.services.auth.notebook import NotebookAuthorizer, NotebookIdentityProvider
|
|
5
|
+
from beaker_notebook.services.storage import BEAKER_LOCAL_DATA_PATH
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
SNAPSHOT_PATH = Path(BEAKER_LOCAL_DATA_PATH / "notebooks").resolve()
|
|
3
9
|
|
|
4
10
|
|
|
5
11
|
class BeakerNotebookApp(BaseBeakerApp):
|
|
@@ -7,6 +13,9 @@ class BeakerNotebookApp(BaseBeakerApp):
|
|
|
7
13
|
defaults = {
|
|
8
14
|
"authorizer_class": NotebookAuthorizer,
|
|
9
15
|
"identity_provider_class": NotebookIdentityProvider,
|
|
16
|
+
"FileNotebookManager": {
|
|
17
|
+
"snapshot_path": str(SNAPSHOT_PATH)
|
|
18
|
+
}
|
|
10
19
|
}
|
|
11
20
|
|
|
12
21
|
if __name__ == "__main__":
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<link rel="icon" href="./favicon.ico">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<script type="module" crossorigin src="./static/index-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="./static/primevue-
|
|
7
|
+
<script type="module" crossorigin src="./static/index-DnOc0XzB.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="./static/primevue-Dsj7e3aU.js">
|
|
9
9
|
<link rel="modulepreload" crossorigin href="./static/jupyterlab-DCB4j3g5.js">
|
|
10
10
|
<link rel="stylesheet" crossorigin href="./static/index-CDHrXzwd.css">
|
|
11
11
|
</head>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as y,r as s,i,f as R,n as f,af as S}from"./primevue-Dsj7e3aU.js";const C=r=>{const e=y(r.cell),u=s(e.value.source===""),v=s(100),o=s(e.value.source),a=s(""),l=s(),c=i("session"),d=i("beakerSession"),x=S(),b=R(()=>[...r.cell.events]);function h(){const t=x?.root?.props?.config,m=t?t.extra?.send_notebook_state:void 0;e.value.source=o.value,u.value=!1,f(()=>{r.cell.execute(c,m).registerMessageHook(n=>(n.header?.msg_type==="stream"&&n.content?.name==="stderr"&&n.content?.text==="Request interrupted."?(e.value.last_execution={status:"abort"},e.value.events.push({type:"abort",content:"Request interrupted."}),n.cell=e.value):n.header?.msg_type==="llm_auth_failure"&&(n.cell=e.value),!0))})}function p(t){u.value||(u.value=!0),t==="start"?t=0:t==="end"&&(t=l.value?.$el?.value.length||-1),f(()=>{l.value?.$el?.focus(),l.value.$el.setSelectionRange(t,t)})}function _(){o.value===e.value.source?u.value=!1:l.value?.$el?.blur()}function g(){e.value.source="",u.value=!0,v.value=100,o.value="",a.value=""}function k(){a.value.trim()&&(r.cell.respond(a.value,c),a.value="")}return{cell:e,isEditing:u,promptEditorMinHeight:v,promptText:o,response:a,textarea:l,session:c,beakerSession:d,events:b,execute:h,enter:p,exit:_,clear:g,respond:k}};export{C as u};
|