clikernel 0.2.1__tar.gz → 0.2.2__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.1 → clikernel-0.2.2}/CHANGELOG.md +7 -0
- {clikernel-0.2.1/clikernel.egg-info → clikernel-0.2.2}/PKG-INFO +1 -1
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel/__init__.py +1 -1
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel/core.py +6 -0
- {clikernel-0.2.1 → clikernel-0.2.2/clikernel.egg-info}/PKG-INFO +1 -1
- {clikernel-0.2.1 → clikernel-0.2.2}/LICENSE +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/MANIFEST.in +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/README.md +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel/_modidx.py +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel/cli.py +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel/mcp.py +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel/skill.py +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel/stream.py +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel.egg-info/SOURCES.txt +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel.egg-info/dependency_links.txt +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel.egg-info/entry_points.txt +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel.egg-info/requires.txt +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/clikernel.egg-info/top_level.txt +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/pyproject.toml +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/setup.cfg +0 -0
- {clikernel-0.2.1 → clikernel-0.2.2}/tests/test_stream.py +0 -0
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- do not remove -->
|
|
4
4
|
|
|
5
|
+
## 0.2.2
|
|
6
|
+
|
|
7
|
+
### New Features
|
|
8
|
+
|
|
9
|
+
- skip AST inspectors on nested `run_cell` so tool-replayed cells (e.g. %nbrun) are not treated as user-typed input ([#32](https://github.com/AnswerDotAI/clikernel/issues/32))
|
|
10
|
+
|
|
11
|
+
|
|
5
12
|
## 0.2.1
|
|
6
13
|
|
|
7
14
|
### New Features
|
|
@@ -8,4 +8,4 @@ Modules:
|
|
|
8
8
|
- `clikernel.skill`: Use the persistent `clikernel` MCP session as the default workspace for any task advanced through live Python execution -- stateful inspection, file-editing workflows, debugging, experiments, API probes, data transforms, or notebook-style work. Read this before writing, running, or debugging Python code in a session 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.2"
|
|
@@ -47,6 +47,7 @@ finally: del __file__'''
|
|
|
47
47
|
# %% ../nbs/00_core.ipynb #3dbf4cb6
|
|
48
48
|
_INSP_RUNNER = r'''
|
|
49
49
|
import inspect as _clik_inspect
|
|
50
|
+
import sys as _clik_sys
|
|
50
51
|
from IPython.core.error import InputRejected
|
|
51
52
|
class RuleBlock(InputRejected):
|
|
52
53
|
"Raise from an inspector to deliberately block a cell; any other inspector exception is a bug, and fails open"
|
|
@@ -55,6 +56,11 @@ class _ClikInspect:
|
|
|
55
56
|
"Calls each inspector once per cell: 1-arg get the AST, 2-arg also the raw source"
|
|
56
57
|
def __init__(self, fs): self.fs = fs
|
|
57
58
|
def visit(self, tree):
|
|
59
|
+
fr, n = _clik_sys._getframe(), 0
|
|
60
|
+
while fr:
|
|
61
|
+
n += fr.f_code.co_name == 'run_cell_async'
|
|
62
|
+
fr = fr.f_back
|
|
63
|
+
if n > 1: return tree # nested run_cell: cell replayed by a tool (%nbrun etc.), not typed
|
|
58
64
|
for f in self.fs:
|
|
59
65
|
try:
|
|
60
66
|
note = f(tree, _clik_src) if len(_clik_inspect.signature(f).parameters) > 1 else f(tree)
|
|
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
|
|
File without changes
|