kash-shell 0.3.17__py3-none-any.whl → 0.3.20__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. kash/actions/core/{markdownify.py → markdownify_html.py} +3 -6
  2. kash/actions/core/minify_html.py +41 -0
  3. kash/commands/base/show_command.py +11 -1
  4. kash/commands/workspace/workspace_commands.py +10 -88
  5. kash/config/colors.py +6 -2
  6. kash/docs/markdown/topics/a1_what_is_kash.md +52 -23
  7. kash/docs/markdown/topics/a2_installation.md +17 -30
  8. kash/docs/markdown/topics/a3_getting_started.md +5 -19
  9. kash/exec/__init__.py +3 -0
  10. kash/exec/action_exec.py +3 -3
  11. kash/exec/fetch_url_items.py +109 -0
  12. kash/exec/precondition_registry.py +3 -3
  13. kash/file_storage/file_store.py +24 -1
  14. kash/file_storage/store_filenames.py +4 -0
  15. kash/help/function_param_info.py +1 -1
  16. kash/help/help_pages.py +1 -1
  17. kash/help/help_printing.py +1 -1
  18. kash/llm_utils/llm_features.py +5 -1
  19. kash/llm_utils/llms.py +18 -8
  20. kash/media_base/media_cache.py +48 -24
  21. kash/media_base/media_services.py +63 -14
  22. kash/media_base/services/local_file_media.py +9 -1
  23. kash/model/items_model.py +22 -8
  24. kash/model/media_model.py +9 -1
  25. kash/model/params_model.py +9 -3
  26. kash/utils/common/function_inspect.py +97 -1
  27. kash/utils/common/parse_docstring.py +347 -0
  28. kash/utils/common/testing.py +58 -0
  29. kash/utils/common/url_slice.py +329 -0
  30. kash/utils/file_utils/file_formats.py +1 -1
  31. kash/utils/text_handling/markdown_utils.py +424 -16
  32. kash/web_content/web_extract.py +34 -15
  33. kash/web_content/web_page_model.py +10 -1
  34. kash/web_gen/templates/base_styles.css.jinja +137 -15
  35. kash/web_gen/templates/base_webpage.html.jinja +13 -17
  36. kash/web_gen/templates/components/toc_scripts.js.jinja +319 -0
  37. kash/web_gen/templates/components/toc_styles.css.jinja +284 -0
  38. kash/web_gen/templates/components/tooltip_scripts.js.jinja +730 -0
  39. kash/web_gen/templates/components/tooltip_styles.css.jinja +482 -0
  40. kash/web_gen/templates/content_styles.css.jinja +13 -8
  41. kash/web_gen/templates/simple_webpage.html.jinja +15 -481
  42. kash/workspaces/workspaces.py +10 -1
  43. {kash_shell-0.3.17.dist-info → kash_shell-0.3.20.dist-info}/METADATA +75 -72
  44. {kash_shell-0.3.17.dist-info → kash_shell-0.3.20.dist-info}/RECORD +47 -40
  45. kash/exec/fetch_url_metadata.py +0 -72
  46. kash/help/docstring_utils.py +0 -111
  47. {kash_shell-0.3.17.dist-info → kash_shell-0.3.20.dist-info}/WHEEL +0 -0
  48. {kash_shell-0.3.17.dist-info → kash_shell-0.3.20.dist-info}/entry_points.txt +0 -0
  49. {kash_shell-0.3.17.dist-info → kash_shell-0.3.20.dist-info}/licenses/LICENSE +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kash-shell
3
- Version: 0.3.17
3
+ Version: 0.3.20
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>
@@ -19,7 +19,7 @@ Requires-Python: <4.0,>=3.11
19
19
  Requires-Dist: anyio>=4.8.0
20
20
  Requires-Dist: audioop-lts>=0.2.1; python_version >= '3.13'
21
21
  Requires-Dist: cachetools>=5.5.2
22
- Requires-Dist: chopdiff>=0.2.1
22
+ Requires-Dist: chopdiff>=0.2.3
23
23
  Requires-Dist: clideps>=0.1.4
24
24
  Requires-Dist: colour>=0.1.5
25
25
  Requires-Dist: cssselect>=1.2.0
@@ -38,6 +38,7 @@ Requires-Dist: litellm>=1.63.11
38
38
  Requires-Dist: markdownify>=0.13.1
39
39
  Requires-Dist: mcp-proxy>=0.5.0
40
40
  Requires-Dist: mcp>=1.6.0
41
+ Requires-Dist: minify-tw-html>=0.1.3
41
42
  Requires-Dist: openai>=1.66.3
42
43
  Requires-Dist: pandas>=2.2.3
43
44
  Requires-Dist: patch-ng>=1.18.1
@@ -83,35 +84,64 @@ src="https://github.com/user-attachments/assets/a5d62ae4-17e6-46bb-a9cb-3b6ec8d8
83
84
  > “*Simple should be simple.
84
85
  > Complex should be possible.*” —Alan Kay
85
86
 
86
- Kash (“Knowledge Agent SHell”) is an **interactive, AI-native command-line** shell for
87
- practical knowledge tasks.
87
+ Kash (“Knowledge Agent SHell”) is an experiment in making software tasks more modular,
88
+ exploratory, and flexible using Python and current AI tools.
88
89
 
89
- It's also **a Python library** that lets you convert a simple Python function into a
90
- command and an MCP tool, so it integrates with other tools like Anthropic Desktop or
91
- Cursor.
90
+ The philosophy behind kash is similar to Unix shell tools: simple commands that can be
91
+ combined in flexible and powerful ways.
92
+ It operates on "items" such as URLs, files, or Markdown notes within a workspace
93
+ directory.
92
94
 
93
- You can think of it a kind of power-tool for technical users who want to use Python and
94
- APIs, a kind of hybrid between an AI assistant, a shell, and a developer tool like
95
- Cursor or Claude Code.
95
+ You can use Kash as an **interactive, AI-native command-line** shell for practical
96
+ knowledge tasks. It's also **a Python library** that lets you convert a simple Python
97
+ function into a command and an MCP tool, so it integrates with other tools like
98
+ Anthropic Desktop or Cursor.
96
99
 
