sage-agent-internal 0.1.29__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.
Files changed (197) hide show
  1. sage_agent_internal-0.1.29/.copier-answers.yml +14 -0
  2. sage_agent_internal-0.1.29/.gitignore +129 -0
  3. sage_agent_internal-0.1.29/.keep +0 -0
  4. sage_agent_internal-0.1.29/.prettierignore +6 -0
  5. sage_agent_internal-0.1.29/.vscode/settings.json +8 -0
  6. sage_agent_internal-0.1.29/.yarnrc.yml +1 -0
  7. sage_agent_internal-0.1.29/CHANGELOG.md +5 -0
  8. sage_agent_internal-0.1.29/LICENSE +29 -0
  9. sage_agent_internal-0.1.29/PKG-INFO +154 -0
  10. sage_agent_internal-0.1.29/README.md +98 -0
  11. sage_agent_internal-0.1.29/RELEASE.md +80 -0
  12. sage_agent_internal-0.1.29/__tests__/sage_agent.spec.ts +9 -0
  13. sage_agent_internal-0.1.29/babel.config.js +1 -0
  14. sage_agent_internal-0.1.29/cli-chat-tool/index.ts +341 -0
  15. sage_agent_internal-0.1.29/cli-chat-tool/package-lock.json +923 -0
  16. sage_agent_internal-0.1.29/cli-chat-tool/package.json +16 -0
  17. sage_agent_internal-0.1.29/cli-chat-tool/tsconfig.json +23 -0
  18. sage_agent_internal-0.1.29/cli-chat-tool/yarn.lock +610 -0
  19. sage_agent_internal-0.1.29/eval_output.json +44 -0
  20. sage_agent_internal-0.1.29/eval_prompt.txt +1 -0
  21. sage_agent_internal-0.1.29/install.json +5 -0
  22. sage_agent_internal-0.1.29/jest.config.js +28 -0
  23. sage_agent_internal-0.1.29/package-lock.json +12123 -0
  24. sage_agent_internal-0.1.29/package.json +223 -0
  25. sage_agent_internal-0.1.29/pyproject.toml +78 -0
  26. sage_agent_internal-0.1.29/sage_agent/__init__.py +16 -0
  27. sage_agent_internal-0.1.29/sage_agent/_version.py +4 -0
  28. sage_agent_internal-0.1.29/sage_agent/labextension/package.json +228 -0
  29. sage_agent_internal-0.1.29/sage_agent/labextension/schemas/sage-agent-internal/package.json.orig +223 -0
  30. sage_agent_internal-0.1.29/sage_agent/labextension/schemas/sage-agent-internal/plugin.json +101 -0
  31. sage_agent_internal-0.1.29/sage_agent/labextension/static/122.3c2c200586e65203b674.js +1 -0
  32. sage_agent_internal-0.1.29/sage_agent/labextension/static/220.d384edfd5bbcfda33a2a.js +1 -0
  33. sage_agent_internal-0.1.29/sage_agent/labextension/static/262.3fc4ad88e6f8c273d4ad.js +1 -0
  34. sage_agent_internal-0.1.29/sage_agent/labextension/static/364.c2fb82c6f484097228c6.js +1 -0
  35. sage_agent_internal-0.1.29/sage_agent/labextension/static/379.b3bf2f8d00bdb186e6f8.js +1 -0
  36. sage_agent_internal-0.1.29/sage_agent/labextension/static/424.3b3fb442cd5b6d6b9e74.js +1 -0
  37. sage_agent_internal-0.1.29/sage_agent/labextension/static/439.61293ec148172a793000.js +1 -0
  38. sage_agent_internal-0.1.29/sage_agent/labextension/static/481.96b91d018df31d54d173.js +1 -0
  39. sage_agent_internal-0.1.29/sage_agent/labextension/static/540.283f7cceb475717261ed.js +1 -0
  40. sage_agent_internal-0.1.29/sage_agent/labextension/static/553.b7906877d98a62265533.js +2 -0
  41. sage_agent_internal-0.1.29/sage_agent/labextension/static/553.b7906877d98a62265533.js.LICENSE.txt +15 -0
  42. sage_agent_internal-0.1.29/sage_agent/labextension/static/713.103cb5ae248be385b08a.js +1 -0
  43. sage_agent_internal-0.1.29/sage_agent/labextension/static/742.b204789055ded4e07883.js +1 -0
  44. sage_agent_internal-0.1.29/sage_agent/labextension/static/845.cc2bc80fbfea6d20a396.js +1 -0
  45. sage_agent_internal-0.1.29/sage_agent/labextension/static/888.09382cc93a2ad3932b31.js +1 -0
  46. sage_agent_internal-0.1.29/sage_agent/labextension/static/982.e8f28fa7892d44e0d1bb.js +2 -0
  47. sage_agent_internal-0.1.29/sage_agent/labextension/static/982.e8f28fa7892d44e0d1bb.js.LICENSE.txt +1 -0
  48. sage_agent_internal-0.1.29/sage_agent/labextension/static/remoteEntry.1acdc371c6221961790f.js +1 -0
  49. sage_agent_internal-0.1.29/sage_agent/labextension/static/style.js +4 -0
  50. sage_agent_internal-0.1.29/sage_agent/labextension/static/third-party-licenses.json +268 -0
  51. sage_agent_internal-0.1.29/schema/plugin.json +101 -0
  52. sage_agent_internal-0.1.29/setup.py +1 -0
  53. sage_agent_internal-0.1.29/src/AppState.ts +1038 -0
  54. sage_agent_internal-0.1.29/src/BackendTools/DatabaseTools.ts +530 -0
  55. sage_agent_internal-0.1.29/src/BackendTools/FilesystemTools.ts +215 -0
  56. sage_agent_internal-0.1.29/src/BackendTools/WebTools.ts +244 -0
  57. sage_agent_internal-0.1.29/src/BackendTools/index.ts +3 -0
  58. sage_agent_internal-0.1.29/src/BackendTools/tickers.json +50297 -0
  59. sage_agent_internal-0.1.29/src/CellTrackingService.ts +172 -0
  60. sage_agent_internal-0.1.29/src/Chat/ActionHistory.ts +128 -0
  61. sage_agent_internal-0.1.29/src/Chat/ChatContextMenu/ChatContextLoaders.ts +277 -0
  62. sage_agent_internal-0.1.29/src/Chat/ChatContextMenu/ChatContextMenu.ts +864 -0
  63. sage_agent_internal-0.1.29/src/Chat/ChatContextMenu/ChatContextMenuLogic.ts +522 -0
  64. sage_agent_internal-0.1.29/src/Chat/ChatContextMenu/ChatContextMenuUtils.ts +387 -0
  65. sage_agent_internal-0.1.29/src/Chat/ChatContextMenu/ContextCacheService.ts +281 -0
  66. sage_agent_internal-0.1.29/src/Chat/ChatContextMenu/ContextCellHighlighter.ts +1406 -0
  67. sage_agent_internal-0.1.29/src/Chat/ChatContextMenu/KernelExecutionListener.ts +265 -0
  68. sage_agent_internal-0.1.29/src/Chat/ChatContextMenu/icons.ts +44 -0
  69. sage_agent_internal-0.1.29/src/Chat/ChatHistoryManager.ts +660 -0
  70. sage_agent_internal-0.1.29/src/Chat/ChatInputManager.ts +707 -0
  71. sage_agent_internal-0.1.29/src/Chat/ChatMessages.ts +1303 -0
  72. sage_agent_internal-0.1.29/src/Chat/ChatUIHelper.ts +105 -0
  73. sage_agent_internal-0.1.29/src/Chat/ConversationService.ts +551 -0
  74. sage_agent_internal-0.1.29/src/Chat/ConversationServiceUtils.ts +1528 -0
  75. sage_agent_internal-0.1.29/src/Chat/RichTextChatInput.ts +348 -0
  76. sage_agent_internal-0.1.29/src/CodebaseManager.ts +449 -0
  77. sage_agent_internal-0.1.29/src/Components/ChatboxContext.ts +279 -0
  78. sage_agent_internal-0.1.29/src/Components/CodeConfirmationDialog.ts +223 -0
  79. sage_agent_internal-0.1.29/src/Components/DiffApprovalDialog.ts +1060 -0
  80. sage_agent_internal-0.1.29/src/Components/LLMStateDisplay/DiffItem.tsx +251 -0
  81. sage_agent_internal-0.1.29/src/Components/LLMStateDisplay/LLMStateContent.tsx +302 -0
  82. sage_agent_internal-0.1.29/src/Components/LLMStateDisplay/LLMStateDisplay.tsx +246 -0
  83. sage_agent_internal-0.1.29/src/Components/LLMStateDisplay/icons.ts +19 -0
  84. sage_agent_internal-0.1.29/src/Components/LLMStateDisplay/index.ts +4 -0
  85. sage_agent_internal-0.1.29/src/Components/LLMStateDisplay/types.ts +36 -0
  86. sage_agent_internal-0.1.29/src/Components/MoreOptionsDisplay.tsx +287 -0
  87. sage_agent_internal-0.1.29/src/Components/NewChatDisplayWidget.ts +80 -0
  88. sage_agent_internal-0.1.29/src/Components/PlanStateDisplay.tsx +295 -0
  89. sage_agent_internal-0.1.29/src/Components/RejectionFeedbackDialog.ts +52 -0
  90. sage_agent_internal-0.1.29/src/Components/Settings/SettingsWidget.tsx +649 -0
  91. sage_agent_internal-0.1.29/src/Components/SnippetCreationWidget/SnippetCreationContent.tsx +108 -0
  92. sage_agent_internal-0.1.29/src/Components/SnippetCreationWidget/SnippetCreationWidget.tsx +367 -0
  93. sage_agent_internal-0.1.29/src/Components/SnippetCreationWidget/SnippetForm.tsx +68 -0
  94. sage_agent_internal-0.1.29/src/Components/SnippetCreationWidget/SnippetFormModal.tsx +95 -0
  95. sage_agent_internal-0.1.29/src/Components/SnippetCreationWidget/SnippetList.tsx +288 -0
  96. sage_agent_internal-0.1.29/src/Components/SnippetCreationWidget/index.ts +6 -0
  97. sage_agent_internal-0.1.29/src/Components/SnippetCreationWidget/types.ts +67 -0
  98. sage_agent_internal-0.1.29/src/Components/UpdateBanner/UpdateBannerWidget.tsx +416 -0
  99. sage_agent_internal-0.1.29/src/Components/chatbox.ts +1560 -0
  100. sage_agent_internal-0.1.29/src/Components/icons.ts +49 -0
  101. sage_agent_internal-0.1.29/src/Config/ConfigService.ts +150 -0
  102. sage_agent_internal-0.1.29/src/Config/models.json +64 -0
  103. sage_agent_internal-0.1.29/src/Config/optional_env.json +3 -0
  104. sage_agent_internal-0.1.29/src/Config/prompts/claude_system_prompt.md +88 -0
  105. sage_agent_internal-0.1.29/src/Config/prompts/claude_system_prompt_ask_mode.md +78 -0
  106. sage_agent_internal-0.1.29/src/Config/prompts/claude_system_prompt_edit_full_cell.md +22 -0
  107. sage_agent_internal-0.1.29/src/Config/prompts/claude_system_prompt_edit_selection.md +41 -0
  108. sage_agent_internal-0.1.29/src/Config/prompts/claude_system_prompt_fast_mode.md +31 -0
  109. sage_agent_internal-0.1.29/src/Config/tools.json +310 -0
  110. sage_agent_internal-0.1.29/src/Notebook/InlineDiffService.ts +450 -0
  111. sage_agent_internal-0.1.29/src/Notebook/NotebookCellTools.ts +1153 -0
  112. sage_agent_internal-0.1.29/src/Notebook/NotebookChatContainer.ts +128 -0
  113. sage_agent_internal-0.1.29/src/Notebook/NotebookContextManager.ts +272 -0
  114. sage_agent_internal-0.1.29/src/Notebook/NotebookDiffManager.ts +891 -0
  115. sage_agent_internal-0.1.29/src/Notebook/NotebookDiffTools.ts +540 -0
  116. sage_agent_internal-0.1.29/src/Notebook/NotebookStateService.ts +152 -0
  117. sage_agent_internal-0.1.29/src/Notebook/NotebookTools.ts +583 -0
  118. sage_agent_internal-0.1.29/src/Notebook/WaitingUserReplyBoxManager.ts +39 -0
  119. sage_agent_internal-0.1.29/src/NotebookSettingsContainer.ts +35 -0
  120. sage_agent_internal-0.1.29/src/Services/AnthropicMessageCreator.ts +276 -0
  121. sage_agent_internal-0.1.29/src/Services/AnthropicService.ts +755 -0
  122. sage_agent_internal-0.1.29/src/Services/AnthropicStreamHandler.ts +428 -0
  123. sage_agent_internal-0.1.29/src/Services/DatabaseMetadataCache.ts +590 -0
  124. sage_agent_internal-0.1.29/src/Services/DiffStateService.ts +515 -0
  125. sage_agent_internal-0.1.29/src/Services/IChatService.ts +125 -0
  126. sage_agent_internal-0.1.29/src/Services/NotebookCellStateService.ts +471 -0
  127. sage_agent_internal-0.1.29/src/Services/ServiceFactory.ts +32 -0
  128. sage_agent_internal-0.1.29/src/Services/ServiceUtils.ts +367 -0
  129. sage_agent_internal-0.1.29/src/Services/ToolService.ts +759 -0
  130. sage_agent_internal-0.1.29/src/ThreadManager.ts +546 -0
  131. sage_agent_internal-0.1.29/src/TrackingIDUtility.ts +174 -0
  132. sage_agent_internal-0.1.29/src/commands.ts +623 -0
  133. sage_agent_internal-0.1.29/src/eval_commands.ts +144 -0
  134. sage_agent_internal-0.1.29/src/index.ts +15 -0
  135. sage_agent_internal-0.1.29/src/plugin.ts +932 -0
  136. sage_agent_internal-0.1.29/src/types/json.d.ts +14 -0
  137. sage_agent_internal-0.1.29/src/types.ts +75 -0
  138. sage_agent_internal-0.1.29/src/utils/VariableExtractor.ts +147 -0
  139. sage_agent_internal-0.1.29/src/utils/caching.ts +206 -0
  140. sage_agent_internal-0.1.29/src/utils/kernelPreview.ts +917 -0
  141. sage_agent_internal-0.1.29/src/utils/kernelUtils.ts +191 -0
  142. sage_agent_internal-0.1.29/src/utils/stateDBCaching.ts +153 -0
  143. sage_agent_internal-0.1.29/src/utils/tokenUtils.ts +91 -0
  144. sage_agent_internal-0.1.29/src/utils/toolDisplay.ts +145 -0
  145. sage_agent_internal-0.1.29/src/utils.ts +3 -0
  146. sage_agent_internal-0.1.29/style/base.css +1891 -0
  147. sage_agent_internal-0.1.29/style/chat-container.css +59 -0
  148. sage_agent_internal-0.1.29/style/chat-mention-dropdown.css +206 -0
  149. sage_agent_internal-0.1.29/style/code-mirror-merge.css +15 -0
  150. sage_agent_internal-0.1.29/style/codebase-manager.css +169 -0
  151. sage_agent_internal-0.1.29/style/diff-approval.css +201 -0
  152. sage_agent_internal-0.1.29/style/diff-edit-mode.css +57 -0
  153. sage_agent_internal-0.1.29/style/diff-mode.css +25 -0
  154. sage_agent_internal-0.1.29/style/fonts.css +30 -0
  155. sage_agent_internal-0.1.29/style/icons/chat_input/agent-mode-shiny.svg +29 -0
  156. sage_agent_internal-0.1.29/style/icons/chat_input/agent-mode.svg +3 -0
  157. sage_agent_internal-0.1.29/style/icons/chat_input/ask-mode.svg +3 -0
  158. sage_agent_internal-0.1.29/style/icons/chat_input/hands-on-mode.svg +3 -0
  159. sage_agent_internal-0.1.29/style/icons/chat_input/open.svg +3 -0
  160. sage_agent_internal-0.1.29/style/icons/chat_input/reapply.svg +1 -0
  161. sage_agent_internal-0.1.29/style/icons/chat_input/search.svg +4 -0
  162. sage_agent_internal-0.1.29/style/icons/chat_input/send.svg +3 -0
  163. sage_agent_internal-0.1.29/style/icons/chat_input/stop.svg +3 -0
  164. sage_agent_internal-0.1.29/style/icons/context_menu/cell.svg +3 -0
  165. sage_agent_internal-0.1.29/style/icons/context_menu/data.svg +10 -0
  166. sage_agent_internal-0.1.29/style/icons/context_menu/insert.svg +8 -0
  167. sage_agent_internal-0.1.29/style/icons/context_menu/search.svg +3 -0
  168. sage_agent_internal-0.1.29/style/icons/context_menu/snippets.svg +3 -0
  169. sage_agent_internal-0.1.29/style/icons/context_menu/variable.svg +3 -0
  170. sage_agent_internal-0.1.29/style/icons/state_display/menu-close.svg +3 -0
  171. sage_agent_internal-0.1.29/style/icons/state_display/menu-icon.svg +3 -0
  172. sage_agent_internal-0.1.29/style/icons/state_display/run_cell.svg +4 -0
  173. sage_agent_internal-0.1.29/style/index.css +22 -0
  174. sage_agent_internal-0.1.29/style/index.js +18 -0
  175. sage_agent_internal-0.1.29/style/inline-diff-approval.css +218 -0
  176. sage_agent_internal-0.1.29/style/left-side-menu.css +211 -0
  177. sage_agent_internal-0.1.29/style/llm-state-display.css +456 -0
  178. sage_agent_internal-0.1.29/style/minus-icon.css +31 -0
  179. sage_agent_internal-0.1.29/style/modal.css +283 -0
  180. sage_agent_internal-0.1.29/style/mode-selector-dropdown.css +305 -0
  181. sage_agent_internal-0.1.29/style/more-options.css +73 -0
  182. sage_agent_internal-0.1.29/style/new-chat-display.css +99 -0
  183. sage_agent_internal-0.1.29/style/plan-state-display.css +286 -0
  184. sage_agent_internal-0.1.29/style/settings-widget.css +225 -0
  185. sage_agent_internal-0.1.29/style/snippet-creation.css +887 -0
  186. sage_agent_internal-0.1.29/style/style.css +0 -0
  187. sage_agent_internal-0.1.29/style/update-banner.css +180 -0
  188. sage_agent_internal-0.1.29/templates/rule.example.md +21 -0
  189. sage_agent_internal-0.1.29/tsconfig.json +25 -0
  190. sage_agent_internal-0.1.29/tsconfig.test.json +3 -0
  191. sage_agent_internal-0.1.29/ui-tests/README.md +167 -0
  192. sage_agent_internal-0.1.29/ui-tests/jupyter_server_test_config.py +12 -0
  193. sage_agent_internal-0.1.29/ui-tests/package.json +15 -0
  194. sage_agent_internal-0.1.29/ui-tests/playwright.config.js +14 -0
  195. sage_agent_internal-0.1.29/ui-tests/tests/sage_agent.spec.ts +36 -0
  196. sage_agent_internal-0.1.29/ui-tests/yarn.lock +0 -0
  197. sage_agent_internal-0.1.29/yarn.lock +11101 -0
