clikernel 0.2.18__tar.gz → 0.2.19__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.
- {clikernel-0.2.18 → clikernel-0.2.19}/CHANGELOG.md +8 -0
- {clikernel-0.2.18/clikernel.egg-info → clikernel-0.2.19}/PKG-INFO +2 -2
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel/__init__.py +1 -1
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel/core.py +2 -3
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel/mcp.py +4 -2
- {clikernel-0.2.18 → clikernel-0.2.19/clikernel.egg-info}/PKG-INFO +2 -2
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel.egg-info/requires.txt +1 -1
- {clikernel-0.2.18 → clikernel-0.2.19}/pyproject.toml +1 -1
- {clikernel-0.2.18 → clikernel-0.2.19}/LICENSE +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/MANIFEST.in +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/README.md +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel/_modidx.py +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel/cli.py +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel/rules.py +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel/skill.py +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel/stream.py +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel.egg-info/SOURCES.txt +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel.egg-info/dependency_links.txt +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel.egg-info/entry_points.txt +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/clikernel.egg-info/top_level.txt +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/setup.cfg +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/tests/test_rules.py +0 -0
- {clikernel-0.2.18 → clikernel-0.2.19}/tests/test_stream.py +0 -0
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- do not remove -->
|
|
4
4
|
|
|
5
|
+
## 0.2.19
|
|
6
|
+
|
|
7
|
+
### New Features
|
|
8
|
+
|
|
9
|
+
- Use ipymini generic display defaults via module import in Python kernels instead of `enable_full_metadata` ([#62](https://github.com/AnswerDotAI/clikernel/issues/62))
|
|
10
|
+
- Handle SIGTERM in clikernel-mcp by cancelling the serve task so gateway sessions close and autoclose kernels are stopped ([#61](https://github.com/AnswerDotAI/clikernel/issues/61))
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
## 0.2.18
|
|
6
14
|
|
|
7
15
|
### New Features
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clikernel
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.19
|
|
4
4
|
Summary: Serve persistent Jupyter kernels to LLMs as concise text, over MCP or a plain stream protocol
|
|
5
5
|
Author: clikernel contributors
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -16,7 +16,7 @@ Requires-Dist: jupyasyncclient>=0.2.10
|
|
|
16
16
|
Requires-Dist: jupywire>=0.1.9
|
|
17
17
|
Requires-Dist: mcpmini>=0.0.5
|
|
18
18
|
Requires-Dist: rustygate>=0.1.27
|
|
19
|
-
Requires-Dist: ipymini>=0.1.
|
|
19
|
+
Requires-Dist: ipymini>=0.1.28
|
|
20
20
|
Requires-Dist: httpx
|
|
21
21
|
Requires-Dist: ipython
|
|
22
22
|
Provides-Extra: dev
|
|
@@ -8,4 +8,4 @@ Modules:
|
|
|
8
8
|
- `clikernel.skill`: Use `clikernel` MCP as the default persistent Python workspace for file/notebook reads and edits, exploration, library checks, data reshaping and debugging. Imports and variables carry across calls. Read before writing, running or debugging Python with `clikernel` connected.
|
|
9
9
|
- `clikernel.stream`: Streaming JSON-lines worker protocol: nbformat-shaped output events, and a supervisor for select-based UIs."""
|
|
10
10
|
|
|
11
|
-
__version__ = "0.2.
|
|
11
|
+
__version__ = "0.2.19"
|
|
@@ -54,10 +54,9 @@ finally: del __file__'''
|
|
|
54
54
|
|
|
55
55
|
# %% ../nbs/00_core.ipynb #b0dd40c1
|
|
56
56
|
def _python_display(shell):
|
|
57
|
-
"
|
|
57
|
+
"Set display defaults for Python kernels."
|
|
58
58
|
import ast
|
|
59
|
-
|
|
60
|
-
enable_full_metadata(shell.display_formatter)
|
|
59
|
+
import ipymini.term.display # chkstyle: ignore
|
|
61
60
|
run = shell.run_ast_nodes
|
|
62
61
|
async def run_ast_nodes(nodelist, cell_name, interactivity='last_expr', **kwargs):
|
|
63
62
|
if interactivity != 'all': return await run(nodelist, cell_name, interactivity, **kwargs)
|
|
@@ -6,7 +6,7 @@ Each host has a separate gateway session. Calls without an explicit `host` go to
|
|
|
6
6
|
|
|
7
7
|
Before forwarding `exec`, the router checks the cell against `clikernel.rules`. Most rules add a note to the reply. Two rules block the cell, which then never reaches a gateway.
|
|
8
8
|
|
|
9
|
-
`main`
|
|
9
|
+
`main` closes its gateway sessions on EOF, SIGTERM, or an exception. Closing a session sends an HTTP DELETE. The gateway then stops the kernels that session created with autoclose. If the router started a child gateway, it stops that process too.
|
|
10
10
|
|
|
11
11
|
Docs: https://AnswerDotAI.github.io/clikernel/mcp.html.md"""
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ Docs: https://AnswerDotAI.github.io/clikernel/mcp.html.md"""
|
|
|
16
16
|
__all__ = ['HOST_PARAM', 'HOSTED', 'Router', 'main', 'agent_input', 'hook']
|
|
17
17
|
|
|
18
18
|
# %% ../nbs/01_mcp.ipynb #28c42902
|
|
19
|
-
import asyncio, httpx, json
|
|
19
|
+
import asyncio, httpx, json, signal
|
|
20
20
|
from fastcore.utils import *
|
|
21
21
|
from fastcore.script import call_parse, store_true
|
|
22
22
|
from mcpmini.core import serve_stdio, jresp, jerr
|
|
@@ -125,6 +125,8 @@ def main(
|
|
|
125
125
|
"Run `clikernel-mcp` as a stdio server."
|
|
126
126
|
async def _main():
|
|
127
127
|
router = Router(cfgdir, quiet=quiet)
|
|
128
|
+
loop,task = asyncio.get_running_loop(),asyncio.current_task()
|
|
129
|
+
signal.signal(signal.SIGTERM, lambda *_: loop.call_soon_threadsafe(task.cancel))
|
|
128
130
|
try: await serve_stdio(router)
|
|
129
131
|
finally: await router.aclose()
|
|
130
132
|
asyncio.run(_main())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clikernel
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.19
|
|
4
4
|
Summary: Serve persistent Jupyter kernels to LLMs as concise text, over MCP or a plain stream protocol
|
|
5
5
|
Author: clikernel contributors
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -16,7 +16,7 @@ Requires-Dist: jupyasyncclient>=0.2.10
|
|
|
16
16
|
Requires-Dist: jupywire>=0.1.9
|
|
17
17
|
Requires-Dist: mcpmini>=0.0.5
|
|
18
18
|
Requires-Dist: rustygate>=0.1.27
|
|
19
|
-
Requires-Dist: ipymini>=0.1.
|
|
19
|
+
Requires-Dist: ipymini>=0.1.28
|
|
20
20
|
Requires-Dist: httpx
|
|
21
21
|
Requires-Dist: ipython
|
|
22
22
|
Provides-Extra: dev
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|