97
- It's my attempt at finding a way to remix, combine, and interactively explore and then
98
- gradually automate complex tasks by composing AI tools, APIs, and libraries.
100
+ It's new and still has some rough edges, but it's now working well enough it is feeling
101
+ quite powerful. It now serves as a replacement for my usual shell (previously bash or
102
+ zsh). I use it routinely to remix, combine, and interactively explore and then gradually
103
+ automate complex tasks by composing AI tools, APIs, and libraries.
104
+ And last but not least, the same framework lets me build other tools (like
105
+ [textpress](https://github.com/jlevy/textpress)).
99
106
 
100
107
  And of course, kash can read its own functionality and enhance itself by writing new
101
108
  actions.
102
109
 
110
+ ### Kash Packages
111
+
112
+ The [kash-shell](https://github.com/jlevy/kash) package is the base package and includes
113
+ the Python framework, a few core utilities, and the Kash command-line shell.
114
+
115
+ Additional actions for handling more complex tasks like converting documents and
116
+ transcribing, researching, or annotating videos, are in the
117
+ [kash-docs](https://github.com/jlevy/kash-docs) and
118
+ [kash-media](https://github.com/jlevy/kash-media) packages, all available on PyPI and
119
+ quick to install via uv.
120
+
103
121
  ### Key Concepts
104
122
 
105
- - **Actions:** The core of Kash are **Kash actions**. By decorating a Python function,
106
- you can turn it into an action, which makes it more flexible and powerful, able to
107
- work with file inputs stored and outputs in a given directory, also called a
108
- **workspace**.
123
+ - **Actions:** The core of Kash are **actions**. By decorating a Python function with
124
+ `@kash_action`, you can turn it into an action, which makes it more flexible and
125
+ powerful. It can then be used like a command line command as well as a Python function
126
+ or an MCP tool.
127
+
128
+ - **Workspaces:** A key element of Kash is that it does most nontrivial work in the
129
+ context of a **workspace**. A workspace is just a directory of files that have a few
130
+ conventions to make it easier to maintain context and perform actions.
131
+ A bit like how Git repos work, it has a `.kash/` directory that holds metadata and
132
+ cached content. The rest can be anything, but is typically directories of resources
133
+ (like .docx or .pdf or links to web pages) or content, typically Markdown files with
134
+ YAML frontmatter. All text files use
135
+ [frontmatter-format](https://github.com/jlevy/frontmatter-format) so have easy-to-read
136
+ YAML metadata that includes not just title or description, but also the names of the
137
+ actions that created it.
109
138
 
110
139
  - **Compositionality:** An action is composable with other actions simply as a Python
111
- function, so complex (like transcribing and annotating a video) actions can be built
112
- from simpler actions (like downloading and caching a YouTube video, identifying the
113
- speakers in a transcript, etc.). The goal is to reduce the "interstitial complexity"
114
- of combining tools, so it's easy for you (or an LLM!) to combine tools in flexible and
140
+ function, so complex operations (for example, transcribing and annotating a video and
141
+ publishing it on a website) actions can be built from simpler actions (say downloading
142
+ and caching a YouTube video, identifying the speakers in a transcript, formatting it
143
+ as pretty HTML, etc.). The goal is to reduce the "interstitial complexity" of
144
+ combining tools, so it's easy for you (or an LLM!) to combine tools in flexible and
115
145
  powerful ways.
116
146
 
117
147
  - **Command-line usage:** In addition to using the function in other libraries and
@@ -120,9 +150,6 @@ actions.
120
150
  video. In kash you have **smart tab completions**, **Python expressions**, and an **LLM
121
151
  assistant** built into the shell.
122
152
 
123
- - **MCP support:** Finally, an action is also an **MCP tool server** so you can use it
124
- in any MCP client, like Anthropic Desktop or Cursor.
125
-
126
153
  - **Support for any API:** Kash is tool agnostic and runs locally, on file inputs in
127
154
  simple formats, so you own and manage your data and workspaces however you like.
128
155
  You can use it with any models or APIs you like, and is already set up to use the APIs
@@ -131,6 +158,9 @@ actions.
131
158
  **Perplexity**, **Firecrawl**, **Exa**, and any Python libraries.
132
159
  There is also some experimental support for **LlamaIndex** and **ChromaDB**.
133
160
 
161
+ - **MCP support:** Finally, an action is also an **MCP tool server** so you can use it
162
+ in any MCP client, like Anthropic Desktop or Cursor.
163
+
134
164
  ### What Can Kash Do?
135
165
 
136
166
  You can use kash actions to do deep research, transcribe videos, summarize and organize
@@ -175,9 +205,9 @@ ideas, feedback, or use cases for Kash!
175
205
 
176
206
  ### Running the Kash Shell
177
207
 
178
- Kash offers a shell environment based on [xonsh](https://xon.sh/) augmented with an LLM
179
- assistant and a variety of other enhanced commands and customizations.
180
- If you've used a bash or Python shell before, xonsh is very intuitive.
208
+ Kash offers a shell environment based on [xonsh](https://xon.sh/) augmented with a bunch
209
+ of enhanced commands and customizations.
210
+ If you've used a bash or Python shell before, it should be very intuitive.
181
211
 
182
212
  Within the kash shell, you get a full environment with all actions and commands.
183
213
  You also get intelligent auto-complete, a built-in assistant to help you perform tasks,
@@ -211,30 +241,17 @@ These are for `kash-media` but you can use a `kash-shell` for a more basic setup
211
241
  Kash is easiest to use via [**uv**](https://docs.astral.sh/uv/), the new package
212
242
  manager for Python. `uv` replaces traditional use of `pyenv`, `pipx`, `poetry`, `pip`,
213
243
  etc. Installing `uv` also ensures you get a compatible version of Python.
214
-
215
- If you don't have `uv` installed, a quick way to install it is:
216
-
244
+ See [uv's docs](https://docs.astral.sh/uv/getting-started/installation/) for other
245
+ installation methods and platforms.
246
+ Usually you just want to run:
217
247
  ```shell
218
248
  curl -LsSf https://astral.sh/uv/install.sh | sh
219
249
  ```
220
250
 
221
- For macOS, you prefer [brew](https://brew.sh/) you can install or upgrade uv with:
222
-
223
- ```shell
224
- brew update
225
- brew install uv
226
- ```
227
- See [uv's docs](https://docs.astral.sh/uv/getting-started/installation/) for other
228
- installation methods and platforms.
229
-
230
251
  2. **Install additional command-line tools:**
231
252
 
232
253
  In addition to Python, it's highly recommended to install a few other dependencies to
233
- make more tools and commands work: `ripgrep` (for search), `bat` (for prettier file
234
- display), `eza` (a much improved version of `ls`), `hexyl` (a much improved hex
235
- viewer), `imagemagick` (for image display in modern terminals), `libmagic` (for file
236
- type detection), `ffmpeg` (for audio and video conversions)
237
-
254
+ make more tools and commands work.
238
255
  For macOS, you can again use brew:
239
256
 
240
257
  ```shell
@@ -255,22 +272,22 @@ These are for `kash-media` but you can use a `kash-shell` for a more basic setup
255
272
 
256
273
  For Windows or other platforms, see the uv instructions.
257
274
 
275
+ Kash auto-detects and uses `ripgrep` (for search), `bat` (for prettier file display),
276
+ `eza` (a much improved version of `ls`), `hexyl` (a much improved hex viewer),
277
+ `imagemagick` (for image display in modern terminals), `libmagic` (for file type
278
+ detection), `ffmpeg` (for audio and video conversions)
279
+
258
280
  3. **Install kash or a kash kit:**
259
281
 
282
+ For a more meaningful demo, use an enhanced version of kash that also has various
283
+ media tools (like yt-dlp and Deepgram support):
284
+
260
285
  ```shell
261
- uv tool install kash-media --python=3.13
286
+ uv tool install kash-media --upgrade --python=3.13
262
287
  ```
263
288
 
264
289
  Other versions of Python should work but 3.13 is recommended.
265
- For a setup without the media tools, use `kash-shell` instead.
266
-
267
- If you've installed an older version and want to be sure you have the latest shell,
268
- you may want to add `--upgrade --force` to be sure you get the latest version of the
269
- kit.
270
-
271
- ```shell
272
- uv tool install kash-media --python=3.13 --upgrade --force
273
- ```
290
+ For a setup without the media tools, just install `kash-shell` instead.
274
291
 
275
292
  4. **Set up API keys:**
276
293
 
@@ -362,25 +379,11 @@ Type `help` for the full documentation.
362
379
  The simplest way to illustrate how to use kash is by example.
363
380
  You can go through the commands below a few at a time, trying each one.
364
381
 
365
- This is a "real" example that uses a bunch of libraries.
382
+ This is a "real" example that uses ffmpeg and a few other libraries.
366
383
  So to get it to work you must install not just the main shell but the kash "media kit"
367
384
  with extra dependencies.
368
-
369
- You need the following tools:
370
-
371
- ```shell
372
- # On MacOS:
373
- brew install ripgrep bat eza hexyl imagemagick libmagic ffmpeg
374
- # On Linux:
375
- apt install ripgrep bat eza hexyl imagemagick libmagic ffmpeg
376
- ```
377
-
378
- Then install the `kash-media`, which includes kash-shell and many other libs like yt-dlp
379
- for YouTube handling:
380
-
381
- ```shell
382
- uv tool install kash-media
383
- ```
385
+ This is discussed in [the installation instructions](#installation-steps).
386
+ If you don't have these already installed, you can add these tools:
384
387
 
385
388
  Then run `kash` to start.
386
389
 
@@ -499,7 +502,7 @@ show_webpage
499
502
  show_webpage --help
500
503
 
501
504
  # And you can actually how this works by looking at its source:
502
- source_code show_webpage
505
+ show_webpage --show_source
503
506
 
504
507
  # What if something isn't working right?
505
508
  # Sometimes we may want to browse more detailed system logs:
@@ -518,7 +521,7 @@ transcribe_format https://www.youtube.com/watch?v=_8djNYprRDI
518
521
 
519
522
  # Getting a little fancier, this one adds little paragraph annotations and
520
523
  # a nicer summary at the top:
521
- transcribe_annotate_summarize https://www.youtube.com/watch?v=_8djNYprRDI
524
+ transcribe_annotate https://www.youtube.com/watch?v=_8djNYprRDI
522
525
 
523
526
  show_webpage
524
527
  ```
@@ -4,7 +4,8 @@ kash/actions/__init__.py,sha256=a4pQw8O-Y3q5N4Qg2jUV0xEZLX6d164FQhZ6zizY9fE,1357
4
4
  kash/actions/core/assistant_chat.py,sha256=28G20cSr7Z94cltouTPve5TXY3km0lACrRvpLE27fK8,1837
5
5
  kash/actions/core/chat.py,sha256=yCannBFa0cSpR_in-XSSuMm1x2ZZQUCKmlqzhsUfpOo,2696
6
6
  kash/actions/core/format_markdown_template.py,sha256=ZJbtyTSypPo2ewLiGRSyIpVf711vQMhI_-Ng-FgCs80,2991
7
- kash/actions/core/markdownify.py,sha256=KjdUeY4c9EhZ5geQrn22IoBv0P_p62q4zyyOYE0NRHM,1270
7
+ kash/actions/core/markdownify_html.py,sha256=RXsC59rhDoLssRujkS32PETN1zzncIofFO7J3qTrnJc,1277
8
+ kash/actions/core/minify_html.py,sha256=99r3SjpI2NQP7e5MnMixAiT5lxPx7t2nyJvJi6Yps6w,1365
8
9
  kash/actions/core/readability.py,sha256=ljdB2rOpzfKU2FpEJ2UELIzcdOAWvdUjFsxoHRTE3xo,989
9
10
  kash/actions/core/render_as_html.py,sha256=CIPGKCjUEVNsnXmpqHCUnjGwTfEfOyCXxlYFUN8mahY,1870
10
11
  kash/actions/core/show_webpage.py,sha256=Ggba9jkx9U-FZOcuL0lkS-SwtPNUyxVsGdeQrqwWs1s,887
@@ -25,7 +26,7 @@ kash/commands/base/logs_commands.py,sha256=IyNgxaAoa5LlS-VxD_x8bXTVbD04pT8qEHlIJ
25
26
  kash/commands/base/model_commands.py,sha256=d17a2NvfDbwV1y8gyZVsOtX-j5H5we5OEXM9TxTqvBs,1790
26
27
  kash/commands/base/reformat_command.py,sha256=fhGSfC8KyPsEcKWq6lXXlXSIPRw1CweLIFsS3AmYGYU,1869
27
28
  kash/commands/base/search_command.py,sha256=FXtP09HmmfHRrjenvmU4j0Lcw34piIzdI3UFGbUQ1tg,2201
28
- kash/commands/base/show_command.py,sha256=YMTyIQhlva2HvMkoLxhBKDUeiSi7OHYCinW6oT-8lVE,2895
29
+ kash/commands/base/show_command.py,sha256=rFyIW_5oZArRSTpe71PaX87Hq30WE-t6RAJKeCwJ3lM,3299
29
30
  kash/commands/extras/parse_uv_lock.py,sha256=HVqmGhJAd3ZCTTTaXe_nzzTMFKhwjLLP7hx4NTM224U,5696
30
31
  kash/commands/extras/utils_commands.py,sha256=rz3N7VxoUHvCxksRt-sLubkvyW-VH9OTltLEMEnjRfU,769
31
32
  kash/commands/help/assistant_commands.py,sha256=BhGhtyoiEbu6xYfi-r47g_U4pxptUkucyNmiv5_kg34,3042
@@ -34,10 +35,10 @@ kash/commands/help/help_commands.py,sha256=eJTpIhXck123PAUq2k-D3Q6UL6IQ8atOVYurL
34
35
  kash/commands/help/logo.py,sha256=W8SUach9FjoTqpHZwTGS582ry4ZluxbBp86ZCiAtDkY,3505
35
36
  kash/commands/help/welcome.py,sha256=F4QBgj3e1dM9Pf0H4TSzCrkVfXQVKUIl0b6Qmofbdo4,905
36
37
  kash/commands/workspace/selection_commands.py,sha256=nZzA-H7Pk8kqSJVRlX7j1m6cZX-e0X8isOryDU41vqU,8156
37
- kash/commands/workspace/workspace_commands.py,sha256=ZJ3aPsnQ0FOkaA6stpV4YPEOQRCOKTazbMCIQkk9Cmk,25119
38
+ kash/commands/workspace/workspace_commands.py,sha256=_2TcthGOu-nU9E_-jjf4kba9ldLRA6qe6Do6zV06EKc,21960
38
39
  kash/config/__init__.py,sha256=ytly9Typ1mWV4CXfV9G3CIPtPQ02u2rpZ304L3GlFro,148
39
40
  kash/config/capture_output.py,sha256=ud3uUVNuDicHj3mI_nBUBO-VmOrxtBdA3z-I3D1lSCU,2398
40
- kash/config/colors.py,sha256=v8JTALJnjtSQVodfqCBkzC1a2gTrGUCjpIQmyp4u4cY,13208
41
+ kash/config/colors.py,sha256=qUUUE-x8srSp1IdJePNAUtNQbOZKBLix8FeOe-Rxmgg,13421
41
42
  kash/config/env_settings.py,sha256=uhCdfs9-TzJ15SzbuIQP1yIORaLUqYXCxh9qq_Z8cJc,996
42
43
  kash/config/init.py,sha256=aE4sZ6DggBmmoZEx9C5mQKrEbcDiswX--HF7pfCFKzc,526
43
44
  kash/config/lazy_imports.py,sha256=MCZXLnKvNyfHi0k7MU5rNwcdJtUF28naCixuogsAOAA,805
@@ -60,9 +61,9 @@ kash/docs/markdown/assistant_instructions_template.md,sha256=Fzeledd_nr3bKhvQ1qZ
60
61
  kash/docs/markdown/readme_template.md,sha256=iGx9IjSni1t_9BuYD5d2GgkxkNIkqvE3k78IufHF6Yg,409
61
62
  kash/docs/markdown/warning.md,sha256=bG0T3UFqAkzF8217J8AbIbQ7ftJ_GKMRilIGq9eLdYc,162
62
63
  kash/docs/markdown/welcome.md,sha256=yp_tmGXGIb8043ZDIL97Q1uaKVys7-ArHCprgDlon7w,611
63
- kash/docs/markdown/topics/a1_what_is_kash.md,sha256=EE1ImWkkXHImmpe24QEau30suUMBRllHa0e6e99MUGQ,4983
64
- kash/docs/markdown/topics/a2_installation.md,sha256=fzx2rkMK-hJh9XlFqHutGVFZS5OkweZYizJO5_FCqHw,6019
65
- kash/docs/markdown/topics/a3_getting_started.md,sha256=qUeFYAn18DkZn0JkkpIkoHh8LFRipeQBaoYa9U8mDK8,9577
64
+ kash/docs/markdown/topics/a1_what_is_kash.md,sha256=rgVrv6tRXEwdqQ54DAfHP3BSAuq8Ux4wCNeluTwpkhU,6758
65
+ kash/docs/markdown/topics/a2_installation.md,sha256=DSzaniHjOYPC3soGLPTGOGDVvbiPTROtb3S8zYUCPEs,5736
66
+ kash/docs/markdown/topics/a3_getting_started.md,sha256=xOMevEXMIpVJvTGuuwI9Cc9sun3tQM3OqCgynSgMpeM,9376
66
67
  kash/docs/markdown/topics/a4_elements.md,sha256=XNJRw-iqnytiIHOAshp1YnUpHM5KBgFAhuOdp_fekxQ,4615
67
68
  kash/docs/markdown/topics/a5_tips_for_use_with_other_tools.md,sha256=VGUdq8dm78E8PFbNR9BmV8Gj-r8zP-vOQz8TibQmGw0,3259
68
69
  kash/docs/markdown/topics/b0_philosophy_of_kash.md,sha256=ADtgbvv756vKrJPhdvNGVzJVedOgo6ak7_vGEEFi8Sc,8749
@@ -80,19 +81,19 @@ kash/docs_base/recipes/tldr_standard_commands.sh,sha256=7nPES55aT45HF3eDhQRrEUiW
80
81
  kash/embeddings/cosine.py,sha256=QTWPWUHivXjxCM6APSqij_-4mywM2BVVm0xb0hu7FHA,1587
81
82
  kash/embeddings/embeddings.py,sha256=v6RmrEHsx5PuE3fPrY15RK4fgW0K_VlNWDTjCVr11zY,4451
82
83
  kash/embeddings/text_similarity.py,sha256=BOo9Vcs5oi2Zs5La56uTkPMHo65XSd4qz_yr6GTfUA4,1924
83
- kash/exec/__init__.py,sha256=rdSsKzTaXfSZmD5JvmUSSwmpfvl-moNv9PUgtE_WUpQ,1148
84
+ kash/exec/__init__.py,sha256=Najls8No143yoj_KAaOQgo8ufC2LWCB_DwwEQ-8nDM0,1277
84
85
  kash/exec/action_decorators.py,sha256=VOSCnFiev2_DuFoSk0i_moejwM4wJ1j6QfsQd93uetI,16480
85
- kash/exec/action_exec.py,sha256=UHs-gKbu63d313MwfKsbVoRoTq7LbY8Vs0u_R4QZMh8,19025
86
+ kash/exec/action_exec.py,sha256=O_4UB_Vt7QRxltviMeBwNIfw9ten06n4fQ39MregacE,19017
86
87
  kash/exec/action_registry.py,sha256=numU9pH_W5RgIrYmfi0iYMYy_kLJl6vup8PMrhxAfdc,2627
87
88
  kash/exec/combiners.py,sha256=AJ6wgPUHsmwanObsUw64B83XzU26yuh5t4l7igLn82I,4291
88
89
  kash/exec/command_exec.py,sha256=zc-gWm7kyB5J5Kp8xhULQ9Jj9AL927KkDPXXk-Yr1Bw,1292
89
90
  kash/exec/command_registry.py,sha256=1s2ogU8b8nqK_AEtslbr1eYrXCGDkeT30UrB7L0BRoM,2027
90
- kash/exec/fetch_url_metadata.py,sha256=0mUE6mj47vEKUFuunOfGWcAmmlQ3HrhyTQtMzqzNJ0Y,2721
91
+ kash/exec/fetch_url_items.py,sha256=UUj3wrP3adzZHV_Icx7zSB9zRtl0S7EC54Ios8fuvbg,4404
91
92
  kash/exec/history.py,sha256=l2XwHGBR1UgTGSFPSBE9mltmxvjR_5qFFO6d-Z008nc,1208
92
93
  kash/exec/importing.py,sha256=xunmBapeUMNc6Zox7y6e_DZkidyWeouiFZpphajwSzc,1843
93
94
  kash/exec/llm_transforms.py,sha256=p_aLp70VoIgheW4v8uoweeuEVWj06AzQekvn_jM3B-g,4378
94
95
  kash/exec/precondition_checks.py,sha256=HymxL7qm4Yz8V76Um5pKdIRnQ2N-p9rpQQi1fI38bNA,2139
95
- kash/exec/precondition_registry.py,sha256=-vYWN2wduq-hau2aDShQ5tglTF-cHC1vaZqU-peir9A,1384
96
+ kash/exec/precondition_registry.py,sha256=9O-01d2OrsYLuhqodVuWjouLR2ABJbUotAmfJNBCRzs,1439
96
97
  kash/exec/preconditions.py,sha256=6bJ76AVFo0TLoykrGBNB0rrpIDWD0umfb3F5sMcmoKo,5131
97
98
  kash/exec/resolve_args.py,sha256=gu65epzVrwWHdHA-KwAwYssncJIB84oHOJeoXXrQ2mM,4428
98
99
  kash/exec/runtime_settings.py,sha256=aK6nGbZhKSIDVmV6AqV68hQkiaIGWnCiNzHtwwZ5V0w,3960
@@ -103,22 +104,21 @@ kash/exec_model/commands_model.py,sha256=iM8QhzA0tAas5OwF5liUfHtm45XIH1LcvCviuh3
103
104
  kash/exec_model/script_model.py,sha256=1VG3LhkTmlKzHOYouZ92ZpOSKSCcsz3-tHNcFMQF788,5031
104
105
  kash/exec_model/shell_model.py,sha256=LUhQivbpXlerM-DUzNY7BtctNBbn08Wto8CSSxQDxRU,568
105
106
  kash/file_storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
106
- kash/file_storage/file_store.py,sha256=7KUOtEKuwSyz8uP61I8hcgB5TC8yd9oSeU9wzt_dLo4,30093
107
+ kash/file_storage/file_store.py,sha256=_OxcExZOQ-ef9Sm2sdD28BSMcQ64KsSikq3CJPUKYUU,30886
107
108
  kash/file_storage/item_file_format.py,sha256=_o2CjWstk_Z__qMr-Inct9wJm2VEUK0GZvF-fDZ8bcc,5377
108
109
  kash/file_storage/metadata_dirs.py,sha256=9AqO3S3SSY1dtvP2iLX--E4ui0VIzXttG8R040otfyg,3820
109
110
  kash/file_storage/persisted_yaml.py,sha256=4-4RkFqdlBUkTOwkdA4vRKUywEE9TaDo13OGaDUyU9M,1309
110
111
  kash/file_storage/store_cache_warmer.py,sha256=cQ_KwxkBPWT3lMmYOCTkXgo7CKaGINns2YzIH32ExSU,1013
111
- kash/file_storage/store_filenames.py,sha256=RmuZ3hHuo95bV9Jv5qtUqN8NdJU8qI_7SYqgc5B5UL4,1720
112
+ kash/file_storage/store_filenames.py,sha256=zvmVQxQy8QOHkUeh-6iFKlBSk0GzqUt9xmmqkh45Zdo,1909
112
113
  kash/help/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
113
114
  kash/help/assistant.py,sha256=R0XHNi-h51QoQ7rGouD2chrDPGomYaPQUqJdvpjlCs8,11535
114
115
  kash/help/assistant_instructions.py,sha256=jW5XAsmLx8YZMKSDJgWnqo9Vwe7VuiTURQHjKBqr_L8,2549
115
116
  kash/help/assistant_output.py,sha256=9sM-OVLc6eMSOkxyovB88dNlsknFpf8Wz89Zp5PuEA8,1668
116
- kash/help/docstring_utils.py,sha256=80vcEGR05G1wwIfzaKhX5QzU38mkKna-gN6_wTNHjXg,3208
117
- kash/help/function_param_info.py,sha256=IVi6dtRjAWUCxpy9rZ1fRqKLCciK_kuMybTwCZ9XiYg,1692
117
+ kash/help/function_param_info.py,sha256=yGuFLVZoDF1E1YsXqGwJhuY2uJB3R1B1EC77MEMSc-U,1700
118
118
  kash/help/help_embeddings.py,sha256=le7yqxGOtzIU_LUkl-Ef-7WQGuWa0wAOx9umZGva8zg,2787
119
119
  kash/help/help_lookups.py,sha256=0dtuLWEXncqhJCijC98IA9stBDNNcJewt1JYqMLkTx4,2029
120
- kash/help/help_pages.py,sha256=XyV3SN1cvGjpS8xAbZ_X_6Z9hTIH7vXdgK8DCX2cwNg,3886
121
- kash/help/help_printing.py,sha256=NAJa8qfaZGce5NKtUqdyDE8Ey0ag2ywjL2LP8ACT060,6078
120
+ kash/help/help_pages.py,sha256=TaKsE26R-pZTrK4Pa593DK5osdJodFHaVm5pZpjqgaI,3894
121
+ kash/help/help_printing.py,sha256=eZbZdyJC158JiXcEk2zvUmqYbYzbYOpHvxEhC1kIN-Q,6086
122
122
  kash/help/help_types.py,sha256=xo0AXfaNjlMrWp6dkGixo6P61n1tIhFhlvv9sWhNBrI,7909
123
123
  kash/help/recommended_commands.py,sha256=jqc3TjWFBqDJ-iSzXn8vTOplb4uHndwvdAGJfcUV_qs,2486
124
124
  kash/help/tldr_help.py,sha256=bcu__MIF4vYlZEeqQqieGIBcRhNCTK5u8jPV08ObzCI,9654
@@ -129,10 +129,10 @@ kash/llm_utils/fuzzy_parsing.py,sha256=bbG2Y7i5w6kxAVPAixyluv3MDS2hW_pkhnJpVOLHZ
129
129
  kash/llm_utils/init_litellm.py,sha256=5Fn9uW4P7lfEO8Rk1EJJUzDEGNjw-PDvxFgHlKDf-Ok,409
130
130
  kash/llm_utils/llm_api_keys.py,sha256=nTB9wSFfHTOXvqshSQCQGCPxUwOW1U7oslngya8nHkw,1168
131
131
  kash/llm_utils/llm_completion.py,sha256=qhDYRjiknAFrDm31atD8b22Rs_XwZELTft3eoiGgFp8,5442
132
- kash/llm_utils/llm_features.py,sha256=NXZ3nvwcsVe0RLj3TtlK9gUu-UWoxdCU6Uw2X2IChrk,1773
132
+ kash/llm_utils/llm_features.py,sha256=tgcz8qQByZ80noybXS2144K9eCw1iOFxPYkCK2kJJOw,1861
133
133
  kash/llm_utils/llm_messages.py,sha256=70QwIIvdwo-h4Jfn_6MbEHb3LTUjUmzg_v_dU_Ey__g,1174
134
134
  kash/llm_utils/llm_names.py,sha256=VZbdKnoeBx_luB5YQ-Rz37gMt3_FcueJdp40ZaQbpUA,3620
135
- kash/llm_utils/llms.py,sha256=Zz45v7qrmBNGnmyF-Mn5Q4F1dZGFT2xf_kmWGUMSUUw,3518
135
+ kash/llm_utils/llms.py,sha256=Dhwb3DIk9xoSGxFJAegIwD7xq32-Gfw83yPniIFNt84,4036
136
136
  kash/local_server/__init__.py,sha256=AyNpvCOJlQF6A4DnlYKRMbbfRNzdizEA-ytp-F2SLZU,162
137
137
  kash/local_server/local_server.py,sha256=EugjL30VM0pWdZDsiQxU-o6EdEa082qlGd_7RHvI5tk,5863
138
138
  kash/local_server/local_server_commands.py,sha256=ZMp1DpYgg-MJ0iqH0DHfhWKDpFqNRG_txkRdODIr9mU,1661
@@ -149,14 +149,14 @@ kash/mcp/mcp_server_sse.py,sha256=_D61cRWMuxgMrk-KxhkRLaaXXpgzJJa0sOB3uRxR0XM,58
149
149
  kash/mcp/mcp_server_stdio.py,sha256=u-oeIZKwzIAGlKmBpipC-hfNQKx36Md9hST11y3AZUY,1174
150
150
  kash/media_base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
151
151
  kash/media_base/audio_processing.py,sha256=k8V3SpQrSzdxHiInei4z6LycoAnfpQ2dttOfWhWLTX8,2874
152
- kash/media_base/media_cache.py,sha256=Exf3BoFmze9Kn4EuGZ0RYB8FeYB1beg_EAxoJfMjWK0,7551
153
- kash/media_base/media_services.py,sha256=7H7Y-WDjvZCidoLCsWi01xfuJoP7uiUklviwN_78crE,3406
152
+ kash/media_base/media_cache.py,sha256=wNguo9nNnCRmr7GERrzDOj83xCYife7EnVvC2tlNtrg,8580
153
+ kash/media_base/media_services.py,sha256=kmAjLIrG62twI8GCowSeR1yfpVWf1KfAhPbuxPiaQAA,5475
154
154
  kash/media_base/media_tools.py,sha256=enzSebW41vDBGWUwkEn5udhRHmSBvH01MAt5rY1s388,1466
155
155
  kash/media_base/timestamp_citations.py,sha256=IHTvlZD3lIfe8T2uHFitgom82WahdHBeKqyc2OjUi9g,2368
156
156
  kash/media_base/transcription_deepgram.py,sha256=yuwqgTPY-d7XnLMTuNDX0PLBxazqOy8osDXEscNOrGo,5308
157
157
  kash/media_base/transcription_format.py,sha256=rOVPTpwvW22c27BRwYF-Tc_xzqK_wOtUZpOPlvkHiDY,2344
158
158
  kash/media_base/transcription_whisper.py,sha256=GqvroW9kBAH4-gcbYkMgNCfs2MpMIgm1ip3NMWtJ0IE,1169
159
- kash/media_base/services/local_file_media.py,sha256=-A-tK6XP7XDCqXQIAoohesFZ3OIvpXWsDoktYBvBuNA,5399
159
+ kash/media_base/services/local_file_media.py,sha256=_NV-T90rShJ8ucUjQXMPCKKJ50GSFE9PyyVzhXp5z9w,5624
160
160
  kash/model/__init__.py,sha256=kFfBKb5N70NWYUfpRRxn_Sb9p_vXlB6BBaTCqWmSReo,2978
161
161
  kash/model/actions_model.py,sha256=iEp8QSB7My5xT4lurv03vXG6COD8aTLpgiSh5GT7Cr4,22088
162
162
  kash/model/assistant_response_model.py,sha256=6eDfC27nyuBDFjv5nCYMa_Qb2mPbKwDzZy7uLOIyskI,2653
@@ -164,12 +164,12 @@ kash/model/compound_actions_model.py,sha256=HiDK5wwCu3WwZYHATZoLEguiqwR9V6V296wi
164
164
  kash/model/concept_model.py,sha256=we2qOcy9Mv1q7XPfkDLp_CyO_-8DwAUfUYlpgy_jrFs,1011
165
165
  kash/model/exec_model.py,sha256=IlfvtQyoFRRWhWju7vdXp9J-w_NGcGtL5DhDLy9gRd8,2250
166
166
  kash/model/graph_model.py,sha256=jnctrPiBZ0xwAR8D54JMAJPanA1yZdaxSFQoIpe8anA,2662
167
- kash/model/items_model.py,sha256=oH6qsexLTrjYwE_wS_pLalYRV8bX1avHXha4klBK8UI,35237
167
+ kash/model/items_model.py,sha256=ZWAsqTHA4p6GSNz3QjPr46LRwY7pbv7d73_KqU3gsO0,35686
168
168
  kash/model/language_list.py,sha256=I3RIbxTseVmPdhExQimimEv18Gmy2ImMbpXe0-_t1Qw,450
169
169
  kash/model/llm_actions_model.py,sha256=a29uXVNfS2CiqvM7HPdC6H9A23rSQQihAideuBLMH8g,2110
170
- kash/model/media_model.py,sha256=64Zic4cRjQpgf_-tOuZlZZe59mz_qu0s6OQSU0YlDUI,3357
170
+ kash/model/media_model.py,sha256=ZnlZ-FkswbAIGpUAuNqLce1WDZK-WbnwHn2ipg8x7-0,3511
171
171
  kash/model/operations_model.py,sha256=WmU-xeWGsqMLVN369dQEyVGU8T7G_KyLLsj6YFc5sVw,6517
172
- kash/model/params_model.py,sha256=qGhsGvtDQoSqWkrKk9QZZfEh-jO1q2V-s-p6X-F37_M,14939
172
+ kash/model/params_model.py,sha256=s2pyM4AcWdis3CAQGEFI97EA-NjG5UxTJgeyuHLXp88,15084
173
173
  kash/model/paths_model.py,sha256=KDFm7wan7hjObHbnV2rR8-jsyLTVqbKcwFdKeLFRtdM,15889
174
174
  kash/model/preconditions_model.py,sha256=-IfsVR0NkQhq_3hUTXzK2bFYAd--3YjSwUiDKHVQQqk,2887
175
175
  kash/shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -201,22 +201,25 @@ kash/utils/__init__.py,sha256=4Jl_AtgRADdGORimWhYZwbSfQSpQ6SiexNIZzmbcngI,111
201
201
  kash/utils/errors.py,sha256=2lPL0fxI8pPOiDvjl0j-rvwY8uhmWetsrYYIc2-x1WY,3906
202
202
  kash/utils/common/__init__.py,sha256=ggeWw1xmbl1mgCQD3c4CNN2h5WXFCsN2wXlCWurEUEI,161
203
203
  kash/utils/common/format_utils.py,sha256=83FhAwbMnOQIFudpnOGMuCqCiyoAlWGS6cc8q6xgZus,2072
204
- kash/utils/common/function_inspect.py,sha256=gJ7jzd14hpuhJW18kxj6MgC2Q60nhYccQK78tq_hf_M,14085
204
+ kash/utils/common/function_inspect.py,sha256=gczPhFlrF4NotkJKw8rDcl1DFlWfHdur_J47-9bS0GE,17216
205
205
  kash/utils/common/import_utils.py,sha256=zyCa5sG_vTxzgIgjOS98xAwqkSeCQzN-8UkM6k9ZZOI,4615
206
206
  kash/utils/common/lazyobject.py,sha256=9dmOfSheblOXgo2RRakMwgfPIKdTgtyrlm6dCKAze04,5157
207
207
  kash/utils/common/obj_replace.py,sha256=AuiXptUOnuDNcWDgAJ3jEHkLh89XIqCP_SOkgaVyFIQ,2075
208
+ kash/utils/common/parse_docstring.py,sha256=oM1ecGGySRA3L_poddjReJ_qPY5506Le7E8_CDUrU8k,10922
208
209
  kash/utils/common/parse_key_vals.py,sha256=yZRZIa5GD9SlnBSn2YNZm8PRVKoSJMY8DCmdGujQj_I,2418
209
210
  kash/utils/common/parse_shell_args.py,sha256=UZXTZDbV5m5Jy39jdAQ6W8uilr1TNa0__RqnE8UmQ_M,10604
210
211
  kash/utils/common/stack_traces.py,sha256=a2NwlK_0xxnjMCDC4LrQu7ueFylF-OImFG3bAAHpPwY,1392
211
212
  kash/utils/common/task_stack.py,sha256=XkeBz3BwYY1HxxTqd3f7CulV0s61PePAKw1Irrtvf5o,4536
213
+ kash/utils/common/testing.py,sha256=WHsXpHxgl5DTIu5OnlPGh71DbSiNJcFy8OoCCHFD3tM,1618
212
214
  kash/utils/common/type_utils.py,sha256=SJirXhPilQom_-OKkFToDLm_82ZwpjcNjRy8U1HaQ0Q,3829
213
215
  kash/utils/common/uniquifier.py,sha256=75OY4KIVF8u1eoO0FCPbEGTyVpPOtM-0ctoG_s_jahM,3082
214
216
  kash/utils/common/url.py,sha256=R_P-CkOUiFxVdo9COcaL7YFvFIoAULj5-XxvmlFLvzo,9416
217
+ kash/utils/common/url_slice.py,sha256=QJb_qJp-hd5lFrxpw7P009yeMTJWDMfF11KRKEo7mIA,10963
215
218
  kash/utils/file_formats/chat_format.py,sha256=Onby7Zany1UQSUo_JzLs6MIfmoXViZeOAacRTMVe92M,11818
216
219
  kash/utils/file_utils/__init__.py,sha256=loL_iW0oOZs0mJ5GelBPptBcqzYKSWdsGcHrpRyxitQ,43
217
220
  kash/utils/file_utils/dir_info.py,sha256=HamMr58k_DanTLifj7A2JDxTGWXEZZx2pQuE6Hjcm8g,1856
218
221
  kash/utils/file_utils/file_ext.py,sha256=-H63vlrVI3pfE2Cn_9qF7-QLDaUIu_njc4TieNgAHSY,1860
219
- kash/utils/file_utils/file_formats.py,sha256=vnihRFLl85G1uzpqDc_uiGH9SIvbFTYVszz3srdSSz0,4949
222
+ kash/utils/file_utils/file_formats.py,sha256=fANAe5Dq5y_Vw_LaWvvy9hH6rXqaW7u-7Z2sbQhgeE4,4942
220
223
  kash/utils/file_utils/file_formats_model.py,sha256=KA697MPW-V0Xw82eeNATW1UrnUMnzldFKA1XWM3Obq0,15628
221
224
  kash/utils/file_utils/file_sort_filter.py,sha256=_k1chT3dJl5lSmKA2PW90KaoG4k4zftGdtwWoNEljP4,7136
222
225
  kash/utils/file_utils/file_walk.py,sha256=cpwVDPuaVm95_ZwFJiAdIuZAGhASI3gJ3ZUsCGP75b8,5527
@@ -234,7 +237,7 @@ kash/utils/rich_custom/rich_markdown_fork.py,sha256=M_JRaSAyHrSg-wuLv9C9P7SkehSi
234
237
  kash/utils/text_handling/doc_normalization.py,sha256=C211eSof8PUDVCqQtShuC4AMJpTZeBK8GHlGATp3c9E,2976
235
238
  kash/utils/text_handling/escape_html_tags.py,sha256=7ZNQw3wfGzATVBBKmJMWmBTuznEPGzS6utjrH9HmmlQ,6361
236
239
  kash/utils/text_handling/markdown_render.py,sha256=Ea-QiBND0kp4Dc9rYr8Z3dB_CRpAxneGHBOlTDWsDo0,3751
237
- kash/utils/text_handling/markdown_utils.py,sha256=ndEd5ai80ZjSeMR104KLmAj0LOCPZln0ntd9tP5mf-E,9783
240
+ kash/utils/text_handling/markdown_utils.py,sha256=kB_zqqwBX7AHfxWqPsTCD2xpvW49z47Vs-Jet107woc,25561
238
241
  kash/utils/text_handling/markdownify_utils.py,sha256=xNMlBX36BJ5VK5kxY2Ofo-Q84R2kBSM91u1grkQ-5As,2925
239
242
  kash/utils/text_handling/unified_diffs.py,sha256=JfHSakISkT_GuBPBI4fTooHrp2aenWzDKiVvDewVfMk,2655
240
243
  kash/web_content/canon_url.py,sha256=Zv2q7xQdIHBFkxxwyJn3_ME-qqMFRi_fKxE_IgV2Z50,742
@@ -242,22 +245,26 @@ kash/web_content/dir_store.py,sha256=BJc-s-RL5CC-GwhFTC_lhLXSMWluPPnLVmVBx-66DiM
242
245
  kash/web_content/file_cache_utils.py,sha256=JRXUCAmrc83iAgdiICU2EYGWcoORflWNl6GAVq-O80I,5529
243
246
  kash/web_content/file_processing.py,sha256=cQC-MnJMM5qG9-y0S4yobkmRi6A75qhHjV6xTwbtYDY,1904
244
247
  kash/web_content/local_file_cache.py,sha256=PEDKU5VIwhCnSC-HXG4EkO2OzrOUDuuDBMuo3lP2EN0,9466
245
- kash/web_content/web_extract.py,sha256=LbuG4AFEeIiXyUrN9CAxX0ret41Fqu_iTJSjIWyk3Bg,2296
248
+ kash/web_content/web_extract.py,sha256=FLn4LPAQHe79kx9LhSbGNnvoDM59X-AqeyBMkyLdyZo,2847
246
249
  kash/web_content/web_extract_justext.py,sha256=74HLJBKDGKatwxyRDX6za70bZG9LrVmtj9jLX7UJzg4,2540
247
250
  kash/web_content/web_extract_readabilipy.py,sha256=IT7ET5IoU2-Nf37-Neh6CkKMvLL3WTNVJjq7ZMOx6OM,808
248
251
  kash/web_content/web_fetch.py,sha256=J8DLFP1vzp7aScanFq0Bd7xCP6AVL4JgMMBqyRPtZjQ,4720
249
- kash/web_content/web_page_model.py,sha256=9bPuqZxXo6hSUB_llEcz8bs3W1lW0r-Y3Q7pZgknlQU,693
252
+ kash/web_content/web_page_model.py,sha256=aPpgC1fH2z2LTzGJhEDvZgq_mYwgsQIZaDS3UE7v98w,1147
250
253
  kash/web_gen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
251
254
  kash/web_gen/simple_webpage.py,sha256=ks_0ljxCeS2-gAAEaUc1JEnzY3JY0nzqGFiyyqyRuZs,1537
252
255
  kash/web_gen/tabbed_webpage.py,sha256=DiZV48TVvcjOf31g3nzTAtGKpH5Cek1Unksr7Cwcwog,4949
253
256
  kash/web_gen/template_render.py,sha256=aypo6UanouftV4RpxgNm6JdquelI52fV0IlihdA3yjE,1908
254
- kash/web_gen/templates/base_styles.css.jinja,sha256=_lSVO7VxY2abKUh230lrzmxMitg6mw1iRV653tlcsvY,11712
255
- kash/web_gen/templates/base_webpage.html.jinja,sha256=V3Xl8swCHjS9Ea6Fb8jch6uu9Ws7vG82TK_qz5Jps4Q,12935
256
- kash/web_gen/templates/content_styles.css.jinja,sha256=3qcIwIt3DipCDJa9z6oIM_BMxmwoT7E_loTK0F3L9Vo,3629
257
+ kash/web_gen/templates/base_styles.css.jinja,sha256=2ZaH08oJ_MWLX_DHuymZ798XulHd5mNSAMJbGSvhZmc,14835
258
+ kash/web_gen/templates/base_webpage.html.jinja,sha256=gwxXMSC_eY-stu8uT5AVyQJ-Ppy2GyWwq9vEdTEbVi0,12887
259
+ kash/web_gen/templates/content_styles.css.jinja,sha256=qwMKnjDRdjXxNfUgSrZEAkliHSLZ9OMsWGulonp-1Zs,3764
257
260
  kash/web_gen/templates/explain_view.html.jinja,sha256=DNw5Iw5SrhIUFRGB4qNvfcKXsBHVbEJVURGdhvyC75Q,949
258
261
  kash/web_gen/templates/item_view.html.jinja,sha256=cYGyGKFcX8-5L2SM7-BC5oK6GLuH6blrzcxw2DxX-Q8,6828
259
- kash/web_gen/templates/simple_webpage.html.jinja,sha256=R70mqQWXsJAQ1SGNw26dmMCDcaSOE49TBAkeZNUE2HY,15525
262
+ kash/web_gen/templates/simple_webpage.html.jinja,sha256=I5O_z3BLo0p1HTghK2S1kUJBtvY-nSAIbJiapUns408,2576
260
263
  kash/web_gen/templates/tabbed_webpage.html.jinja,sha256=umkipUXW-lDGnbV-tlDroCfCx_385PFnpbzsvwmityo,1843
264
+ kash/web_gen/templates/components/toc_scripts.js.jinja,sha256=9AanLJaVormGi52h-k2tKJTRT4BiBGGNnw3Kmrnr40Q,10481
265
+ kash/web_gen/templates/components/toc_styles.css.jinja,sha256=kco8clYjO2Z-WYC8JIiYl04vIHsD4JR4aTUSNTMNA7o,6991
266
+ kash/web_gen/templates/components/tooltip_scripts.js.jinja,sha256=WikUcizjWOpsr6rPkF3BNy4pZzGmeWRGPNP8jGp5soE,26704
267
+ kash/web_gen/templates/components/tooltip_styles.css.jinja,sha256=Ln1kBcwFts94eZzH2b9mIV4Ir2vZ15dOJL7LP9UGNyo,13667
261
268
  kash/workspaces/__init__.py,sha256=q1gFERRZLJMA9-XSUKvB1ulauHDKqyzzc86GFLbxAuk,700
262
269
  kash/workspaces/param_state.py,sha256=vT_eGWqg2SRviIM5jqEAauznX2B5Xt2nHHu2oRxTcIU,746
263
270
  kash/workspaces/selections.py,sha256=rEUuQlrQ3C_54bzBSKDTTptgX8oZPqN0Ao4uaXSWA-Q,12003
@@ -265,7 +272,7 @@ kash/workspaces/source_items.py,sha256=Pwnw3OhjR2IJEMEeHf6hpKloj-ellM5vsY7LgkGev
265
272
  kash/workspaces/workspace_dirs.py,sha256=kjuY4t7mSSXq00fZmln7p9TWq4kAZoPTCDM0DG7uEaI,1545
266
273
  kash/workspaces/workspace_output.py,sha256=MMg_KumkHKFGc0DOUFaW5ImpgqIfdlsLtvXbLEt1hwI,5692
267
274
  kash/workspaces/workspace_registry.py,sha256=SQt2DZgBEu95Zj9fpy67XdJPgJyKFDCU2laSuiZswNo,2200
268
- kash/workspaces/workspaces.py,sha256=kQyS3F57Y9A9xVT_Ss7HzJhDGlI-UXHKvRDnEVkBnik,6764
275
+ kash/workspaces/workspaces.py,sha256=ypxlX2K64QOhNsta69arlvKbiVpUW_4CDeX_sEcIQbg,6907
269
276
  kash/xonsh_custom/command_nl_utils.py,sha256=6Xcx98HXL5HywziHi0XskwFx6kfvz7oCmMX-siJib1A,3392
270
277
  kash/xonsh_custom/custom_shell.py,sha256=jydWwHR0-RslioaHHY1sHnM6H6fG3cwOw1XO__sG_b0,19026
271
278
  kash/xonsh_custom/customize_prompt.py,sha256=u-jRY-ftXYflBkbJVetEg6GYelPUvqZEpjrPRUTfy8w,6896
@@ -279,8 +286,8 @@ kash/xonsh_custom/xonsh_modern_tools.py,sha256=mj_b34LZXfE8MJe9EpDmp5JZ0tDM1biYN
279
286
  kash/xonsh_custom/xonsh_ranking_completer.py,sha256=ZRGiAfoEgqgnlq2-ReUVEaX5oOgW1DQ9WxIv2OJLuTo,5620
280
287
  kash/xontrib/fnm.py,sha256=V2tsOdmIDgbFbZSfMLpsvDIwwJJqiYnOkOySD1cXNXw,3700
281
288
  kash/xontrib/kash_extension.py,sha256=FLIMlgR3C_6A1fwKE-Ul0nmmpJSszVPbAriinUyQ8Zg,1896
282
- kash_shell-0.3.17.dist-info/METADATA,sha256=Y6Ye4cgPa3d7YZ3sxJecXNxuN176GgkMz3Q5EIZMYsw,31258
283
- kash_shell-0.3.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
284
- kash_shell-0.3.17.dist-info/entry_points.txt,sha256=SQraWDAo8SqYpthLXThei0mf_hGGyhYBUO-Er_0HcwI,85
285
- kash_shell-0.3.17.dist-info/licenses/LICENSE,sha256=rCh2PsfYeiU6FK_0wb58kHGm_Fj5c43fdcHEexiVzIo,34562
286
- kash_shell-0.3.17.dist-info/RECORD,,
289
+ kash_shell-0.3.20.dist-info/METADATA,sha256=aImcO_J_PXzx57HrdQOq66nSLoqCp5oBg6__ZzSwN8k,32586
290
+ kash_shell-0.3.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
291
+ kash_shell-0.3.20.dist-info/entry_points.txt,sha256=SQraWDAo8SqYpthLXThei0mf_hGGyhYBUO-Er_0HcwI,85
292
+ kash_shell-0.3.20.dist-info/licenses/LICENSE,sha256=rCh2PsfYeiU6FK_0wb58kHGm_Fj5c43fdcHEexiVzIo,34562
293
+ kash_shell-0.3.20.dist-info/RECORD,,
@@ -1,72 +0,0 @@
1
- from kash.config.logger import get_logger
2
- from kash.exec.preconditions import is_url_resource
3
- from kash.media_base.media_services import get_media_metadata
4
- from kash.model.items_model import Item, ItemType
5
- from kash.model.paths_model import StorePath
6
- from kash.utils.common.format_utils import fmt_loc
7
- from kash.utils.common.url import Url, is_url
8
- from kash.utils.errors import InvalidInput
9
-
10
- log = get_logger(__name__)
11
-
12
-
13
- def fetch_url_metadata(locator: Url | StorePath, refetch: bool = False) -> Item:
14
- from kash.workspaces import current_ws
15
-
16
- ws = current_ws()
17
- if is_url(locator):
18
- # Import or find URL as a resource in the current workspace.
19
- store_path = ws.import_item(locator, as_type=ItemType.resource)
20
- item = ws.load(store_path)
21
- elif isinstance(locator, StorePath):
22
- item = ws.load(locator)
23
- if not is_url_resource(item):
24
- raise InvalidInput(f"Not a URL resource: {fmt_loc(locator)}")
25
- else:
26
- raise InvalidInput(f"Not a URL or URL resource: {fmt_loc(locator)}")
27
-
28
- return fetch_url_item_metadata(item, refetch=refetch)
29
-
30
-
31
- def fetch_url_item_metadata(item: Item, refetch: bool = False) -> Item:
32
- """
33
- Fetch metadata for a URL using a media service if we recognize the URL,
34
- and otherwise fetching and extracting it from the web page HTML.
35
- """
36
- from kash.web_content.canon_url import canonicalize_url
37
- from kash.web_content.web_extract import fetch_extract
38
- from kash.workspaces import current_ws
39
-
40
- ws = current_ws()
41
- if not refetch and item.title and item.description:
42
- log.message(
43
- "Already have title and description, will not fetch metadata: %s", item.fmt_loc()
44
- )
45
- return item
46
-
47
- if not item.url:
48
- raise InvalidInput(f"No URL for item: {item.fmt_loc()}")
49
-
50
- url = canonicalize_url(item.url)
51
- log.message("No metadata for URL, will fetch: %s", url)
52
-
53
- # Prefer fetching metadata from media using the media service if possible.
54
- # Data is cleaner and YouTube for example often blocks regular scraping.
55
- media_metadata = get_media_metadata(url)
56
- if media_metadata:
57
- fetched_item = Item.from_media_metadata(media_metadata)
58
- fetched_item = item.merged_copy(fetched_item)
59
- else:
60
- page_data = fetch_extract(url, refetch=refetch)
61
- fetched_item = item.new_copy_with(
62
- title=page_data.title or item.title,
63
- description=page_data.description or item.description,
64
- thumbnail_url=page_data.thumbnail_url or item.thumbnail_url,
65
- )
66
-
67
- if not fetched_item.title:
68
- log.warning("Failed to fetch page data: title is missing: %s", item.url)
69
-
70
- ws.save(fetched_item)
71
-
72
- return fetched_item