kash-shell 0.3.8__tar.gz → 0.3.9__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 (301) hide show
  1. {kash_shell-0.3.8 → kash_shell-0.3.9}/.copier-answers.yml +1 -1
  2. {kash_shell-0.3.8 → kash_shell-0.3.9}/.github/workflows/ci.yml +2 -5
  3. {kash_shell-0.3.8 → kash_shell-0.3.9}/.github/workflows/publish.yml +1 -1
  4. {kash_shell-0.3.8 → kash_shell-0.3.9}/.gitignore +2 -3
  5. {kash_shell-0.3.8 → kash_shell-0.3.9}/Makefile +2 -1
  6. {kash_shell-0.3.8 → kash_shell-0.3.9}/PKG-INFO +19 -7
  7. {kash_shell-0.3.8 → kash_shell-0.3.9}/README.md +7 -3
  8. {kash_shell-0.3.8 → kash_shell-0.3.9}/development.md +12 -34
  9. kash_shell-0.3.9/installation.md +27 -0
  10. kash_shell-0.3.9/publishing.md +71 -0
  11. {kash_shell-0.3.8 → kash_shell-0.3.9}/pyproject.toml +25 -4
  12. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/base/debug_commands.py +2 -2
  13. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/base/general_commands.py +8 -4
  14. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/base/logs_commands.py +2 -7
  15. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/workspace/workspace_commands.py +1 -1
  16. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/concepts/cosine.py +2 -1
  17. kash_shell-0.3.9/src/kash/concepts/text_similarity.py +57 -0
  18. kash_shell-0.3.9/src/kash/config/env_settings.py +59 -0
  19. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/logger.py +2 -3
  20. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/logger_basic.py +9 -2
  21. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/server_config.py +6 -6
  22. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/settings.py +25 -34
  23. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/setup.py +13 -3
  24. kash_shell-0.3.9/src/kash/config/suppress_warnings.py +45 -0
  25. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/topics/a2_installation.md +7 -3
  26. kash_shell-0.3.9/src/kash/docs/markdown/warning.md +3 -0
  27. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/welcome.md +4 -0
  28. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs_base/load_recipe_snippets.py +1 -1
  29. kash_shell-0.3.8/src/kash/docs_base/recipes/general_system_commands.ksh → kash_shell-0.3.9/src/kash/docs_base/recipes/general_system_commands.sh +1 -1
  30. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/llm_transforms.py +2 -1
  31. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/file_storage/file_store.py +0 -4
  32. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/file_storage/item_file_format.py +8 -1
  33. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/assistant.py +1 -1
  34. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/help_printing.py +15 -7
  35. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/tldr_help.py +5 -3
  36. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/llm_utils/llm_completion.py +2 -2
  37. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/local_server/local_server.py +50 -43
  38. kash_shell-0.3.9/src/kash/local_server/local_server_commands.py +58 -0
  39. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/local_server/local_server_routes.py +2 -2
  40. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/mcp/mcp_cli.py +52 -15
  41. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/mcp/mcp_server_commands.py +4 -5
  42. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/mcp/mcp_server_routes.py +9 -6
  43. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/mcp/mcp_server_sse.py +59 -34
  44. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/mcp/mcp_server_stdio.py +0 -8
  45. kash_shell-0.3.9/src/kash/media_base/audio_processing.py +100 -0
  46. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/media_base/media_cache.py +10 -10
  47. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/media_base/speech_transcription.py +2 -1
  48. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/items_model.py +12 -6
  49. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/clideps/api_keys.py +3 -2
  50. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/clideps/dotenv_setup.py +3 -2
  51. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/clideps/dotenv_utils.py +15 -6
  52. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/clideps/pkg_deps.py +27 -2
  53. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/atomic_var.py +16 -3
  54. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/url.py +53 -25
  55. kash_shell-0.3.8/src/kash/utils/file_utils/dir_size.py → kash_shell-0.3.9/src/kash/utils/file_utils/dir_info.py +25 -4
  56. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/file_utils/file_ext.py +2 -3
  57. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/file_utils/file_formats.py +26 -0
  58. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/file_utils/file_formats_model.py +47 -19
  59. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/file_utils/filename_parsing.py +10 -4
  60. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/workspaces/source_items.py +4 -1
  61. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/workspaces/workspace_output.py +11 -4
  62. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xonsh_custom/custom_shell.py +1 -1
  63. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xonsh_custom/load_into_xonsh.py +5 -3
  64. kash_shell-0.3.9/src/kash_shell/py.typed +0 -0
  65. {kash_shell-0.3.8 → kash_shell-0.3.9}/uv.lock +241 -221
  66. kash_shell-0.3.8/src/kash/concepts/text_similarity.py +0 -112
  67. kash_shell-0.3.8/src/kash/config/suppress_warnings.py +0 -27
  68. kash_shell-0.3.8/src/kash/docs/markdown/warning.md +0 -8
  69. kash_shell-0.3.8/src/kash/local_server/local_server_commands.py +0 -58
  70. kash_shell-0.3.8/src/kash/media_base/audio_processing.py +0 -26
  71. {kash_shell-0.3.8 → kash_shell-0.3.9}/.env.template +0 -0
  72. {kash_shell-0.3.8 → kash_shell-0.3.9}/LICENSE +0 -0
  73. {kash_shell-0.3.8 → kash_shell-0.3.9}/devtools/generate_readme.xsh +0 -0
  74. {kash_shell-0.3.8 → kash_shell-0.3.9}/devtools/lint.py +0 -0
  75. {kash_shell-0.3.8 → kash_shell-0.3.9}/devtools/profile_main.py +0 -0
  76. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/__init__.py +0 -0
  77. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/__main__.py +0 -0
  78. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/__init__.py +0 -0
  79. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/core/assistant_chat.py +0 -0
  80. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/core/chat.py +0 -0
  81. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/core/format_markdown_template.py +0 -0
  82. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/core/markdownify.py +0 -0
  83. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/core/readability.py +0 -0
  84. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/core/show_webpage.py +0 -0
  85. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/core/strip_html.py +0 -0
  86. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/core/summarize_as_bullets.py +0 -0
  87. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/core/webpage_config.py +0 -0
  88. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/core/webpage_generate.py +0 -0
  89. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/meta/write_instructions.py +0 -0
  90. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/actions/meta/write_new_action.py +0 -0
  91. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/__init__.py +0 -0
  92. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/base/basic_file_commands.py +0 -0
  93. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/base/browser_commands.py +0 -0
  94. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/base/diff_commands.py +0 -0
  95. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/base/files_command.py +0 -0
  96. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/base/model_commands.py +0 -0
  97. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/base/reformat_command.py +0 -0
  98. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/base/search_command.py +0 -0
  99. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/base/show_command.py +0 -0
  100. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/extras/utils_commands.py +0 -0
  101. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/help/assistant_commands.py +0 -0
  102. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/help/doc_commands.py +0 -0
  103. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/help/help_commands.py +0 -0
  104. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/help/logo.py +0 -0
  105. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/commands/workspace/selection_commands.py +0 -0
  106. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/concepts/concept_formats.py +0 -0
  107. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/concepts/embeddings.py +0 -0
  108. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/__init__.py +0 -0
  109. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/capture_output.py +0 -0
  110. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/colors.py +0 -0
  111. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/init.py +0 -0
  112. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/lazy_imports.py +0 -0
  113. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/logo.txt +0 -0
  114. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/config/text_styles.py +0 -0
  115. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/__init__.py +0 -0
  116. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/all_docs.py +0 -0
  117. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/load_actions_info.py +0 -0
  118. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/load_api_docs.py +0 -0
  119. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/load_help_topics.py +0 -0
  120. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/load_source_code.py +0 -0
  121. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/api_docs_template.md +0 -0
  122. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/assistant_instructions_template.md +0 -0
  123. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/readme_template.md +0 -0
  124. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/topics/a1_what_is_kash.md +0 -0
  125. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/topics/a3_getting_started.md +0 -0
  126. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/topics/a4_elements.md +0 -0
  127. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/topics/a5_tips_for_use_with_other_tools.md +0 -0
  128. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/topics/b0_philosophy_of_kash.md +0 -0
  129. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/topics/b1_kash_overview.md +0 -0
  130. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/topics/b2_workspace_and_file_formats.md +0 -0
  131. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/topics/b3_modern_shell_tool_recommendations.md +0 -0
  132. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs/markdown/topics/b4_faq.md +0 -0
  133. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs_base/docs_base.py +0 -0
  134. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs_base/load_custom_command_info.py +0 -0
  135. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/docs_base/load_faqs.py +0 -0
  136. kash_shell-0.3.8/src/kash/docs_base/recipes/python_dev_commands.ksh → kash_shell-0.3.9/src/kash/docs_base/recipes/python_dev_commands.sh +0 -0
  137. kash_shell-0.3.8/src/kash/docs_base/recipes/tldr_standard_commands.ksh → kash_shell-0.3.9/src/kash/docs_base/recipes/tldr_standard_commands.sh +0 -0
  138. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/__init__.py +0 -0
  139. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/action_decorators.py +0 -0
  140. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/action_exec.py +0 -0
  141. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/action_registry.py +0 -0
  142. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/combiners.py +0 -0
  143. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/command_exec.py +0 -0
  144. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/command_registry.py +0 -0
  145. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/fetch_url_metadata.py +0 -0
  146. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/history.py +0 -0
  147. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/precondition_checks.py +0 -0
  148. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/precondition_registry.py +0 -0
  149. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/preconditions.py +0 -0
  150. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/resolve_args.py +0 -0
  151. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec/shell_callable_action.py +0 -0
  152. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec_model/__init__.py +0 -0
  153. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec_model/args_model.py +0 -0
  154. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec_model/commands_model.py +0 -0
  155. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec_model/script_model.py +0 -0
  156. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/exec_model/shell_model.py +0 -0
  157. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/file_storage/__init__.py +0 -0
  158. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/file_storage/metadata_dirs.py +0 -0
  159. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/file_storage/persisted_yaml.py +0 -0
  160. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/file_storage/store_cache_warmer.py +0 -0
  161. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/file_storage/store_filenames.py +0 -0
  162. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/__init__.py +0 -0
  163. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/assistant_instructions.py +0 -0
  164. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/assistant_output.py +0 -0
  165. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/docstring_utils.py +0 -0
  166. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/function_param_info.py +0 -0
  167. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/help_embeddings.py +0 -0
  168. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/help_lookups.py +0 -0
  169. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/help_pages.py +0 -0
  170. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/help_types.py +0 -0
  171. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/help/recommended_commands.py +0 -0
  172. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/llm_utils/__init__.py +0 -0
  173. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/llm_utils/clean_headings.py +0 -0
  174. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/llm_utils/fuzzy_parsing.py +0 -0
  175. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/llm_utils/llm_api_keys.py +0 -0
  176. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/llm_utils/llm_messages.py +0 -0
  177. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/llm_utils/llm_names.py +0 -0
  178. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/llm_utils/llms.py +9 -9
  179. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/local_server/__init__.py +0 -0
  180. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/local_server/local_url_formatters.py +0 -0
  181. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/local_server/port_tools.py +0 -0
  182. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/local_server/rich_html_template.py +0 -0
  183. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/mcp/__init__.py +0 -0
  184. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/mcp/mcp_main.py +0 -0
  185. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/media_base/__init__.py +0 -0
  186. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/media_base/media_services.py +0 -0
  187. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/media_base/media_tools.py +0 -0
  188. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/media_base/services/local_file_media.py +0 -0
  189. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/media_base/timestamp_citations.py +0 -0
  190. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/__init__.py +0 -0
  191. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/actions_model.py +0 -0
  192. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/assistant_response_model.py +0 -0
  193. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/compound_actions_model.py +0 -0
  194. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/graph_model.py +0 -0
  195. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/language_list.py +0 -0
  196. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/llm_actions_model.py +0 -0
  197. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/media_model.py +0 -0
  198. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/operations_model.py +0 -0
  199. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/params_model.py +0 -0
  200. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/paths_model.py +0 -0
  201. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/model/preconditions_model.py +0 -0
  202. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/__init__.py +0 -0
  203. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/clideps/platforms.py +0 -0
  204. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/clideps/terminal_features.py +0 -0
  205. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/completions/completion_scoring.py +0 -0
  206. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/completions/completion_types.py +0 -0
  207. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/completions/shell_completions.py +0 -0
  208. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/file_icons/color_for_format.py +0 -0
  209. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/file_icons/nerd_icons.py +0 -0
  210. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/input/__init__.py +0 -0
  211. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/input/input_prompts.py +0 -0
  212. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/input/inquirer_settings.py +0 -0
  213. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/input/param_inputs.py +0 -0
  214. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/input/shell_confirm.py +0 -0
  215. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/output/__init__.py +0 -0
  216. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/output/kerm_code_utils.py +0 -0
  217. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/output/kerm_codes.py +0 -0
  218. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/output/kmarkdown.py +0 -0
  219. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/output/shell_formatting.py +0 -0
  220. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/output/shell_output.py +0 -0
  221. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/shell_main.py +0 -0
  222. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/ui/__init__.py +0 -0
  223. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/ui/shell_results.py +0 -0
  224. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/ui/shell_syntax.py +0 -0
  225. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/utils/argparse_utils.py +0 -0
  226. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/utils/exception_printing.py +0 -0
  227. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/utils/native_utils.py +0 -0
  228. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/utils/osc_utils.py +0 -0
  229. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/utils/shell_function_wrapper.py +0 -0
  230. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/utils/terminal_images.py +0 -0
  231. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/shell/version.py +0 -0
  232. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/text_handling/custom_sliding_transforms.py +0 -0
  233. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/text_handling/doc_normalization.py +0 -0
  234. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/text_handling/markdown_util.py +0 -0
  235. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/text_handling/unified_diffs.py +0 -0
  236. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/__init__.py +0 -0
  237. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/__init__.py +0 -0
  238. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/format_utils.py +0 -0
  239. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/function_inspect.py +0 -0
  240. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/import_utils.py +0 -0
  241. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/lazyobject.py +0 -0
  242. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/obj_replace.py +0 -0
  243. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/parse_key_vals.py +0 -0
  244. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/parse_shell_args.py +0 -0
  245. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/stack_traces.py +0 -0
  246. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/string_replace.py +0 -0
  247. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/string_template.py +0 -0
  248. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/task_stack.py +0 -0
  249. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/type_utils.py +0 -0
  250. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/common/uniquifier.py +0 -0
  251. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/errors.py +0 -0
  252. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/file_formats/chat_format.py +0 -0
  253. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/file_utils/__init__.py +0 -0
  254. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/file_utils/file_sort_filter.py +0 -0
  255. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/file_utils/file_walk.py +0 -0
  256. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/file_utils/ignore_files.py +0 -0
  257. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/file_utils/mtime_cache.py +0 -0
  258. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/file_utils/path_utils.py +0 -0
  259. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/lang_utils/__init__.py +0 -0
  260. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/lang_utils/capitalization.py +0 -0
  261. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/lang_utils/inflection.py +0 -0
  262. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/rich_custom/__init__.py +0 -0
  263. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/rich_custom/ansi_cell_len.py +0 -0
  264. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/rich_custom/rich_char_transform.py +0 -0
  265. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/rich_custom/rich_indent.py +0 -0
  266. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/utils/rich_custom/rich_markdown_fork.py +0 -0
  267. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_content/canon_url.py +0 -0
  268. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_content/dir_store.py +0 -0
  269. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_content/file_cache_utils.py +0 -0
  270. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_content/local_file_cache.py +0 -0
  271. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_content/web_extract.py +0 -0
  272. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_content/web_extract_justext.py +0 -0
  273. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_content/web_extract_readabilipy.py +0 -0
  274. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_content/web_fetch.py +0 -0
  275. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_content/web_page_model.py +0 -0
  276. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_gen/__init__.py +0 -0
  277. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_gen/tabbed_webpage.py +0 -0
  278. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_gen/template_render.py +0 -0
  279. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_gen/templates/base_styles.css.jinja +0 -0
  280. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_gen/templates/base_webpage.html.jinja +0 -0
  281. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_gen/templates/content_styles.css.jinja +0 -0
  282. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_gen/templates/explain_view.html.jinja +0 -0
  283. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_gen/templates/item_view.html.jinja +0 -0
  284. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/web_gen/templates/tabbed_webpage.html.jinja +0 -0
  285. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/workspaces/__init__.py +0 -0
  286. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/workspaces/param_state.py +0 -0
  287. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/workspaces/selections.py +0 -0
  288. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/workspaces/workspace_importing.py +0 -0
  289. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/workspaces/workspace_registry.py +0 -0
  290. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/workspaces/workspaces.py +0 -0
  291. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xonsh_custom/command_nl_utils.py +0 -0
  292. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xonsh_custom/customize_prompt.py +0 -0
  293. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xonsh_custom/shell_load_commands.py +0 -0
  294. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xonsh_custom/shell_which.py +0 -0
  295. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xonsh_custom/xonsh_completers.py +0 -0
  296. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xonsh_custom/xonsh_env.py +0 -0
  297. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xonsh_custom/xonsh_modern_tools.py +0 -0
  298. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xonsh_custom/xonsh_ranking_completer.py +0 -0
  299. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xontrib/fnm.py +0 -0
  300. {kash_shell-0.3.8 → kash_shell-0.3.9}/src/kash/xontrib/kash_extension.py +0 -0
  301. {kash_shell-0.3.8 → kash_shell-0.3.9}/tests/test_shell.py +0 -0