@@ -0,0 +1,14 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: v4.3.8
3
+ _src_path: https://github.com/jupyterlab/extension-template
4
+ author_email: danielschaffield@gmail.com
5
+ author_name: Daniel Schaffield
6
+ has_binder: true
7
+ has_settings: true
8
+ kind: frontend
9
+ labextension_name: sage-agent
10
+ project_short_description: Sage Agent - Your Jupyter Notebook Assistant
11
+ python_name: sage_agent
12
+ repository: https://github.com/AlpineX-Labs/jupyter-sage-agent
13
+ test: true
14
+
@@ -0,0 +1,129 @@
1
+ *.bundle.*
2
+ lib/
3
+ node_modules/
4
+ *.log
5
+ .eslintcache
6
+ .stylelintcache
7
+ *.egg-info/
8
+ .ipynb_checkpoints
9
+ *.tsbuildinfo
10
+ sage_agent/labextension
11
+ # Version file is handled by hatchling
12
+ sage_agent/_version.py
13
+
14
+ # Integration tests
15
+ ui-tests/test-results/
16
+ ui-tests/playwright-report/
17
+
18
+ # Created by https://www.gitignore.io/api/python
19
+ # Edit at https://www.gitignore.io/?templates=python
20
+
21
+ ### Python ###
22
+ # Byte-compiled / optimized / DLL files
23
+ __pycache__/
24
+ *.py[cod]
25
+ *$py.class
26
+
27
+ # C extensions
28
+ *.so
29
+
30
+ # Distribution / packaging
31
+ .Python
32
+ build/
33
+ develop-eggs/
34
+ dist/
35
+ downloads/
36
+ eggs/
37
+ .eggs/
38
+ lib/
39
+ lib64/
40
+ parts/
41
+ sdist/
42
+ var/
43
+ wheels/
44
+ pip-wheel-metadata/
45
+ share/python-wheels/
46
+ .installed.cfg
47
+ *.egg
48
+ MANIFEST
49
+
50
+ # PyInstaller
51
+ # Usually these files are written by a python script from a template
52
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
53
+ *.manifest
54
+ *.spec
55
+
56
+ # Installer logs
57
+ pip-log.txt
58
+ pip-delete-this-directory.txt
59
+
60
+ # Unit test / coverage reports
61
+ htmlcov/
62
+ .tox/
63
+ .nox/
64
+ .coverage
65
+ .coverage.*
66
+ .cache
67
+ nosetests.xml
68
+ coverage/
69
+ coverage.xml
70
+ *.cover
71
+ .hypothesis/
72
+ .pytest_cache/
73
+
74
+ # Translations
75
+ *.mo
76
+ *.pot
77
+
78
+ # Scrapy stuff:
79
+ .scrapy
80
+
81
+ # Sphinx documentation
82
+ docs/_build/
83
+
84
+ # PyBuilder
85
+ target/
86
+
87
+ # pyenv
88
+ .python-version
89
+
90
+ # celery beat schedule file
91
+ celerybeat-schedule
92
+
93
+ # SageMath parsed files
94
+ *.sage.py
95
+
96
+ # Spyder project settings
97
+ .spyderproject
98
+ .spyproject
99
+
100
+ # Rope project settings
101
+ .ropeproject
102
+
103
+ # Mr Developer
104
+ .mr.developer.cfg
105
+ .project
106
+ .pydevproject
107
+
108
+ # mkdocs documentation
109
+ /site
110
+
111
+ # mypy
112
+ .mypy_cache/
113
+ .dmypy.json
114
+ dmypy.json
115
+
116
+ # Pyre type checker
117
+ .pyre/
118
+
119
+ # End of https://www.gitignore.io/api/python
120
+
121
+ # OSX files
122
+ .DS_Store
123
+
124
+ # Yarn cache
125
+ .yarn/
126
+
127
+ *.ipynb
128
+
129
+ .env
File without changes
@@ -0,0 +1,6 @@
1
+ node_modules
2
+ **/node_modules
3
+ **/lib
4
+ **/package.json
5
+ !/package.json
6
+ sage_agent
@@ -0,0 +1,8 @@
1
+ {
2
+ "github.copilot.enable": {
3
+ "*": true,
4
+ "plaintext": false,
5
+ "markdown": true,
6
+ "scminput": false
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ nodeLinker: node-modules
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ <!-- <START NEW CHANGELOG ENTRY> -->
4
+
5
+ <!-- <END NEW CHANGELOG ENTRY> -->
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2025, Daniel Schaffield
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,154 @@
1
+ Metadata-Version: 2.4
2
+ Name: sage_agent_internal
3
+ Version: 0.1.29
4
+ Summary: Sage Agent - Your Jupyter Notebook Assistant
5
+ Project-URL: Homepage, https://github.com/AlpineX-Labs/jupyter-sage-agent
6
+ Project-URL: Bug Tracker, https://github.com/AlpineX-Labs/jupyter-sage-agent/issues
7
+ Project-URL: Repository, https://github.com/AlpineX-Labs/jupyter-sage-agent.git
8
+ Author-email: Daniel Schaffield <danielschaffield@gmail.com>
9
+ License: BSD 3-Clause License
10
+
11
+ Copyright (c) 2025, Daniel Schaffield
12
+ All rights reserved.
13
+
14
+ Redistribution and use in source and binary forms, with or without
15
+ modification, are permitted provided that the following conditions are met:
16
+
17
+ 1. Redistributions of source code must retain the above copyright notice, this
18
+ list of conditions and the following disclaimer.
19
+
20
+ 2. Redistributions in binary form must reproduce the above copyright notice,
21
+ this list of conditions and the following disclaimer in the documentation
22
+ and/or other materials provided with the distribution.
23
+
24
+ 3. Neither the name of the copyright holder nor the names of its
25
+ contributors may be used to endorse or promote products derived from
26
+ this software without specific prior written permission.
27
+
28
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
32
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
34
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
36
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38
+ License-File: LICENSE
39
+ Keywords: jupyter,jupyterlab,jupyterlab-extension
40
+ Classifier: Framework :: Jupyter
41
+ Classifier: Framework :: Jupyter :: JupyterLab
42
+ Classifier: Framework :: Jupyter :: JupyterLab :: 4
43
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
44
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
45
+ Classifier: License :: OSI Approved :: BSD License
46
+ Classifier: Programming Language :: Python
47
+ Classifier: Programming Language :: Python :: 3
48
+ Classifier: Programming Language :: Python :: 3.6
49
+ Classifier: Programming Language :: Python :: 3.9
50
+ Classifier: Programming Language :: Python :: 3.10
51
+ Classifier: Programming Language :: Python :: 3.11
52
+ Classifier: Programming Language :: Python :: 3.12
53
+ Classifier: Programming Language :: Python :: 3.13
54
+ Requires-Python: >=3.6
55
+ Description-Content-Type: text/markdown
56
+
57
+ # sage_agent
58
+
59
+ [![Github Actions Status](https://github.com/AlpineX-Labs/jupyter-sage-agent/workflows/Build/badge.svg)](https://github.com/AlpineX-Labs/jupyter-sage-agent/actions/workflows/build.yml)
60
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/AlpineX-Labs/jupyter-sage-agent/main?urlpath=lab)
61
+
62
+ Sage Agent - Your Jupyter Notebook Assistant
63
+
64
+ ## Requirements
65
+
66
+ - JupyterLab >= 4.0.0
67
+
68
+ ## Install
69
+
70
+ To install the extension, execute:
71
+
72
+ ```bash
73
+ pip install sage_agent
74
+ ```
75
+
76
+ ## Uninstall
77
+
78
+ To remove the extension, execute:
79
+
80
+ ```bash
81
+ pip uninstall sage_agent
82
+ ```
83
+
84
+ ## Contributing
85
+
86
+ ### Development install
87
+
88
+ Note: You will need NodeJS to build the extension package.
89
+
90
+ The `jlpm` command is JupyterLab's pinned version of
91
+ [yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
92
+ `yarn` or `npm` in lieu of `jlpm` below.
93
+
94
+ ```bash
95
+ # Clone the repo to your local environment
96
+ # Change directory to the sage_agent directory
97
+ # Install package in development mode
98
+ pip install -e "."
99
+ # Link your development version of the extension with JupyterLab
100
+ jupyter labextension develop . --overwrite
101
+ # Rebuild extension Typescript source after making changes
102
+ jlpm build
103
+ ```
104
+
105
+ You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
106
+
107
+ ```bash
108
+ # Watch the source directory in one terminal, automatically rebuilding when needed
109
+ jlpm watch
110
+ # Run JupyterLab in another terminal
111
+ jupyter lab
112
+ ```
113
+
114
+ With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
115
+
116
+ By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
117
+
118
+ ```bash
119
+ jupyter lab build --minimize=False
120
+ ```
121
+
122
+ ### Development uninstall
123
+
124
+ ```bash
125
+ pip uninstall sage_agent
126
+ ```
127
+
128
+ In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
129
+ command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
130
+ folder is located. Then you can remove the symlink named `sage-agent` within that folder.
131
+
132
+ ### Testing the extension
133
+
134
+ #### Frontend tests
135
+
136
+ This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
137
+
138
+ To execute them, execute:
139
+
140
+ ```sh
141
+ jlpm
142
+ jlpm test
143
+ ```
144
+
145
+ #### Integration tests
146
+
147
+ This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
148
+ More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
149
+
150
+ More information are provided within the [ui-tests](./ui-tests/README.md) README.
151
+
152
+ ### Packaging the extension
153
+
154
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,98 @@
1
+ # sage_agent
2
+
3
+ [![Github Actions Status](https://github.com/AlpineX-Labs/jupyter-sage-agent/workflows/Build/badge.svg)](https://github.com/AlpineX-Labs/jupyter-sage-agent/actions/workflows/build.yml)
4
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/AlpineX-Labs/jupyter-sage-agent/main?urlpath=lab)
5
+
6
+ Sage Agent - Your Jupyter Notebook Assistant
7
+
8
+ ## Requirements
9
+
10
+ - JupyterLab >= 4.0.0
11
+
12
+ ## Install
13
+
14
+ To install the extension, execute:
15
+
16
+ ```bash
17
+ pip install sage_agent
18
+ ```
19
+
20
+ ## Uninstall
21
+
22
+ To remove the extension, execute:
23
+
24
+ ```bash
25
+ pip uninstall sage_agent
26
+ ```
27
+
28
+ ## Contributing
29
+
30
+ ### Development install
31
+
32
+ Note: You will need NodeJS to build the extension package.
33
+
34
+ The `jlpm` command is JupyterLab's pinned version of
35
+ [yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
36
+ `yarn` or `npm` in lieu of `jlpm` below.
37
+
38
+ ```bash
39
+ # Clone the repo to your local environment
40
+ # Change directory to the sage_agent directory
41
+ # Install package in development mode
42
+ pip install -e "."
43
+ # Link your development version of the extension with JupyterLab
44
+ jupyter labextension develop . --overwrite
45
+ # Rebuild extension Typescript source after making changes
46
+ jlpm build
47
+ ```
48
+
49
+ You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
50
+
51
+ ```bash
52
+ # Watch the source directory in one terminal, automatically rebuilding when needed
53
+ jlpm watch
54
+ # Run JupyterLab in another terminal
55
+ jupyter lab
56
+ ```
57
+
58
+ With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
59
+
60
+ By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
61
+
62
+ ```bash
63
+ jupyter lab build --minimize=False
64
+ ```
65
+
66
+ ### Development uninstall
67
+
68
+ ```bash
69
+ pip uninstall sage_agent
70
+ ```
71
+
72
+ In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
73
+ command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
74
+ folder is located. Then you can remove the symlink named `sage-agent` within that folder.
75
+
76
+ ### Testing the extension
77
+
78
+ #### Frontend tests
79
+
80
+ This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
81
+
82
+ To execute them, execute:
83
+
84
+ ```sh
85
+ jlpm
86
+ jlpm test
87
+ ```
88
+
89
+ #### Integration tests
90
+
91
+ This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
92
+ More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
93
+
94
+ More information are provided within the [ui-tests](./ui-tests/README.md) README.
95
+
96
+ ### Packaging the extension
97
+
98
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,80 @@
1
+ # Making a new release of sage_agent
2
+
3
+ The extension can be published to `PyPI` and `npm` manually or using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser).
4
+
5
+ ## Manual release
6
+
7
+ ### Python package
8
+
9
+ This extension can be distributed as Python packages. All of the Python
10
+ packaging instructions are in the `pyproject.toml` file to wrap your extension in a
11
+ Python package. Before generating a package, you first need to install some tools:
12
+
13
+ ```bash
14
+ pip install build twine hatch
15
+ ```
16
+
17
+ Bump the version using `hatch`. By default this will create a tag.
18
+ See the docs on [hatch-nodejs-version](https://github.com/agoose77/hatch-nodejs-version#semver) for details.
19
+
20
+ ```bash
21
+ hatch version <new-version>
22
+ ```
23
+
24
+ Make sure to clean up all the development files before building the package:
25
+
26
+ ```bash
27
+ jlpm clean:all
28
+ ```
29
+
30
+ You could also clean up the local git repository:
31
+
32
+ ```bash
33
+ git clean -dfX
34
+ ```
35
+
36
+ To create a Python source package (`.tar.gz`) and the binary package (`.whl`) in the `dist/` directory, do:
37
+
38
+ ```bash
39
+ python -m build
40
+ ```
41
+
42
+ > `python setup.py sdist bdist_wheel` is deprecated and will not work for this package.
43
+
44
+ Then to upload the package to PyPI, do:
45
+
46
+ ```bash
47
+ twine upload dist/*
48
+ ```
49
+
50
+ ### NPM package
51
+
52
+ To publish the frontend part of the extension as a NPM package, do:
53
+
54
+ ```bash
55
+ npm login
56
+ npm publish --access public
57
+ ```
58
+
59
+ ## Automated releases with the Jupyter Releaser
60
+
61
+ The extension repository should already be compatible with the Jupyter Releaser. But
62
+ the GitHub repository and the package managers need to be properly set up. Please
63
+ follow the instructions of the Jupyter Releaser [checklist](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_repo.html).
64
+
65
+ Here is a summary of the steps to cut a new release:
66
+
67
+ - Go to the Actions panel
68
+ - Run the "Step 1: Prep Release" workflow
69
+ - Check the draft changelog
70
+ - Run the "Step 2: Publish Release" workflow
71
+
72
+ > [!NOTE]
73
+ > Check out the [workflow documentation](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html)
74
+ > for more information.
75
+
76
+ ## Publishing to `conda-forge`
77
+
78
+ If the package is not on conda forge yet, check the documentation to learn how to add it: https://conda-forge.org/docs/maintainer/adding_pkgs.html
79
+
80
+ Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Example of [Jest](https://jestjs.io/docs/getting-started) unit tests
3
+ */
4
+
5
+ describe('sage-agent', () => {
6
+ it('should be tested', () => {
7
+ expect(1 + 1).toEqual(2);
8
+ });
9
+ });
@@ -0,0 +1 @@
1
+ module.exports = require('@jupyterlab/testutils/lib/babel.config');