kash-shell 0.3.33__tar.gz → 0.3.35__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.
- {kash_shell-0.3.33 → kash_shell-0.3.35}/PKG-INFO +4 -3
- {kash_shell-0.3.33 → kash_shell-0.3.35}/pyproject.toml +4 -2
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/markdownify_html.py +1 -3
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/summarize_as_bullets.py +1 -1
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/env_settings.py +0 -3
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/logger.py +2 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/logger_basic.py +10 -1
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/settings.py +0 -12
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/setup.py +15 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/text_styles.py +1 -1
- kash_shell-0.3.35/src/kash/config/warm_slow_imports.py +60 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/action_decorators.py +2 -2
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/action_exec.py +1 -1
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/fetch_url_items.py +4 -2
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/mcp/mcp_cli.py +17 -5
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/mcp/mcp_server_routes.py +6 -4
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/actions_model.py +13 -5
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/items_model.py +27 -13
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/shell_main.py +3 -14
- kash_shell-0.3.35/src/kash/utils/api_utils/multitask_gather.py +134 -0
- kash_shell-0.3.35/src/kash/utils/common/import_utils.py +250 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/s3_utils.py +89 -7
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/rich_custom/multitask_status.py +84 -10
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/text_handling/markdown_footnotes.py +16 -43
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/text_handling/markdown_utils.py +108 -28
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_content/web_extract.py +0 -1
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_content/web_fetch.py +270 -98
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/workspaces/workspaces.py +2 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/uv.lock +170 -131
- kash_shell-0.3.33/src/kash/utils/api_utils/multitask_gather.py +0 -74
- kash_shell-0.3.33/src/kash/utils/common/import_utils.py +0 -126
- {kash_shell-0.3.33 → kash_shell-0.3.35}/.copier-answers.yml +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/.cursor/rules/general.mdc +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/.cursor/rules/python.mdc +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/.env.template +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/.github/workflows/ci.yml +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/.github/workflows/publish.yml +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/.gitignore +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/LICENSE +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/Makefile +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/README.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/development.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/devtools/generate_readme.xsh +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/devtools/lint.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/devtools/profile_main.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/installation.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/publishing.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/__main__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/assistant_chat.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/chat.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/combine_docs.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/concat_docs.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/format_markdown_template.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/minify_html.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/readability.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/render_as_html.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/save_sidematter_meta.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/show_webpage.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/strip_html.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/tabbed_webpage_config.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/tabbed_webpage_generate.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/core/zip_sidematter.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/meta/write_instructions.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/actions/meta/write_new_action.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/base/basic_file_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/base/browser_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/base/debug_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/base/diff_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/base/files_command.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/base/general_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/base/logs_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/base/model_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/base/reformat_command.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/base/search_command.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/base/show_command.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/extras/parse_uv_lock.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/extras/utils_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/help/assistant_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/help/doc_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/help/help_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/help/logo.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/help/welcome.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/workspace/selection_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/commands/workspace/workspace_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/capture_output.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/colors.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/init.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/lazy_imports.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/logo.txt +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/server_config.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/suppress_warnings.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/config/unified_live.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/all_docs.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/load_actions_info.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/load_api_docs.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/load_help_topics.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/load_source_code.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/api_docs_template.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/assistant_instructions_template.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/readme_template.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/topics/a1_what_is_kash.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/topics/a2_installation.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/topics/a3_getting_started.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/topics/a4_elements.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/topics/a5_tips_for_use_with_other_tools.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/topics/b0_philosophy_of_kash.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/topics/b1_kash_overview.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/topics/b2_workspace_and_file_formats.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/topics/b3_modern_shell_tool_recommendations.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/topics/b4_faq.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/warning.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs/markdown/welcome.md +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs_base/docs_base.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs_base/load_custom_command_info.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs_base/load_faqs.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs_base/load_recipe_snippets.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs_base/recipes/general_system_commands.sh +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs_base/recipes/python_dev_commands.sh +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/docs_base/recipes/tldr_standard_commands.sh +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/embeddings/cosine.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/embeddings/embeddings.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/embeddings/text_similarity.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/action_registry.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/combiners.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/command_exec.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/command_registry.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/history.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/importing.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/llm_transforms.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/precondition_checks.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/precondition_registry.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/preconditions.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/resolve_args.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/runtime_settings.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec/shell_callable_action.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec_model/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec_model/args_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec_model/commands_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec_model/script_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/exec_model/shell_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/file_storage/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/file_storage/file_store.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/file_storage/item_file_format.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/file_storage/item_id_index.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/file_storage/metadata_dirs.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/file_storage/persisted_yaml.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/file_storage/store_cache_warmer.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/file_storage/store_filenames.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/assistant.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/assistant_instructions.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/assistant_output.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/function_param_info.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/help_embeddings.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/help_lookups.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/help_pages.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/help_printing.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/help_types.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/recommended_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/help/tldr_help.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/llm_utils/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/llm_utils/clean_headings.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/llm_utils/custom_sliding_transforms.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/llm_utils/fuzzy_parsing.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/llm_utils/init_litellm.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/llm_utils/llm_api_keys.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/llm_utils/llm_completion.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/llm_utils/llm_messages.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/llm_utils/llm_names.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/llm_utils/llms.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/local_server/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/local_server/local_server.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/local_server/local_server_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/local_server/local_server_routes.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/local_server/local_url_formatters.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/local_server/port_tools.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/local_server/rich_html_template.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/mcp/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/mcp/mcp_main.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/mcp/mcp_server_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/mcp/mcp_server_sse.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/mcp/mcp_server_stdio.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/media_base/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/media_base/audio_processing.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/media_base/media_cache.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/media_base/media_services.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/media_base/media_tools.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/media_base/services/local_file_media.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/media_base/timestamp_citations.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/media_base/transcription_deepgram.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/media_base/transcription_format.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/media_base/transcription_whisper.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/assistant_response_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/compound_actions_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/concept_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/exec_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/graph_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/language_list.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/llm_actions_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/media_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/operations_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/params_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/paths_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/model/preconditions_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/completions/completion_scoring.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/completions/completion_types.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/completions/shell_completions.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/file_icons/color_for_format.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/file_icons/nerd_icons.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/input/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/input/input_prompts.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/input/inquirer_settings.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/input/param_inputs.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/input/shell_confirm.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/output/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/output/kerm_code_utils.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/output/kerm_codes.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/output/kmarkdown.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/output/shell_formatting.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/output/shell_output.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/ui/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/ui/shell_results.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/ui/shell_syntax.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/utils/exception_printing.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/utils/native_utils.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/utils/shell_function_wrapper.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/shell/version.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/api_utils/api_retries.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/api_utils/cache_requests_limited.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/api_utils/gather_limited.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/api_utils/http_utils.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/api_utils/progress_protocol.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/format_utils.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/function_inspect.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/lazyobject.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/obj_replace.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/parse_docstring.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/parse_key_vals.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/parse_shell_args.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/stack_traces.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/task_stack.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/testing.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/type_utils.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/uniquifier.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/url.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/common/url_slice.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/errors.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_formats/chat_format.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/csv_utils.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/dir_info.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/file_ext.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/file_formats.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/file_formats_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/file_sort_filter.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/file_walk.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/filename_parsing.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/ignore_files.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/mtime_cache.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/file_utils/path_utils.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/lang_utils/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/lang_utils/capitalization.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/rich_custom/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/rich_custom/ansi_cell_len.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/rich_custom/rich_char_transform.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/rich_custom/rich_indent.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/rich_custom/rich_markdown_fork.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/text_handling/doc_normalization.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/text_handling/escape_html_tags.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/text_handling/markdown_render.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/text_handling/markdownify_utils.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/utils/text_handling/unified_diffs.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_content/canon_url.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_content/dir_store.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_content/file_cache_utils.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_content/file_processing.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_content/local_file_cache.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_content/web_extract_justext.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_content/web_extract_readabilipy.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_content/web_page_model.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/tabbed_webpage.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/template_render.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/base_styles.css.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/base_webpage.html.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/components/toc_scripts.js.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/components/toc_styles.css.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/components/tooltip_scripts.js.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/components/tooltip_styles.css.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/components/youtube_popover_scripts.js.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/components/youtube_popover_styles.css.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/content_styles.css.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/explain_view.html.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/item_view.html.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/simple_webpage.html.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/tabbed_webpage.html.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/templates/youtube_webpage.html.jinja +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/web_gen/webpage_render.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/workspaces/__init__.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/workspaces/param_state.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/workspaces/selections.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/workspaces/source_items.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/workspaces/workspace_dirs.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/workspaces/workspace_output.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/workspaces/workspace_registry.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xonsh_custom/command_nl_utils.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xonsh_custom/custom_shell.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xonsh_custom/customize_prompt.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xonsh_custom/load_into_xonsh.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xonsh_custom/shell_load_commands.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xonsh_custom/shell_which.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xonsh_custom/xonsh_completers.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xonsh_custom/xonsh_env.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xonsh_custom/xonsh_keybindings.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xonsh_custom/xonsh_modern_tools.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xonsh_custom/xonsh_ranking_completer.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xontrib/fnm.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/src/kash/xontrib/kash_extension.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/tests/file_storage/test_file_store.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/tests/kash/utils/api_utils/test_gather_limited.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/tests/kash/utils/file_utils/test_csv_utils.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/tests/kash/utils/rich_custom/test_multitask_status.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/tests/model/test_item_serialization.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/tests/shell/input/interactive_input_test.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/tests/test_shell.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/tests/utils/text_handling/test_markdown_footnotes.py +0 -0
- {kash_shell-0.3.33 → kash_shell-0.3.35}/tests/web_gen/test_social_metadata.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kash-shell
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.35
|
|
4
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>
|
|
@@ -20,7 +20,7 @@ Requires-Dist: aiolimiter>=1.2.1
|
|
|
20
20
|
Requires-Dist: anyio>=4.8.0
|
|
21
21
|
Requires-Dist: audioop-lts>=0.2.1; python_version >= '3.13'
|
|
22
22
|
Requires-Dist: cachetools>=5.5.2
|
|
23
|
-
Requires-Dist: chopdiff>=0.2.
|
|
23
|
+
Requires-Dist: chopdiff>=0.2.6
|
|
24
24
|
Requires-Dist: clideps>=0.1.4
|
|
25
25
|
Requires-Dist: colour>=0.1.5
|
|
26
26
|
Requires-Dist: cssselect>=1.2.0
|
|
@@ -41,7 +41,7 @@ Requires-Dist: litellm>=1.74.15.post1
|
|
|
41
41
|
Requires-Dist: markdownify>=0.13.1
|
|
42
42
|
Requires-Dist: mcp-proxy>=0.5.0
|
|
43
43
|
Requires-Dist: mcp>=1.6.0
|
|
44
|
-
Requires-Dist: openai
|
|
44
|
+
Requires-Dist: openai==1.99.9
|
|
45
45
|
Requires-Dist: pandas>=2.2.3
|
|
46
46
|
Requires-Dist: patch-ng>=1.18.1
|
|
47
47
|
Requires-Dist: pathspec>=0.12.1
|
|
@@ -72,6 +72,7 @@ Requires-Dist: thefuzz>=0.22.1
|
|
|
72
72
|
Requires-Dist: tiktoken>=0.9.0
|
|
73
73
|
Requires-Dist: tldr>=3.3.0
|
|
74
74
|
Requires-Dist: tminify>=0.1.6
|
|
75
|
+
Requires-Dist: truststore>=0.10.4
|
|
75
76
|
Requires-Dist: typing-extensions>=4.12.2
|
|
76
77
|
Requires-Dist: uvicorn>=0.34.0
|
|
77
78
|
Requires-Dist: xonsh>=0.19.3
|
|
@@ -48,7 +48,7 @@ dependencies = [
|
|
|
48
48
|
"flowmark>=0.5.3",
|
|
49
49
|
"frontmatter-format>=0.2.3",
|
|
50
50
|
"sidematter-format>=0.0.5",
|
|
51
|
-
"chopdiff>=0.2.
|
|
51
|
+
"chopdiff>=0.2.6",
|
|
52
52
|
"clideps>=0.1.4",
|
|
53
53
|
"tminify>=0.1.6",
|
|
54
54
|
# Shell and file essentials:
|
|
@@ -82,9 +82,10 @@ dependencies = [
|
|
|
82
82
|
# HTTP clients:
|
|
83
83
|
"httpx[brotli]>=0.28.1", # Include brotli for better compression and browser fingerprint.
|
|
84
84
|
"curl-cffi>=0.11.4",
|
|
85
|
+
"truststore>=0.10.4",
|
|
85
86
|
# LLM and API essentials:
|
|
86
87
|
"tiktoken>=0.9.0",
|
|
87
|
-
"openai
|
|
88
|
+
"openai==1.99.9", # FIXME: Pinning for now due to import errors (ImportError: cannot import name 'ResponseTextConfig' from 'openai.types.responses.response')
|
|
88
89
|
"litellm>=1.74.15.post1",
|
|
89
90
|
"pyrate-limiter>=3.7.0",
|
|
90
91
|
"aiolimiter>=1.2.1",
|
|
@@ -130,6 +131,7 @@ kash-mcp = "kash.mcp.mcp_cli:main"
|
|
|
130
131
|
|
|
131
132
|
[tool.uv.sources]
|
|
132
133
|
# For local development:
|
|
134
|
+
# flowmark = { path = "../flowmark", editable = true }
|
|
133
135
|
# clideps = { path = "../clideps", editable = true }
|
|
134
136
|
# tminify = { path = "../tminify", editable = true }
|
|
135
137
|
# chopdiff = { path = "../chopdiff", editable = true }
|
|
@@ -13,9 +13,7 @@ from kash.web_content.web_extract_readabilipy import extract_text_readabilipy
|
|
|
13
13
|
log = get_logger(__name__)
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
@kash_action(
|
|
17
|
-
precondition=is_url_resource | has_html_body, output_format=Format.markdown, mcp_tool=True
|
|
18
|
-
)
|
|
16
|
+
@kash_action(precondition=is_url_resource | has_html_body, output_format=Format.markdown)
|
|
19
17
|
def markdownify_html(item: Item) -> Item:
|
|
20
18
|
"""
|
|
21
19
|
Converts raw HTML or the URL of an HTML page to Markdown, fetching with the content
|
|
@@ -47,7 +47,7 @@ llm_options = LLMOptions(
|
|
|
47
47
|
)
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
@kash_action(llm_options=llm_options, params=common_params("model")
|
|
50
|
+
@kash_action(llm_options=llm_options, params=common_params("model"))
|
|
51
51
|
def summarize_as_bullets(item: Item, model: LLMName = LLM.default_standard) -> Item:
|
|
52
52
|
"""
|
|
53
53
|
Summarize text as bullet points.
|
|
@@ -22,9 +22,6 @@ class KashEnv(EnvEnum):
|
|
|
22
22
|
KASH_SYSTEM_CACHE_DIR = "KASH_SYSTEM_CACHE_DIR"
|
|
23
23
|
"""The directory for system cache (caches separate from workspace caches)."""
|
|
24
24
|
|
|
25
|
-
KASH_MCP_WS = "KASH_MCP_WS"
|
|
26
|
-
"""The directory for the workspace for MCP servers."""
|
|
27
|
-
|
|
28
25
|
KASH_SHOW_TRACEBACK = "KASH_SHOW_TRACEBACK"
|
|
29
26
|
"""Whether to show tracebacks on actions and commands in the shell."""
|
|
30
27
|
|
|
@@ -281,6 +281,8 @@ def _do_logging_setup(log_settings: LogSettings):
|
|
|
281
281
|
def prefix(line: str, emoji: str = "", warn_emoji: str = "") -> str:
|
|
282
282
|
prefix = task_stack_prefix_str()
|
|
283
283
|
emojis = f"{warn_emoji}{emoji}".strip()
|
|
284
|
+
if emojis:
|
|
285
|
+
emojis += " "
|
|
284
286
|
return "".join(filter(None, [prefix, emojis, line]))
|
|
285
287
|
|
|
286
288
|
|
|
@@ -19,7 +19,16 @@ class SuppressedWarningsStreamHandler(logging.StreamHandler):
|
|
|
19
19
|
def basic_file_handler(path: Path, level: LogLevel | LogLevelStr) -> logging.FileHandler:
|
|
20
20
|
handler = logging.FileHandler(path)
|
|
21
21
|
handler.setLevel(LogLevel.parse(level).value)
|
|
22
|
-
|
|
22
|
+
|
|
23
|
+
class ThreadIdFormatter(Formatter):
|
|
24
|
+
def format(self, record):
|
|
25
|
+
# Add shortened thread ID as an attribute
|
|
26
|
+
record.thread_short = str(record.thread)[-5:]
|
|
27
|
+
return super().format(record)
|
|
28
|
+
|
|
29
|
+
handler.setFormatter(
|
|
30
|
+
ThreadIdFormatter("%(asctime)s %(levelname).1s [T%(thread_short)s] %(name)s - %(message)s")
|
|
31
|
+
)
|
|
23
32
|
return handler
|
|
24
33
|
|
|
25
34
|
|
|
@@ -166,9 +166,6 @@ class Settings:
|
|
|
166
166
|
system_cache_dir: Path
|
|
167
167
|
"""Default global and system cache directory (for global media, content, etc)."""
|
|
168
168
|
|
|
169
|
-
mcp_ws_dir: Path | None
|
|
170
|
-
"""The directory for the MCP workspace, if set."""
|
|
171
|
-
|
|
172
169
|
local_server_log_path: Path
|
|
173
170
|
"""The path to the local server log."""
|
|
174
171
|
|
|
@@ -245,14 +242,6 @@ def _get_system_cache_dir() -> Path:
|
|
|
245
242
|
return KashEnv.KASH_SYSTEM_CACHE_DIR.read_path(default=_get_ws_root_dir() / "cache")
|
|
246
243
|
|
|
247
244
|
|
|
248
|
-
def _get_mcp_ws_dir() -> Path | None:
|
|
249
|
-
mcp_dir = KashEnv.KASH_MCP_WS.read_str(default=None)
|
|
250
|
-
if mcp_dir:
|
|
251
|
-
return Path(mcp_dir).expanduser().resolve()
|
|
252
|
-
else:
|
|
253
|
-
return None
|
|
254
|
-
|
|
255
|
-
|
|
256
245
|
@cache
|
|
257
246
|
def _get_local_server_log_path() -> Path:
|
|
258
247
|
return resolve_and_create_dirs(get_system_logs_dir() / f"{LOCAL_SERVER_LOG_NAME}.log")
|
|
@@ -266,7 +255,6 @@ def _read_settings():
|
|
|
266
255
|
system_config_dir=_get_system_config_dir(),
|
|
267
256
|
system_logs_dir=get_system_logs_dir(),
|
|
268
257
|
system_cache_dir=_get_system_cache_dir(),
|
|
269
|
-
mcp_ws_dir=_get_mcp_ws_dir(),
|
|
270
258
|
local_server_log_path=_get_local_server_log_path(),
|
|
271
259
|
# These default to the global but can be overridden by workspace settings.
|
|
272
260
|
media_cache_dir=_get_system_cache_dir() / MEDIA_CACHE_NAME,
|
|
@@ -75,6 +75,21 @@ def kash_setup(
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
def _lib_setup():
|
|
78
|
+
import logging
|
|
79
|
+
|
|
80
|
+
log = logging.getLogger(__name__)
|
|
81
|
+
|
|
82
|
+
# Trust store integration, for consistent TLS behavior.
|
|
83
|
+
try:
|
|
84
|
+
import truststore # type: ignore
|
|
85
|
+
|
|
86
|
+
truststore.inject_into_ssl()
|
|
87
|
+
log.info("truststore initialized: using system TLS trust store")
|
|
88
|
+
except Exception as exc:
|
|
89
|
+
# If not installed or fails, default TLS trust will be used.
|
|
90
|
+
log.warning("truststore not available at import time: %s", exc)
|
|
91
|
+
|
|
92
|
+
# Handle default YAML representers.
|
|
78
93
|
from sidematter_format import register_default_yaml_representers
|
|
79
94
|
|
|
80
95
|
register_default_yaml_representers()
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
from funlog import log_calls
|
|
2
|
+
|
|
3
|
+
from kash.config.logger import get_logger
|
|
4
|
+
from kash.utils.common.import_utils import warm_import_library
|
|
5
|
+
|
|
6
|
+
log = get_logger(__name__)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@log_calls(level="info", show_timing_only=True)
|
|
10
|
+
def warm_slow_imports(include_extras: bool = True):
|
|
11
|
+
"""
|
|
12
|
+
Pre-import slow packages to avoid delays when they are first used.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
include_extras: If True, warm import optional libraries like LLM packages,
|
|
16
|
+
scipy, torch, etc. Set to False for minimal/faster startup.
|
|
17
|
+
"""
|
|
18
|
+
try:
|
|
19
|
+
# Loading actions also loads any kits that are discovered.
|
|
20
|
+
import kash.actions # noqa: F401
|
|
21
|
+
import kash.local_server # noqa: F401
|
|
22
|
+
import kash.local_server.local_server # noqa: F401
|
|
23
|
+
import kash.mcp.mcp_server_sse # noqa: F401
|
|
24
|
+
|
|
25
|
+
# Core libraries that should usually be present
|
|
26
|
+
for lib_name, max_depth in [("xonsh", 3), ("uvicorn", 3)]:
|
|
27
|
+
try:
|
|
28
|
+
warm_import_library(lib_name, max_depth=max_depth)
|
|
29
|
+
except Exception as e:
|
|
30
|
+
log.debug(f"Could not warm import {lib_name}: {e}")
|
|
31
|
+
|
|
32
|
+
if include_extras:
|
|
33
|
+
# Fully warm import larger libraries (only if they're installed)
|
|
34
|
+
# These are optional dependencies that may not be present
|
|
35
|
+
optional_libraries = [
|
|
36
|
+
("pydantic", 5),
|
|
37
|
+
("litellm", 5),
|
|
38
|
+
("openai", 5),
|
|
39
|
+
("torch", 3), # torch is huge, limit depth
|
|
40
|
+
("scipy", 3), # scipy has test modules we want to skip
|
|
41
|
+
("marker", 4),
|
|
42
|
+
("pandas", 3),
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
for lib_name, max_depth in optional_libraries:
|
|
46
|
+
try:
|
|
47
|
+
warm_import_library(lib_name, max_depth=max_depth)
|
|
48
|
+
except Exception as e:
|
|
49
|
+
log.debug(f"Could not warm import {lib_name}: {e}")
|
|
50
|
+
|
|
51
|
+
# Initialize litellm configuration if available
|
|
52
|
+
try:
|
|
53
|
+
from kash.llm_utils.init_litellm import init_litellm
|
|
54
|
+
|
|
55
|
+
init_litellm()
|
|
56
|
+
except ImportError:
|
|
57
|
+
pass # litellm not installed
|
|
58
|
+
|
|
59
|
+
except ImportError as e:
|
|
60
|
+
log.warning(f"Error pre-importing packages: {e}")
|
|
@@ -204,7 +204,7 @@ def kash_action(
|
|
|
204
204
|
precondition: Precondition = Precondition.always,
|
|
205
205
|
arg_type: ArgType = ArgType.Locator,
|
|
206
206
|
expected_args: ArgCount = ONE_ARG,
|
|
207
|
-
output_type: ItemType =
|
|
207
|
+
output_type: ItemType | None = None,
|
|
208
208
|
output_format: Format | None = None,
|
|
209
209
|
expected_outputs: ArgCount = ONE_ARG,
|
|
210
210
|
params: ParamDeclarations = (),
|
|
@@ -349,7 +349,7 @@ def kash_action(
|
|
|
349
349
|
fmt_lines(self.params),
|
|
350
350
|
)
|
|
351
351
|
log.info(
|
|
352
|
-
"Action function param values
|
|
352
|
+
"Action function param values: %s",
|
|
353
353
|
self.param_value_summary_str(),
|
|
354
354
|
)
|
|
355
355
|
else:
|
|
@@ -107,7 +107,7 @@ def log_action(action: Action, action_input: ActionInput, operation: Operation):
|
|
|
107
107
|
log.message("%s Action: `%s`", EMOJI_START, action.name)
|
|
108
108
|
log.info("Running: `%s`", operation.command_line(with_options=True))
|
|
109
109
|
if len(action.param_value_summary()) > 0:
|
|
110
|
-
log.message("Parameters
|
|
110
|
+
log.message("Parameters: %s", action.param_value_summary_str())
|
|
111
111
|
log.info("Operation is: %s", operation)
|
|
112
112
|
log.info("Input items are:\n%s", fmt_lines(action_input.items))
|
|
113
113
|
|
|
@@ -144,15 +144,17 @@ def fetch_url_item_content(
|
|
|
144
144
|
if save_content:
|
|
145
145
|
assert page_data.saved_content
|
|
146
146
|
assert page_data.format_info
|
|
147
|
+
if not page_data.format_info.format:
|
|
148
|
+
log.warning("No format detected for content, defaulting to HTML: %s", url)
|
|
147
149
|
content_item = url_item.new_copy_with(
|
|
148
150
|
external_path=str(page_data.saved_content),
|
|
149
151
|
# Use the original filename, not the local cache filename (which has a hash suffix).
|
|
150
152
|
original_filename=item.get_filename(),
|
|
151
|
-
format=page_data.format_info.format,
|
|
153
|
+
format=page_data.format_info.format or Format.html,
|
|
152
154
|
)
|
|
153
155
|
|
|
154
156
|
if not url_item.title:
|
|
155
|
-
log.
|
|
157
|
+
log.info("Title is missing for url item: %s", item)
|
|
156
158
|
|
|
157
159
|
# Now save the updated URL item and also the content item if we have one.
|
|
158
160
|
ws.save(url_item, overwrite=overwrite)
|
|
@@ -11,8 +11,14 @@ from pathlib import Path
|
|
|
11
11
|
|
|
12
12
|
from clideps.utils.readable_argparse import ReadableColorFormatter
|
|
13
13
|
|
|
14
|
-
from kash.config.settings import
|
|
14
|
+
from kash.config.settings import (
|
|
15
|
+
DEFAULT_MCP_SERVER_PORT,
|
|
16
|
+
LogLevel,
|
|
17
|
+
atomic_global_settings,
|
|
18
|
+
global_settings,
|
|
19
|
+
)
|
|
15
20
|
from kash.config.setup import kash_setup
|
|
21
|
+
from kash.config.warm_slow_imports import warm_slow_imports
|
|
16
22
|
from kash.shell.version import get_version
|
|
17
23
|
|
|
18
24
|
__version__ = get_version()
|
|
@@ -26,8 +32,6 @@ log = logging.getLogger()
|
|
|
26
32
|
|
|
27
33
|
|
|
28
34
|
def build_parser():
|
|
29
|
-
from kash.workspaces.workspaces import global_ws_dir
|
|
30
|
-
|
|
31
35
|
parser = argparse.ArgumentParser(description=__doc__, formatter_class=ReadableColorFormatter)
|
|
32
36
|
parser.add_argument(
|
|
33
37
|
"--version",
|
|
@@ -36,8 +40,8 @@ def build_parser():
|
|
|
36
40
|
)
|
|
37
41
|
parser.add_argument(
|
|
38
42
|
"--workspace",
|
|
39
|
-
default=
|
|
40
|
-
help=f"Set workspace directory. Defaults to kash global workspace directory: {
|
|
43
|
+
default=global_settings().global_ws_dir,
|
|
44
|
+
help=f"Set workspace directory. Defaults to kash global workspace directory: {global_settings().global_ws_dir}",
|
|
41
45
|
)
|
|
42
46
|
parser.add_argument(
|
|
43
47
|
"--proxy",
|
|
@@ -95,6 +99,14 @@ def run_server(args: argparse.Namespace):
|
|
|
95
99
|
log.warning("kash MCP CLI started, logging to: %s", MCP_CLI_LOG_PATH)
|
|
96
100
|
log.warning("Current working directory: %s", Path(".").resolve())
|
|
97
101
|
|
|
102
|
+
# Eagerly import so the server is warmed up.
|
|
103
|
+
# This is important to save init time on fresh sandboxes like E2B!
|
|
104
|
+
warm_slow_imports(include_extras=True)
|
|
105
|
+
|
|
106
|
+
if args.workspace and args.workspace != global_settings().global_ws_dir:
|
|
107
|
+
with atomic_global_settings().updates() as settings:
|
|
108
|
+
settings.global_ws_dir = Path(args.workspace).absolute()
|
|
109
|
+
|
|
98
110
|
ws: Workspace = get_ws(name_or_path=Path(args.workspace), auto_init=True)
|
|
99
111
|
os.chdir(ws.base_dir)
|
|
100
112
|
log.warning("Running in workspace: %s", ws.base_dir)
|
|
@@ -3,7 +3,9 @@ from __future__ import annotations
|
|
|
3
3
|
import asyncio
|
|
4
4
|
import pprint
|
|
5
5
|
from dataclasses import dataclass
|
|
6
|
+
from pathlib import Path
|
|
6
7
|
|
|
8
|
+
from clideps.env_vars.dotenv_utils import load_dotenv_paths
|
|
7
9
|
from funlog import log_calls
|
|
8
10
|
from mcp.server.lowlevel import Server
|
|
9
11
|
from mcp.server.lowlevel.server import StructuredContent, UnstructuredContent
|
|
@@ -237,10 +239,10 @@ def run_mcp_tool(
|
|
|
237
239
|
"""
|
|
238
240
|
try:
|
|
239
241
|
with captured_output() as capture:
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
#
|
|
243
|
-
explicit_mcp_ws = global_settings().
|
|
242
|
+
dotenv_paths = load_dotenv_paths(True, True, Path("."))
|
|
243
|
+
log.warning("Loaded .env files: %s", dotenv_paths)
|
|
244
|
+
# Use the global workspace default
|
|
245
|
+
explicit_mcp_ws = global_settings().global_ws_dir
|
|
244
246
|
|
|
245
247
|
with kash_runtime(
|
|
246
248
|
workspace_dir=explicit_mcp_ws,
|
|
@@ -244,11 +244,12 @@ class Action(ABC):
|
|
|
244
244
|
be ONE_ARG.
|
|
245
245
|
"""
|
|
246
246
|
|
|
247
|
-
output_type: ItemType =
|
|
247
|
+
output_type: ItemType | None = None
|
|
248
248
|
"""
|
|
249
249
|
The type of the output item(s). If an action returns multiple output types,
|
|
250
250
|
this will be the output type of the first output.
|
|
251
251
|
This is mainly used for preassembly for the cache check if an output already exists.
|
|
252
|
+
None means to use the input type.
|
|
252
253
|
"""
|
|
253
254
|
|
|
254
255
|
output_format: Format | None = None
|
|
@@ -451,7 +452,7 @@ class Action(ABC):
|
|
|
451
452
|
return changed_params
|
|
452
453
|
|
|
453
454
|
def param_value_summary_str(self) -> str:
|
|
454
|
-
return
|
|
455
|
+
return ", ".join(
|
|
455
456
|
[format_key_value(name, value) for name, value in self.param_value_summary().items()]
|
|
456
457
|
)
|
|
457
458
|
|
|
@@ -560,7 +561,14 @@ class Action(ABC):
|
|
|
560
561
|
# Using first input to determine the output title.
|
|
561
562
|
primary_input = context.action_input.items[0]
|
|
562
563
|
# In this case we only expect one output, of the type specified by the action.
|
|
563
|
-
|
|
564
|
+
output_type = context.action.output_type or primary_input.type
|
|
565
|
+
if not output_type:
|
|
566
|
+
log.warning(
|
|
567
|
+
"No output type specified for action `%s`, using `doc` for preassembly",
|
|
568
|
+
self.name,
|
|
569
|
+
)
|
|
570
|
+
output_type = ItemType.doc
|
|
571
|
+
primary_output = primary_input.derived_copy(context, 0, type=output_type)
|
|
564
572
|
log.info("Preassembled output: source %s, %s", primary_output.source, primary_output)
|
|
565
573
|
return ActionResult([primary_output])
|
|
566
574
|
else:
|
|
@@ -585,9 +593,9 @@ class Action(ABC):
|
|
|
585
593
|
"type": "array",
|
|
586
594
|
"items": {
|
|
587
595
|
"type": "string",
|
|
588
|
-
"description": "A
|
|
596
|
+
"description": "A URL or S3 URL or a workspace file path, e.g. https://example.com/some/file/path or s3://somebucket/some/file/path or some/file/path",
|
|
589
597
|
},
|
|
590
|
-
"description": f"
|
|
598
|
+
"description": f"A list of paths or URLs of input items ({self.expected_args.as_str()}). Use an array of length one for a single input.",
|
|
591
599
|
}
|
|
592
600
|
|
|
593
601
|
# Set min/max items.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import re
|
|
3
4
|
from collections.abc import Sequence
|
|
4
5
|
from copy import deepcopy
|
|
5
6
|
from dataclasses import asdict, field, is_dataclass
|
|
@@ -7,6 +8,7 @@ from datetime import UTC, datetime
|
|
|
7
8
|
from enum import Enum
|
|
8
9
|
from pathlib import Path
|
|
9
10
|
from typing import TYPE_CHECKING, Any, NotRequired, TypedDict, TypeVar, Unpack
|
|
11
|
+
from urllib.parse import urlparse
|
|
10
12
|
|
|
11
13
|
from frontmatter_format import from_yaml_string, new_yaml
|
|
12
14
|
from prettyfmt import (
|
|
@@ -570,12 +572,19 @@ class Item:
|
|
|
570
572
|
from kash.file_storage.store_filenames import parse_item_filename
|
|
571
573
|
|
|
572
574
|
# Prefer original to external, e.g. if we know the original but the external might
|
|
573
|
-
# be a cache filename.
|
|
574
|
-
path =
|
|
575
|
+
# be a cache filename. Also check
|
|
576
|
+
path = (
|
|
577
|
+
self.store_path
|
|
578
|
+
or self.original_filename
|
|
579
|
+
or self.external_path
|
|
580
|
+
or (self.url and urlparse(self.url).path)
|
|
581
|
+
or ""
|
|
582
|
+
).strip()
|
|
575
583
|
if path:
|
|
576
584
|
path_name, _item_type, _format, _file_ext = parse_item_filename(Path(path).name)
|
|
577
585
|
else:
|
|
578
586
|
path_name = None
|
|
587
|
+
|
|
579
588
|
return path_name
|
|
580
589
|
|
|
581
590
|
def slug_name(
|
|
@@ -607,6 +616,7 @@ class Item:
|
|
|
607
616
|
|
|
608
617
|
slug = self.slug_name()
|
|
609
618
|
full_suffix = self.get_full_suffix()
|
|
619
|
+
|
|
610
620
|
return join_suffix(slug, full_suffix)
|
|
611
621
|
|
|
612
622
|
def body_heading(self, allowed_tags: tuple[str, ...] = ("h1", "h2")) -> str | None:
|
|
@@ -627,8 +637,8 @@ class Item:
|
|
|
627
637
|
pull_body_heading: bool = False,
|
|
628
638
|
) -> str:
|
|
629
639
|
"""
|
|
630
|
-
Get or infer a title for this item, falling back to the
|
|
631
|
-
|
|
640
|
+
Get or infer a title for this item, falling back to the URL, description or
|
|
641
|
+
body text. Optionally, include the last operation as a parenthetical at the end
|
|
632
642
|
of the title. Will use "Untitled" if all else fails.
|
|
633
643
|
"""
|
|
634
644
|
# First special case: if we are pulling the title from the body header, check
|
|
@@ -642,12 +652,9 @@ class Item:
|
|
|
642
652
|
if not self.title and self.url:
|
|
643
653
|
return abbrev_str(self.url, max_len)
|
|
644
654
|
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
# Use the title or the path if possible, falling back to description or even body text.
|
|
655
|
+
# Use semantic sources for titles. The original filename is preserved separately.
|
|
648
656
|
base_title = (
|
|
649
657
|
self.title
|
|
650
|
-
or filename_stem
|
|
651
658
|
or self.description
|
|
652
659
|
or (not self.is_binary and self.abbrev_body(max_len))
|
|
653
660
|
or UNTITLED
|
|
@@ -657,7 +664,11 @@ class Item:
|
|
|
657
664
|
# indicating the last operation, if there was one. This makes filename slugs
|
|
658
665
|
# more readable.
|
|
659
666
|
suffix = ""
|
|
660
|
-
if
|
|
667
|
+
if (
|
|
668
|
+
add_ops_suffix
|
|
669
|
+
and self.type.allows_op_suffix
|
|
670
|
+
and not re.search(r"step\d+", base_title) # Just in case, never add suffix twice.
|
|
671
|
+
):
|
|
661
672
|
last_op = self.history and self.history[-1].action_name
|
|
662
673
|
if last_op:
|
|
663
674
|
step_num = len(self.history) + 1 if self.history else 1
|
|
@@ -885,18 +896,19 @@ class Item:
|
|
|
885
896
|
if action_context:
|
|
886
897
|
# Default the output item type and format to the action's declared output_type
|
|
887
898
|
# and format if not explicitly set.
|
|
888
|
-
if "type" not in updates:
|
|
899
|
+
if "type" not in updates and action_context.action.output_type:
|
|
889
900
|
updates["type"] = action_context.action.output_type
|
|
890
901
|
# If we were not given a format override, we leave the output type the same.
|
|
891
902
|
elif action_context.action.output_format:
|
|
892
903
|
# Check an overridden format and then our own format.
|
|
893
|
-
new_output_format = updates.get("format"
|
|
904
|
+
new_output_format = updates.get("format")
|
|
894
905
|
if new_output_format and action_context.action.output_format != new_output_format:
|
|
895
906
|
log.warning(
|
|
896
|
-
"Output item format `%s` does not match declared output format `%s` for action `%s`",
|
|
907
|
+
"Output item format `%s` does not match declared output format `%s` for action `%s` on item: %s",
|
|
897
908
|
new_output_format,
|
|
898
909
|
action_context.action.output_format,
|
|
899
910
|
action_context.action.name,
|
|
911
|
+
self,
|
|
900
912
|
)
|
|
901
913
|
|
|
902
914
|
new_item = self.new_copy_with(update_timestamp=True, **updates)
|
|
@@ -918,7 +930,9 @@ class Item:
|
|
|
918
930
|
|
|
919
931
|
# Fall back to action title template if we have it and title wasn't explicitly set.
|
|
920
932
|
if "title" not in updates:
|
|
921
|
-
|
|
933
|
+
# Avoid using filenames as titles when deriving. Prefer existing semantic title
|
|
934
|
+
# or derive from body heading/URL.
|
|
935
|
+
prev_title = self.title or self.pick_title(pull_body_heading=True)
|
|
922
936
|
|
|
923
937
|
if action:
|
|
924
938
|
new_item.title = action.format_title(prev_title)
|
|
@@ -70,20 +70,9 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
def _import_packages():
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
import uvicorn.protocols.http.h11_impl # noqa: F401
|
|
77
|
-
import uvicorn.protocols.websockets.websockets_impl # noqa: F401
|
|
78
|
-
import xonsh.completers.init # noqa: F401
|
|
79
|
-
import xonsh.pyghooks # noqa: F401
|
|
80
|
-
|
|
81
|
-
import kash.actions # noqa: F401
|
|
82
|
-
import kash.local_server # noqa: F401
|
|
83
|
-
import kash.local_server.local_server # noqa: F401
|
|
84
|
-
import kash.mcp.mcp_server_sse # noqa: F401
|
|
85
|
-
except ImportError as e:
|
|
86
|
-
log.warning(f"Error pre-importing packages: {e}")
|
|
73
|
+
from kash.config.warm_slow_imports import warm_slow_imports
|
|
74
|
+
|
|
75
|
+
warm_slow_imports(include_extras=False)
|
|
87
76
|
|
|
88
77
|
imports_done_event.set()
|
|
89
78
|
|