kimi-cli 0.46__py3-none-any.whl → 0.47__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.
Potentially problematic release.
This version of kimi-cli might be problematic. Click here for more details.
- kimi_cli/CHANGELOG.md +7 -0
- kimi_cli/soul/agent.py +6 -1
- kimi_cli/tools/__init__.py +6 -0
- kimi_cli/tools/web/search.py +6 -8
- kimi_cli/ui/shell/prompt.py +28 -16
- kimi_cli/utils/clipboard.py +10 -0
- {kimi_cli-0.46.dist-info → kimi_cli-0.47.dist-info}/METADATA +2 -2
- {kimi_cli-0.46.dist-info → kimi_cli-0.47.dist-info}/RECORD +10 -9
- {kimi_cli-0.46.dist-info → kimi_cli-0.47.dist-info}/WHEEL +0 -0
- {kimi_cli-0.46.dist-info → kimi_cli-0.47.dist-info}/entry_points.txt +0 -0
kimi_cli/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,13 @@ Internal builds may append content to the Unreleased section.
|
|
|
9
9
|
Only write entries that are worth mentioning to users.
|
|
10
10
|
-->
|
|
11
11
|
|
|
12
|
+
## [0.47] - 2025-11-05
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Fix Ctrl-W not working in some environments
|
|
17
|
+
- Do not load SearchWeb tool when the search service is not configured
|
|
18
|
+
|
|
12
19
|
## [0.46] - 2025-11-03
|
|
13
20
|
|
|
14
21
|
### Added
|
kimi_cli/soul/agent.py
CHANGED
|
@@ -13,6 +13,7 @@ from kimi_cli.soul.approval import Approval
|
|
|
13
13
|
from kimi_cli.soul.denwarenji import DenwaRenji
|
|
14
14
|
from kimi_cli.soul.runtime import BuiltinSystemPromptArgs, Runtime
|
|
15
15
|
from kimi_cli.soul.toolset import CustomToolset
|
|
16
|
+
from kimi_cli.tools import SkipThisTool
|
|
16
17
|
from kimi_cli.utils.logging import logger
|
|
17
18
|
|
|
18
19
|
|
|
@@ -99,7 +100,11 @@ def _load_tools(
|
|
|
99
100
|
) -> list[str]:
|
|
100
101
|
bad_tools: list[str] = []
|
|
101
102
|
for tool_path in tool_paths:
|
|
102
|
-
|
|
103
|
+
try:
|
|
104
|
+
tool = _load_tool(tool_path, dependencies)
|
|
105
|
+
except SkipThisTool:
|
|
106
|
+
logger.info("Skipping tool: {tool_path}", tool_path=tool_path)
|
|
107
|
+
continue
|
|
103
108
|
if tool:
|
|
104
109
|
toolset += tool
|
|
105
110
|
else:
|
kimi_cli/tools/__init__.py
CHANGED
|
@@ -8,6 +8,12 @@ from kosong.utils.typing import JsonType
|
|
|
8
8
|
from kimi_cli.utils.string import shorten_middle
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
class SkipThisTool(Exception):
|
|
12
|
+
"""Raised when a tool decides to skip itself from the loading process."""
|
|
13
|
+
|
|
14
|
+
pass
|
|
15
|
+
|
|
16
|
+
|
|
11
17
|
def extract_subtitle(lexer: streamingjson.Lexer, tool_name: str) -> str | None:
|
|
12
18
|
try:
|
|
13
19
|
curr_args: JsonType = json.loads(lexer.complete_json())
|
kimi_cli/tools/web/search.py
CHANGED
|
@@ -7,6 +7,7 @@ from pydantic import BaseModel, Field, ValidationError
|
|
|
7
7
|
from kimi_cli.config import Config
|
|
8
8
|
from kimi_cli.constant import USER_AGENT
|
|
9
9
|
from kimi_cli.soul.toolset import get_current_tool_call_or_none
|
|
10
|
+
from kimi_cli.tools import SkipThisTool
|
|
10
11
|
from kimi_cli.tools.utils import ToolResultBuilder, load_desc
|
|
11
12
|
from kimi_cli.utils.aiohttp import new_client_session
|
|
12
13
|
|
|
@@ -41,14 +42,11 @@ class SearchWeb(CallableTool2[Params]):
|
|
|
41
42
|
|
|
42
43
|
def __init__(self, config: Config, **kwargs: Any):
|
|
43
44
|
super().__init__(**kwargs)
|
|
44
|
-
if config.services.moonshot_search is
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
self._base_url = ""
|
|
50
|
-
self._api_key = ""
|
|
51
|
-
self._custom_headers = {}
|
|
45
|
+
if config.services.moonshot_search is None:
|
|
46
|
+
raise SkipThisTool()
|
|
47
|
+
self._base_url = config.services.moonshot_search.base_url
|
|
48
|
+
self._api_key = config.services.moonshot_search.api_key.get_secret_value()
|
|
49
|
+
self._custom_headers = config.services.moonshot_search.custom_headers or {}
|
|
52
50
|
|
|
53
51
|
@override
|
|
54
52
|
async def __call__(self, params: Params) -> ToolReturnType:
|
kimi_cli/ui/shell/prompt.py
CHANGED
|
@@ -39,6 +39,7 @@ from pydantic import BaseModel, ValidationError
|
|
|
39
39
|
from kimi_cli.share import get_share_dir
|
|
40
40
|
from kimi_cli.soul import StatusSnapshot
|
|
41
41
|
from kimi_cli.ui.shell.metacmd import get_meta_commands
|
|
42
|
+
from kimi_cli.utils.clipboard import is_clipboard_available
|
|
42
43
|
from kimi_cli.utils.logging import logger
|
|
43
44
|
from kimi_cli.utils.string import random_string
|
|
44
45
|
|
|
@@ -426,6 +427,7 @@ class CustomPromptSession:
|
|
|
426
427
|
|
|
427
428
|
# Build key bindings
|
|
428
429
|
_kb = KeyBindings()
|
|
430
|
+
shortcut_hints: list[str] = []
|
|
429
431
|
|
|
430
432
|
@_kb.add("enter", filter=has_completions)
|
|
431
433
|
def _accept_completion(event: KeyPressEvent) -> None:
|
|
@@ -438,12 +440,6 @@ class CustomPromptSession:
|
|
|
438
440
|
completion = buff.complete_state.completions[0]
|
|
439
441
|
buff.apply_completion(completion)
|
|
440
442
|
|
|
441
|
-
@_kb.add("escape", "enter", eager=True)
|
|
442
|
-
@_kb.add("c-j", eager=True)
|
|
443
|
-
def _insert_newline(event: KeyPressEvent) -> None:
|
|
444
|
-
"""Insert a newline when Alt-Enter or Ctrl-J is pressed."""
|
|
445
|
-
event.current_buffer.insert_text("\n")
|
|
446
|
-
|
|
447
443
|
@_kb.add("c-x", eager=True)
|
|
448
444
|
def _switch_mode(event: KeyPressEvent) -> None:
|
|
449
445
|
self._mode = self._mode.toggle()
|
|
@@ -452,20 +448,38 @@ class CustomPromptSession:
|
|
|
452
448
|
# Redraw UI
|
|
453
449
|
event.app.invalidate()
|
|
454
450
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
451
|
+
shortcut_hints.append("ctrl-x: switch mode")
|
|
452
|
+
|
|
453
|
+
@_kb.add("escape", "enter", eager=True)
|
|
454
|
+
@_kb.add("c-j", eager=True)
|
|
455
|
+
def _insert_newline(event: KeyPressEvent) -> None:
|
|
456
|
+
"""Insert a newline when Alt-Enter or Ctrl-J is pressed."""
|
|
457
|
+
event.current_buffer.insert_text("\n")
|
|
458
|
+
|
|
459
|
+
shortcut_hints.append("ctrl-j: newline")
|
|
460
|
+
|
|
461
|
+
if is_clipboard_available():
|
|
462
|
+
|
|
463
|
+
@_kb.add("c-v", eager=True)
|
|
464
|
+
def _paste(event: KeyPressEvent) -> None:
|
|
465
|
+
if self._try_paste_image(event):
|
|
466
|
+
return
|
|
467
|
+
clipboard_data = event.app.clipboard.get_data()
|
|
468
|
+
event.current_buffer.paste_clipboard_data(clipboard_data)
|
|
469
|
+
|
|
470
|
+
shortcut_hints.append("ctrl-v: paste")
|
|
471
|
+
clipboard = PyperclipClipboard()
|
|
472
|
+
else:
|
|
473
|
+
clipboard = None
|
|
461
474
|
|
|
475
|
+
self._shortcut_hints = shortcut_hints
|
|
462
476
|
self._session = PromptSession(
|
|
463
477
|
message=self._render_message,
|
|
464
478
|
# prompt_continuation=FormattedText([("fg:#4d4d4d", "... ")]),
|
|
465
479
|
completer=self._agent_mode_completer,
|
|
466
480
|
complete_while_typing=True,
|
|
467
481
|
key_bindings=_kb,
|
|
468
|
-
clipboard=
|
|
482
|
+
clipboard=clipboard,
|
|
469
483
|
history=history,
|
|
470
484
|
bottom_toolbar=self._render_bottom_toolbar,
|
|
471
485
|
)
|
|
@@ -646,9 +660,7 @@ class CustomPromptSession:
|
|
|
646
660
|
self._current_toast = None
|
|
647
661
|
else:
|
|
648
662
|
shortcuts = [
|
|
649
|
-
|
|
650
|
-
"ctrl-j: newline",
|
|
651
|
-
"ctrl-v: paste",
|
|
663
|
+
*self._shortcut_hints,
|
|
652
664
|
"ctrl-d: exit",
|
|
653
665
|
]
|
|
654
666
|
for shortcut in shortcuts:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: kimi-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.47
|
|
4
4
|
Summary: Kimi CLI is your next CLI agent.
|
|
5
|
-
Requires-Dist: agent-client-protocol==0.6.
|
|
5
|
+
Requires-Dist: agent-client-protocol==0.6.3
|
|
6
6
|
Requires-Dist: aiofiles==25.1.0
|
|
7
7
|
Requires-Dist: aiohttp==3.13.2
|
|
8
8
|
Requires-Dist: click==8.3.0
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
kimi_cli/CHANGELOG.md,sha256=
|
|
1
|
+
kimi_cli/CHANGELOG.md,sha256=d69a7bfe07c5c7b9ebc1163f5721cd4a1de734afaf435cfd1c279ef05b46ef2a,8985
|
|
2
2
|
kimi_cli/__init__.py,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
|
|
3
3
|
kimi_cli/agents/default/agent.yaml,sha256=6e5c51987ef5cfc0c4c4e34cc20b6fc975953ee219623fccae81a19155aab7b3,709
|
|
4
4
|
kimi_cli/agents/default/sub.yaml,sha256=e0c1ea34fdb04b0d6dc635709f0f130aff25d7f9fb97e238470143c8145be251,634
|
|
@@ -18,7 +18,7 @@ kimi_cli/py.typed,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991
|
|
|
18
18
|
kimi_cli/session.py,sha256=c0623b0cec8ce311f1ddc7bb47e1e452499e13f816b7c3023342499a436dcfc5,2853
|
|
19
19
|
kimi_cli/share.py,sha256=4292df7f44177419c45c772a933b5f36e2b7533f8cef9842629a438bc7856dc0,204
|
|
20
20
|
kimi_cli/soul/__init__.py,sha256=9888a937570bf8bc6e49087a0694f121957210eaa14a7efb4042eb513e136caa,5499
|
|
21
|
-
kimi_cli/soul/agent.py,sha256=
|
|
21
|
+
kimi_cli/soul/agent.py,sha256=6d44374a884b0f8e5075337188c59be8cd820f635fbb6195c5d4099a65d05206,5025
|
|
22
22
|
kimi_cli/soul/approval.py,sha256=48cd230dff81dfd70bd85f1ad2b99604d5569cf617a4c79c444f9772bbc89ce6,2552
|
|
23
23
|
kimi_cli/soul/compaction.py,sha256=dab17979060fceeed4a7a344373833022dc7abac04282364f2a1b20e6edd4581,3558
|
|
24
24
|
kimi_cli/soul/context.py,sha256=541759a65f8f87a3424a6da160ffb2043046e6f6b714124d94d82a77635df9bc,5855
|
|
@@ -27,7 +27,7 @@ kimi_cli/soul/kimisoul.py,sha256=68c65fe0f97700832a42018ae00892d38dc79f147592650
|
|
|
27
27
|
kimi_cli/soul/message.py,sha256=7a52a6d4d63ef1a3621d93d5ff86887baa7e67019bf2e9a08c374fc130b8d152,2541
|
|
28
28
|
kimi_cli/soul/runtime.py,sha256=9421a3ce6882587a95ecdf77b3d75f3b7ecab55cf68dc57e3e563b93e5a02e46,2690
|
|
29
29
|
kimi_cli/soul/toolset.py,sha256=34d3cb269cb28f2ca1a2323d984625e2ee822d124789a5fcf63651bddf2102fe,777
|
|
30
|
-
kimi_cli/tools/__init__.py,sha256=
|
|
30
|
+
kimi_cli/tools/__init__.py,sha256=ef753d75b86c482ef73292ad2a0719eba9aee050ae511d6e8483dc29c986eaf4,3551
|
|
31
31
|
kimi_cli/tools/bash/__init__.py,sha256=e7821ce9296171c538117398d77311d220a8000de625302f9b8faf62de5910a5,3304
|
|
32
32
|
kimi_cli/tools/bash/bash.md,sha256=5d9cc54b3718097951340b0a737c8e1fa308341fd2c4ebd121be94de31dd5f73,2348
|
|
33
33
|
kimi_cli/tools/dmail/__init__.py,sha256=dfc9ceccb5a47211ab99b7afa4624d13bf147ef68e2a079867f93cf46dfb58d2,1302
|
|
@@ -58,7 +58,7 @@ kimi_cli/tools/web/__init__.py,sha256=e13108c598828a8a05907a7a821e7ac92f5d63572b
|
|
|
58
58
|
kimi_cli/tools/web/fetch.md,sha256=56d00bd93b4e379c4f7efe445fce963eb26b8d20f85d4c19097ba6f33bd0019a,67
|
|
59
59
|
kimi_cli/tools/web/fetch.py,sha256=66448121d27d67f75b977c32244c721c2ccff1b2e097c2fe6717e66018d8f747,3183
|
|
60
60
|
kimi_cli/tools/web/search.md,sha256=24049f9e90d37083e0fc78b8b2e3a5f6fadf09bea00f36712b235d1212a2f532,146
|
|
61
|
-
kimi_cli/tools/web/search.py,sha256=
|
|
61
|
+
kimi_cli/tools/web/search.py,sha256=8f757f1eb83a878bd2a9d8c3d0c137c244c2a1314b5de8d2a55da5261773b162,4469
|
|
62
62
|
kimi_cli/ui/__init__.py,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
|
|
63
63
|
kimi_cli/ui/acp/__init__.py,sha256=a35e17273e943168882865f90d922180c5a1f01de0d128c899ffcfe55a9db3c3,17120
|
|
64
64
|
kimi_cli/ui/print/__init__.py,sha256=ca402bec701a253acd6de5b57d59635ac0b05d4013cebc26877c5aa4aa2c27c7,5546
|
|
@@ -68,7 +68,7 @@ kimi_cli/ui/shell/debug.py,sha256=cd4e7259c83f099b5c6519713be5306580f30d3fa4944e
|
|
|
68
68
|
kimi_cli/ui/shell/keyboard.py,sha256=23e5fbc4b6acda4c0f3b5297a0ae6eb09a90f4b5b37b2e95b7ce86a2da0d5dca,5160
|
|
69
69
|
kimi_cli/ui/shell/liveview.py,sha256=2f780323dfc7d9b35491a17ccc2b4f6320176ae00c596b426ea7d7f513d3e42c,15478
|
|
70
70
|
kimi_cli/ui/shell/metacmd.py,sha256=a0e52e9cbd8758c1ba13f025599341aa59dd5bc5e244840da2ff9bb71f952a20,7678
|
|
71
|
-
kimi_cli/ui/shell/prompt.py,sha256=
|
|
71
|
+
kimi_cli/ui/shell/prompt.py,sha256=72cce52735f3268363dca30089d418e7828d0c7c7c72549da709c005e1fb0a60,26180
|
|
72
72
|
kimi_cli/ui/shell/replay.py,sha256=e54f58acebc46ad944e1a2cdf54d81559262d2cf8baf5da391ed903926f1ccf1,3767
|
|
73
73
|
kimi_cli/ui/shell/setup.py,sha256=8fbf2935fc5b972d2c3946e8dc9f4a7e9d2953810b57c0fb6f22172abf3e6fb5,5369
|
|
74
74
|
kimi_cli/ui/shell/update.py,sha256=56dcb0bd1da82b98c22bfdddca717a2805bd8ac3e93bf23fb3b508549c41fae8,7340
|
|
@@ -78,6 +78,7 @@ kimi_cli/ui/wire/__init__.py,sha256=9252f53cd32b5a114afdbc402817a627818a48897554
|
|
|
78
78
|
kimi_cli/ui/wire/jsonrpc.py,sha256=c093a540e70026cb48eae494cf4c8ad04f1180338eaaad0a23d64798bb679944,995
|
|
79
79
|
kimi_cli/utils/aiohttp.py,sha256=f8f61e3beaf6439e949c33c3a10db3035bf88136e882b09c858ea92a4c888e00,245
|
|
80
80
|
kimi_cli/utils/changelog.py,sha256=bfcf5a5a360b13648bb7a6abc83e427270caa502646b5acc950d62148510641c,3402
|
|
81
|
+
kimi_cli/utils/clipboard.py,sha256=81944e1ba313c8784e513b10e2a0bb759ac5acd4ee27cb335c876e5e93bb8fe6,212
|
|
81
82
|
kimi_cli/utils/logging.py,sha256=129298ac214ecd8d913c3431cc05d754f9c4c8c4042c458618bf9e8ddebdb763,399
|
|
82
83
|
kimi_cli/utils/message.py,sha256=e552db92b2fb1911a0e05d2730590c4aca52b90bcf743330ae1bd8a78a5ed2f9,732
|
|
83
84
|
kimi_cli/utils/path.py,sha256=fdd4fc08999ddc7c610f884b4ba8d27932248b9ed06b5eb4139519edd00b3f75,687
|
|
@@ -86,7 +87,7 @@ kimi_cli/utils/signals.py,sha256=20e0d158a1043189d44815fe3624cd0bfe41e99620a18ac
|
|
|
86
87
|
kimi_cli/utils/string.py,sha256=0d437d3633199df1051813af8b49a2f808c6525547310cc5c3d427710d2eae06,593
|
|
87
88
|
kimi_cli/wire/__init__.py,sha256=9f1d7eb58f76885edaf76f769371c363ec801b46cada03883eeb3536fa2677f7,1896
|
|
88
89
|
kimi_cli/wire/message.py,sha256=005213250d05c3c724a5eac6f3c1c3843117439c5e5a24619e9570f59986f67e,5201
|
|
89
|
-
kimi_cli-0.
|
|
90
|
-
kimi_cli-0.
|
|
91
|
-
kimi_cli-0.
|
|
92
|
-
kimi_cli-0.
|
|
90
|
+
kimi_cli-0.47.dist-info/WHEEL,sha256=70ab3c2925fe316809860cb034f99ba13c4b49819b339959274aab755cc084a8,78
|
|
91
|
+
kimi_cli-0.47.dist-info/entry_points.txt,sha256=97e051756296e9db3167f6dce61d6c88e58d170314a2d63d18c84c73a5c1333b,44
|
|
92
|
+
kimi_cli-0.47.dist-info/METADATA,sha256=dfd6a8dd6052c53f455a8c4c759a637e477cb30ca65478fb9f4880246f61233e,5309
|
|
93
|
+
kimi_cli-0.47.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|