@@ -1,5 +1,5 @@
1
1
  # Changes here will be overwritten by Copier. Do not edit manually.
2
- _commit: v0.1.0-5-g546520a
2
+ _commit: v0.2.5
3
3
  _src_path: gh:jlevy/simple-modern-uv
4
4
  package_author_email: joshua@cal.berkeley.edu
5
5
  package_author_name: Joshua Levy
@@ -41,7 +41,8 @@ jobs:
41
41
  - name: Install uv (official Astral action)
42
42
  uses: astral-sh/setup-uv@v5
43
43
  with:
44
- version: "0.6.11"
44
+ # Update this as needed:
45
+ version: "0.6.14"
45
46
  enable-cache: true
46
47
  python-version: ${{ matrix.python-version }}
47
48
 
@@ -56,10 +57,6 @@ jobs:
56
57
 
57
58
  - name: Install all dependencies
58
59
  run: uv sync --all-extras --dev
59
- env:
60
- # TODO: Unclear why this should be needed since we already have a newer CMake,
61
- # but it seems to be needed when building cydifflib.
62
- CMAKE_ARGS: "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
63
60
 
64
61
  - name: Run linting
65
62
  run: uv run python devtools/lint.py
@@ -25,7 +25,7 @@ jobs:
25
25
  - name: Install uv (official Astral action)
26
26
  uses: astral-sh/setup-uv@v5
27
27
  with:
28
- version: "0.6.5"
28
+ version: "0.6.14"
29
29
  enable-cache: true
30
30
  python-version: "3.12"
31
31
 
@@ -1,12 +1,11 @@
1
+ # Additions to standard GitHub .gitignore:
1
2
  *.bak
2
3
  *.orig
3
4
  *.stash.*
4
-
5
- # Additions to standard GitHub .gitignore:
6
5
  tmp/
7
6
  trash/
8
- .kash/
9
7
  attic/
8
+ .kash/
10
9
 
11
10
  # Byte-compiled / optimized / DLL files
12
11
  __pycache__/
@@ -1,5 +1,6 @@
1
1
  # Makefile for easy development workflows.
2
- # GitHub Actions call uv directly.
2
+ # See development.md for docs.
3
+ # Note GitHub Actions call uv directly, not this Makefile.
3
4
 
4
5
  .DEFAULT_GOAL := default
5
6
 
@@ -1,11 +1,20 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kash-shell
3
- Version: 0.3.8
4
- Summary: The knowledge agent shell
3
+ Version: 0.3.9
4
+ Summary: The knowledge agent shell (core)
5
5
  Project-URL: Repository, https://github.com/jlevy/kash-shell
6
6
  Author-email: Joshua Levy <joshua@cal.berkeley.edu>
7
7
  License-Expression: AGPL-3.0-or-later
8
8
  License-File: LICENSE
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Typing :: Typed
9
18
  Requires-Python: <4.0,>=3.11
10
19
  Requires-Dist: anyio>=4.8.0
11
20
  Requires-Dist: audioop-lts>=0.2.1; python_version >= '3.13'
@@ -33,7 +42,7 @@ Requires-Dist: openai>=1.66.3
33
42
  Requires-Dist: pandas>=2.2.3
34
43
  Requires-Dist: patch-ng>=1.18.1
35
44
  Requires-Dist: pathspec>=0.12.1
36
- Requires-Dist: prettyfmt>=0.2.0
45
+ Requires-Dist: prettyfmt>=0.3.0
37
46
  Requires-Dist: prompt-toolkit>=3.0.50
38
47
  Requires-Dist: pydantic>=2.10.6
39
48
  Requires-Dist: pydub>=0.25.1
@@ -42,7 +51,6 @@ Requires-Dist: pyperclip>=1.9.0
42
51
  Requires-Dist: python-dotenv>=1.0.1
43
52
  Requires-Dist: python-magic-bin>=0.4.14; platform_system == 'Windows'
44
53
  Requires-Dist: python-magic>=0.4.27; platform_system == 'Linux' or platform_system == 'Darwin'
45
- Requires-Dist: python-slugify>=8.0.4
46
54
  Requires-Dist: readabilipy>=0.3.0
47
55
  Requires-Dist: regex>=2024.11.6
48
56
  Requires-Dist: rich-argparse>=1.7.0
@@ -229,15 +237,19 @@ These are for `kash-media` but you can use a `kash-shell` for a more basic setup
229
237
  For macOS, you can again use brew:
230
238
 
231
239
  ```shell
232
- # Install pyenv, pipx, and other tools:
233
240
  brew update
234
- brew install ripgrep bat eza hexyl imagemagick libmagic ffmpeg
241
+ brew install libmagic ffmpeg ripgrep bat eza hexyl imagemagick zoxide
235
242
  ```
236
243
 
237
244
  For Ubuntu:
238
245
 
239
246
  ```shell
240
- apt install ripgrep bat eza hexyl imagemagick libmagic ffmpeg
247
+ sudo apt-get update
248
+ sudo apt-get install -y libgl1 ffmpeg libmagic-dev
249
+ # For the additional command-line tools, pixi is better on Ubuntu:
250
+ curl -fsSL https://pixi.sh/install.sh | sh
251
+ . ~/.bashrc
252
+ pixi global install ripgrep bat eza hexyl imagemagick zoxide
241
253
  ```
242
254
 
243
255
  For Windows or other platforms, see the uv instructions.
@@ -167,15 +167,19 @@ These are for `kash-media` but you can use a `kash-shell` for a more basic setup
167
167
  For macOS, you can again use brew:
168
168
 
169
169
  ```shell
170
- # Install pyenv, pipx, and other tools:
171
170
  brew update
172
- brew install ripgrep bat eza hexyl imagemagick libmagic ffmpeg
171
+ brew install libmagic ffmpeg ripgrep bat eza hexyl imagemagick zoxide
173
172
  ```
174
173
 
175
174
  For Ubuntu:
176
175
 
177
176
  ```shell
178
- apt install ripgrep bat eza hexyl imagemagick libmagic ffmpeg
177
+ sudo apt-get update
178
+ sudo apt-get install -y libgl1 ffmpeg libmagic-dev
179
+ # For the additional command-line tools, pixi is better on Ubuntu:
180
+ curl -fsSL https://pixi.sh/install.sh | sh
181
+ . ~/.bashrc
182
+ pixi global install ripgrep bat eza hexyl imagemagick zoxide
179
183
  ```
180
184
 
181
185
  For Windows or other platforms, see the uv instructions.
@@ -6,8 +6,8 @@ This project is set up to use [uv](https://docs.astral.sh/uv/) to manage Python
6
6
  dependencies. First, be sure you
7
7
  [have uv installed](https://docs.astral.sh/uv/getting-started/installation/).
8
8
 
9
- Then [fork](https://github.com/jlevy/kash-shell/fork) this repo (having your own fork
10
- will make it easier to contribute) and
9
+ Then [fork the jlevy/kash-shell repo](https://github.com/jlevy/kash-shell/fork) (having
10
+ your own fork will make it easier to contribute) and
11
11
  [clone it](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository).
12
12
 
13
13
  ## Basic Developer Workflows
@@ -66,44 +66,22 @@ source .venv/bin/activate
66
66
 
67
67
  See [uv docs](https://docs.astral.sh/uv/) for details.
68
68
 
69
- ## Kash Dev Workflows
69
+ ## IDE setup
70
70
 
71
- ```shell
72
- # Update key packages:
73
- source devtools/update_common_deps.xsh
74
-
75
- # Update this README:
76
- source devtools/generate_readme.xsh
77
- ```
78
-
79
- A few debugging tips when finding issues:
71
+ If you use VSCode or a fork like Cursor or Windsurf, you can install the following
72
+ extensions:
80
73
 
81
- ```shell
82
- # To see tracebacks if xonsh does not show them:
83
- $XONSH_SHOW_TRACEBACK=1
84
-
85
- # To set verbose logging:
86
- $KASH_LOG_LEVEL=info
87
-
88
- # To dump Python stack traces of all threads (from another terminal):
89
- pkill -USR1 kash
90
- ```
74
+ - [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python)
91
75
 
92
- ## Release Process
76
+ - [Based Pyright](https://marketplace.visualstudio.com/items?itemName=detachhead.basedpyright)
77
+ for type checking. Note that this extension works with non-Microsoft VSCode forks like
78
+ Cursor.
93
79
 
94
- This project is set up to publish to [PyPI](https://pypi.org/) from GitHub Actions.
80
+ ## Documentation
95
81
 
96
- Thanks to [the dynamic versioning
97
- plugin](https://github.com/ninoseki/uv-dynamic-versioning/) and the
98
- [`publish.yml` workflow](.github/workflows/publish.yml), you can simply create tagged
99
- releases (using standard format for the tag name, e.g. `v0.1.0`) on GitHub and the tag
100
- will trigger a release build, which then uploads it to PyPI.
82
+ - [uv docs](https://docs.astral.sh/uv/)
101
83
 
102
- For this to work you will need to have a PyPI account and authorize your repository to
103
- publish to PyPI. The simplest way to do that is on [the publishing settings
104
- page](https://pypi.org/manage/account/publishing/). Configure "Trusted Publisher
105
- Management" and register your GitHub repo as a new "pending" trusted publisher, entering
106
- the project name, repo owner, repo name, and `publish.yml` as the workflow name.
84
+ - [basedpyright docs](https://docs.basedpyright.com/latest/)
107
85
 
108
86
  * * *
109
87
 
@@ -0,0 +1,27 @@
1
+ ## Installing uv and Python
2
+
3
+ This project is set up to use [**uv**](https://docs.astral.sh/uv/), the new package
4
+ manager for Python. `uv` replaces traditional use of `pyenv`, `pipx`, `poetry`, `pip`,
5
+ etc. This is a quick cheat sheet on that:
6
+
7
+ On macOS or Linux, if you don't have `uv` installed, a quick way to install it:
8
+
9
+ ```shell
10
+ curl -LsSf https://astral.sh/uv/install.sh | sh
11
+ ```
12
+
13
+ For macOS, you prefer [brew](https://brew.sh/) you can install or upgrade uv with:
14
+
15
+ ```shell
16
+ brew update
17
+ brew install uv
18
+ ```
19
+
20
+ See [uv's docs](https://docs.astral.sh/uv/getting-started/installation/) for more
21
+ installation methods and platforms.
22
+
23
+ Now you can use uv to install a current Python environment:
24
+
25
+ ```shell
26
+ uv python install 3.13 # Or pick another version.
27
+ ```
@@ -0,0 +1,71 @@
1
+ ## Publishing Releases
2
+
3
+ This is how to publish a Python package to [**PyPI**](https://pypi.org/) from GitHub
4
+ Actions, when using the
5
+ [**simple-modern-uv**](https://github.com/jlevy/simple-modern-uv) template.
6
+
7
+ Thanks to [the dynamic versioning
8
+ plugin](https://github.com/ninoseki/uv-dynamic-versioning/) and the
9
+ [`publish.yml` workflow](https://github.com/jlevy/simple-modern-uv/blob/main/template/.github/workflows/publish.yml),
10
+ you can simply create tagged releases (using standard format for the tag name, e.g.
11
+ `v0.1.0`) on GitHub and the tag will trigger a release build, which then uploads it to
12
+ PyPI.
13
+
14
+ ### How to Publish the First Time
15
+
16
+ This part is a little confusing the first time.
17
+ Here is the simplest way to do it.
18
+ For the purposes of this example replace OWNER and PROJECT with the right values.
19
+
20
+ 1. **Get a PyPI account** at [pypi.org](https://pypi.org/) and sign in.
21
+
22
+ 2. **Pick a name for the project** that isn't already taken.
23
+
24
+ - Go to `https://pypi.org/project/PROJECT` to see if another project with that name
25
+ already exits.
26
+
27
+ - If needed, update your `pyproject.yml` with the correct name.
28
+
29
+ 3. **Authorize** your repository to publish to PyPI:
30
+
31
+ - Go to [the publishing settings page](https://pypi.org/manage/account/publishing/).
32
+
33
+ - Find "Trusted Publisher Management" and register your GitHub repo as a new
34
+ "pending" trusted publisher
35
+
36
+ - Enter the project name, repo owner, repo name, and `publish.yml` as the workflow
37
+ name. (You can leave the "environment name" field blank.)
38
+
39
+ 4. **Create a release** on GitHub:
40
+
41
+ - Commit code and make sure it's running correctly.
42
+
43
+ - Go to your GitHub project page, then click on Actions tab.
44
+
45
+ - Confirm all tests are passing in the last CI workflow.
46
+ (If you want, you can even publish this template when it's empty as just a stub
47
+ project, to try all this out.)
48
+
49
+ - Go to your GitHub project page, click on Releases.
50
+
51
+ - Fill in the tag and the release name.
52
+ Select to create a new tag, and pick a version.
53
+ A good option is `v0.1.0`. (It's wise to have it start with a `v`.)
54
+
55
+ - Submit to create the release.
56
+
57
+ 5. **Confirm it publishes to PyPI**
58
+
59
+ - Watch for the release workflow in the GitHub Actions tab.
60
+
61
+ - If it succeeds, you should see it appear at `https://pypi.org/project/PROJECT`.
62
+
63
+ ### How to Publish Subsequent Releases
64
+
65
+ Just create a new release!
66
+ Everything is the same as the last two steps above.
67
+
68
+ * * *
69
+
70
+ *This file was built with
71
+ [simple-modern-uv](https://github.com/jlevy/simple-modern-uv).*
@@ -3,10 +3,11 @@
3
3
  [project.urls]
4
4
  Repository = "https://github.com/jlevy/kash-shell"
5
5
  # Homepage = "https://..."
6
+ # Documentation = "https://..."
6
7
 
7
8
  [project]
8
9
  name = "kash-shell"
9
- description = "The knowledge agent shell"
10
+ description = "The knowledge agent shell (core)"
10
11
  authors = [
11
12
  { name="Joshua Levy", email="joshua@cal.berkeley.edu" },
12
13
  ]
@@ -15,6 +16,27 @@ license = "AGPL-3.0-or-later"
15
16
  requires-python = ">=3.11,<4.0"
16
17
  dynamic = ["version"]
17
18
 
19
+ # https://pypi.org/classifiers/
20
+ # Adjust as needed:
21
+ classifiers = [
22
+ # Adjust as needed:
23
+ "Development Status :: 4 - Beta",
24
+ # "Development Status :: 5 - Production/Stable",
25
+ "Intended Audience :: Developers",
26
+ "Operating System :: OS Independent",
27
+ "Programming Language :: Python",
28
+ "Programming Language :: Python :: 3",
29
+ "Programming Language :: Python :: 3.11",
30
+ "Programming Language :: Python :: 3.12",
31
+ "Programming Language :: Python :: 3.13",
32
+ "Typing :: Typed",
33
+ # Include this to avoid accidentally publishing to PyPI:
34
+ # "Private :: Do Not Upload",
35
+ ]
36
+
37
+
38
+ # ---- Main dependencies ----
39
+
18
40
  dependencies = [
19
41
  "dunamai>=1.23.0",
20
42
  "pydantic>=2.10.6",
@@ -22,7 +44,7 @@ dependencies = [
22
44
  # My tools:
23
45
  "strif>=2.1.0",
24
46
  "funlog>=0.2.0",
25
- "prettyfmt>=0.2.0",
47
+ "prettyfmt>=0.3.0",
26
48
  "flowmark>=0.3.1",
27
49
  "frontmatter-format>=0.2.1",
28
50
  "chopdiff>=0.1.3",
@@ -45,7 +67,6 @@ dependencies = [
45
67
  "pyperclip>=1.9.0",
46
68
  "colour>=0.1.5",
47
69
  "thefuzz>=0.22.1",
48
- "python-slugify>=8.0.4",
49
70
  "tldr>=3.3.0",
50
71
  "jinja2>=3.1.6",
51
72
  "pygments>=2.19.1",
@@ -92,7 +113,7 @@ dev = [
92
113
 
93
114
  [project.scripts]
94
115
  kash = "kash.shell.shell_main:main"
95
- kash_mcp = "kash.mcp.mcp_cli:main"
116
+ kash-mcp = "kash.mcp.mcp_cli:main"
96
117
 
97
118
 
98
119
  # ---- Build system ----
@@ -179,7 +179,7 @@ def reload_system() -> None:
179
179
  the local the local server. Not perfect! But sometimes useful for development.
180
180
  """
181
181
  import kash
182
- from kash.local_server.local_server import restart_local_server
182
+ from kash.local_server.local_server import restart_ui_server
183
183
  from kash.utils.common.import_utils import recursive_reload
184
184
 
185
185
  module = kash
@@ -197,7 +197,7 @@ def reload_system() -> None:
197
197
  log.info("Reloaded modules: %s", ", ".join(package_names))
198
198
  log.message("Reloaded %s modules from %s.", len(package_names), module.__name__)
199
199
 
200
- restart_local_server()
200
+ restart_ui_server()
201
201
 
202
202
  # TODO Re-register commands and actions.
203
203
 
@@ -1,7 +1,9 @@
1
+ from flowmark import Wrap
2
+
1
3
  from kash.commands.base.model_commands import list_apis, list_models
2
4
  from kash.commands.workspace.workspace_commands import list_params
3
5
  from kash.config.logger import get_logger
4
- from kash.config.settings import RECOMMENDED_API_KEYS
6
+ from kash.config.settings import RECOMMENDED_API_KEYS, get_system_config_dir
5
7
  from kash.docs.all_docs import all_docs
6
8
  from kash.exec import kash_command
7
9
  from kash.help.tldr_help import tldr_refresh_cache
@@ -175,7 +177,7 @@ def reload_env() -> None:
175
177
  Reload the environment variables from the .env file.
176
178
  """
177
179
 
178
- env_paths = load_dotenv_paths()
180
+ env_paths = load_dotenv_paths(True, True, get_system_config_dir())
179
181
  if env_paths:
180
182
  cprint("Reloaded environment variables")
181
183
  print_api_key_setup(RECOMMENDED_API_KEYS)
@@ -197,7 +199,9 @@ def kits() -> None:
197
199
  else:
198
200
  cprint("Currently imported kits:")
199
201
  for kit in get_loaded_kits().values():
200
- cprint(format_name_and_value(f"{kit.name} kit", str(kit.path or "")))
202
+ cprint(
203
+ format_name_and_value(f"{kit.name} kit", str(kit.path or ""), text_wrap=Wrap.NONE)
204
+ )
201
205
 
202
206
 
203
207
  @kash_command
@@ -210,5 +214,5 @@ def settings() -> None:
210
214
  settings = global_settings()
211
215
  print_h2("Global Settings")
212
216
  for field, value in settings.__dict__.items():
213
- cprint(format_name_and_value(field, str(value)))
217
+ cprint(format_name_and_value(field, str(value), text_wrap=Wrap.NONE))
214
218
  PrintHooks.spacer()
@@ -7,8 +7,7 @@ from kash.config.logger import get_log_settings, get_logger, reload_rich_logging
7
7
  from kash.config.settings import (
8
8
  LogLevel,
9
9
  atomic_global_settings,
10
- global_settings,
11
- server_log_file_path,
10
+ local_server_log_path,
12
11
  )
13
12
  from kash.exec import kash_command
14
13
  from kash.shell.output.shell_formatting import format_name_and_value
@@ -86,8 +85,4 @@ def log_settings() -> None:
86
85
  cprint(format_name_and_value("log_objects_dir", str(settings.log_objects_dir)))
87
86
  cprint(format_name_and_value("log_file_level", settings.log_file_level.name))
88
87
  cprint(format_name_and_value("log_console_level", settings.log_console_level.name))
89
- cprint(
90
- format_name_and_value(
91
- "server_log_file", str(server_log_file_path(global_settings().local_server_port))
92
- )
93
- )
88
+ cprint(format_name_and_value("server_log_file_path", str(local_server_log_path())))
@@ -54,7 +54,7 @@ from kash.utils.common.type_utils import not_none
54
54
  from kash.utils.common.url import Url, is_url
55
55
  from kash.utils.errors import InvalidInput
56
56
  from kash.utils.file_formats.chat_format import tail_chat_history
57
- from kash.utils.file_utils.dir_size import is_nonempty_dir
57
+ from kash.utils.file_utils.dir_info import is_nonempty_dir
58
58
  from kash.utils.lang_utils.inflection import plural
59
59
  from kash.web_content.file_cache_utils import cache_file
60
60
  from kash.workspaces import (
@@ -1,9 +1,10 @@
1
1
  from collections.abc import Sequence
2
+ from typing import Any, TypeAlias
2
3
 
3
4
  import numpy as np
4
5
 
5
6
  # Type aliases for clarity
6
- ArrayLike = Sequence[float] | np.ndarray
7
+ ArrayLike: TypeAlias = Sequence[float] | np.ndarray[Any, Any]
7
8
 
8
9
 
9
10
  def cosine(u: ArrayLike, v: ArrayLike) -> float:
@@ -0,0 +1,57 @@
1
+ from typing import cast
2
+
3
+ import litellm
4
+ from funlog import log_calls
5
+ from litellm import embedding
6
+ from litellm.types.utils import EmbeddingResponse
7
+
8
+ from kash.concepts.cosine import ArrayLike, cosine
9
+ from kash.concepts.embeddings import Embeddings
10
+ from kash.config.logger import get_logger
11
+ from kash.llm_utils.llms import DEFAULT_EMBEDDING_MODEL, EmbeddingModel
12
+ from kash.utils.errors import ApiResultError
13
+
14
+ log = get_logger(__name__)
15
+
16
+
17
+ def cosine_relatedness(x: ArrayLike, y: ArrayLike) -> float:
18
+ return 1 - cosine(x, y)
19
+
20
+
21
+ @log_calls(level="info", show_return_value=False)
22
+ def embed_query(model: EmbeddingModel, query: str) -> EmbeddingResponse:
23
+ try:
24
+ response: EmbeddingResponse = cast(
25
+ EmbeddingResponse, embedding(model=model.litellm_name, input=[query])
26
+ )
27
+ except litellm.exceptions.APIError as e:
28
+ log.info("API error embedding query: %s", e)
29
+ raise ApiResultError(str(e))
30
+ if not response.data:
31
+ log.info("API error embedding query, got: %s", response)
32
+ raise ApiResultError("No embedding response data")
33
+ return response
34
+
35
+
36
+ @log_calls(level="info", show_return_value=False)
37
+ def rank_by_relatedness(
38
+ query: str,
39
+ embeddings: Embeddings,
40
+ relatedness_fn=cosine_relatedness,
41
+ model=DEFAULT_EMBEDDING_MODEL,
42
+ top_n: int = -1,
43
+ ) -> list[tuple[str, str, float]]:
44
+ """
45
+ Returns a list of strings and relatednesses, sorted from most related to least.
46
+ """
47
+ response = embed_query(model, query)
48
+
49
+ query_embedding = response.data[0]["embedding"]
50
+
51
+ scored_strings = [
52
+ (key, text, relatedness_fn(query_embedding, emb))
53
+ for key, text, emb in embeddings.as_iterable()
54
+ ]
55
+ scored_strings.sort(key=lambda x: x[2], reverse=True)
56
+
57
+ return scored_strings[:top_n]
@@ -0,0 +1,59 @@
1
+ import os
2
+ from enum import Enum
3
+ from pathlib import Path
4
+ from typing import overload
5
+
6
+
7
+ class KashEnv(str, Enum):
8
+ """
9
+ Environment variable settings for kash. None are required, but these may be
10
+ used to override default values.
11
+ """
12
+
13
+ KASH_LOG_LEVEL = "KASH_LOG_LEVEL"
14
+ """The log level for console-based logging."""
15
+
16
+ KASH_WS_ROOT = "KASH_WS_ROOT"
17
+ """The root directory for kash workspaces."""
18
+
19
+ KASH_GLOBAL_WS = "KASH_GLOBAL_WS"
20
+ """The global workspace directory."""
21
+
22
+ KASH_SYSTEM_LOGS_DIR = "KASH_SYSTEM_LOGS_DIR"
23
+ """The directory for system logs."""
24
+
25
+ KASH_SYSTEM_CACHE_DIR = "KASH_SYSTEM_CACHE_DIR"
26
+ """The directory for system cache (caches separate from workspace caches)."""
27
+
28
+ KASH_MCP_WS = "KASH_MCP_WS"
29
+ """The directory for the workspace for MCP servers."""
30
+
31
+ @overload
32
+ def read_str(self) -> str | None: ...
33
+
34
+ @overload
35
+ def read_str(self, default: str) -> str: ...
36
+
37
+ def read_str(self, default: str | None = None) -> str | None:
38
+ """
39
+ Get the value of the environment variable from the environment (with
40
+ optional default).
41
+ """
42
+ return os.environ.get(self.value, default)
43
+
44
+ @overload
45
+ def read_path(self, default: None) -> None: ...
46
+
47
+ @overload
48
+ def read_path(self, default: Path) -> Path: ...
49
+
50
+ def read_path(self, default: Path | None = None) -> Path | None:
51
+ """
52
+ Get the value of the environment variable as a resolved path (with
53
+ optional default).
54
+ """
55
+ value = os.environ.get(self.value)
56
+ if value:
57
+ return Path(value).expanduser().resolve()
58
+ else:
59
+ return default.expanduser().resolve() if default else None
@@ -12,11 +12,11 @@ from pathlib import Path
12
12
  from typing import IO, Any, cast
13
13
 
14
14
  import rich
15
+ from prettyfmt import slugify_snake
15
16
  from rich._null_file import NULL_FILE
16
17
  from rich.console import Console
17
18
  from rich.logging import RichHandler
18
19
  from rich.theme import Theme
19
- from slugify import slugify
20
20
  from strif import atomic_output_file, new_timestamped_uid
21
21
  from typing_extensions import override
22
22
 
@@ -317,8 +317,7 @@ class CustomLogger(logging.Logger):
317
317
  global _log_settings
318
318
  prefix = prefix_slug + "." if prefix_slug else ""
319
319
  filename = (
320
- f"{prefix}{slugify(description, separator='_')}."
321
- f"{new_timestamped_uid()}.{file_ext.lstrip('.')}"
320
+ f"{prefix}{slugify_snake(description)}.{new_timestamped_uid()}.{file_ext.lstrip('.')}"
322
321
  )
323
322
  path = _log_settings.log_objects_dir / filename
324
323
  with atomic_output_file(path, make_parents=True) as tmp_filename:
@@ -1,14 +1,21 @@
1
1
  import logging
2
2
  import sys
3
- from logging import FileHandler, Formatter
3
+ from logging import FileHandler, Formatter, LogRecord
4
4
  from pathlib import Path
5
5
 
6
6
  from kash.config.settings import LogLevel
7
+ from kash.config.suppress_warnings import demote_warnings
7
8
 
8
9
  # Basic logging setup for non-interactive logging, like on a server.
9
10
  # For richer logging, see logger.py.
10
11
 
11
12
 
13
+ class SuppressedWarningsStreamHandler(logging.StreamHandler):
14
+ def emit(self, record: LogRecord):
15
+ demote_warnings(record, level=logging.DEBUG)
16
+ super().emit(record)
17
+
18
+
12
19
  def basic_file_handler(path: Path, level: LogLevel) -> logging.FileHandler:
13
20
  handler = logging.FileHandler(path)
14
21
  handler.setLevel(level.value)
@@ -17,7 +24,7 @@ def basic_file_handler(path: Path, level: LogLevel) -> logging.FileHandler:
17
24
 
18
25
 
19
26
  def basic_stderr_handler(level: LogLevel) -> logging.StreamHandler:
20
- handler = logging.StreamHandler(stream=sys.stderr)
27
+ handler = SuppressedWarningsStreamHandler(stream=sys.stderr)
21
28
  handler.setLevel(level.value)
22
29
  handler.setFormatter(Formatter("%(asctime)s %(levelname).1s %(name)s - %(message)s"))
23
30
  return handler