swarmauri_tool_jupytergetshellmessage 0.10.1.dev2__tar.gz → 0.11.0__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.
- swarmauri_tool_jupytergetshellmessage-0.11.0/NOTICE +7 -0
- swarmauri_tool_jupytergetshellmessage-0.11.0/PKG-INFO +353 -0
- swarmauri_tool_jupytergetshellmessage-0.11.0/README.md +322 -0
- {swarmauri_tool_jupytergetshellmessage-0.10.1.dev2 → swarmauri_tool_jupytergetshellmessage-0.11.0}/pyproject.toml +53 -4
- {swarmauri_tool_jupytergetshellmessage-0.10.1.dev2 → swarmauri_tool_jupytergetshellmessage-0.11.0}/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py +39 -17
- {swarmauri_tool_jupytergetshellmessage-0.10.1.dev2 → swarmauri_tool_jupytergetshellmessage-0.11.0}/swarmauri_tool_jupytergetshellmessage/install_kernel.py +7 -3
- swarmauri_tool_jupytergetshellmessage-0.10.1.dev2/PKG-INFO +0 -100
- swarmauri_tool_jupytergetshellmessage-0.10.1.dev2/README.md +0 -69
- {swarmauri_tool_jupytergetshellmessage-0.10.1.dev2 → swarmauri_tool_jupytergetshellmessage-0.11.0}/LICENSE +0 -0
- {swarmauri_tool_jupytergetshellmessage-0.10.1.dev2 → swarmauri_tool_jupytergetshellmessage-0.11.0}/swarmauri_tool_jupytergetshellmessage/__init__.py +0 -0
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: swarmauri_tool_jupytergetshellmessage
|
|
3
|
+
Version: 0.11.0
|
|
4
|
+
Summary: A tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: NOTICE
|
|
8
|
+
Keywords: swarmauri,tool,jupytergetshellmessage,designed,retrieve,shell,messages,running,jupyter,kernel,client,useful,debugging,execution,responses
|
|
9
|
+
Author: Jacob Stewart
|
|
10
|
+
Author-email: jacob@swarmauri.com
|
|
11
|
+
Requires-Python: >=3.10,<3.15
|
|
12
|
+
Classifier: Natural Language :: English
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Requires-Dist: ipykernel (>=6.29.5)
|
|
25
|
+
Requires-Dist: jupyter_client (>=8.6.3)
|
|
26
|
+
Requires-Dist: swarmauri_base
|
|
27
|
+
Requires-Dist: swarmauri_core
|
|
28
|
+
Requires-Dist: swarmauri_standard
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# swarmauri_tool_jupytergetshellmessage
|
|
32
|
+
|
|
33
|
+
<!-- readme-standards:begin branding -->
|
|
34
|
+
<p align="center"><a href="https://github.com/swarmauri/swarmauri-sdk"><img src="https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri.brand.theme.svg" alt="Swarmauri SDK" width="300"></a></p>
|
|
35
|
+
<p align="center"><strong>swarmauri_tool_jupytergetshellmessage</strong></p>
|
|
36
|
+
<p align="center">A tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses.</p>
|
|
37
|
+
<p align="center">
|
|
38
|
+
<a href="https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/"><img alt="pypi: swarmauri_tool_jupytergetshellmessage" src="https://img.shields.io/pypi/v/swarmauri_tool_jupytergetshellmessage?labelColor=1E293B&color=1D4ED8"></a>
|
|
39
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml"><img alt="Source version: 0.11.0" src="https://img.shields.io/static/v1?label=Source%20version&message=0.11.0&labelColor=1E293B&color=4338CA"></a>
|
|
40
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml"><img alt="Python: >=3.10,<3.15" src="https://img.shields.io/static/v1?label=Python&message=%3E%3D3.10%2C%3C3.15&labelColor=1E293B&color=0F766E"></a>
|
|
41
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml"><img alt="Layer: community" src="https://img.shields.io/static/v1?label=Layer&message=community&labelColor=1E293B&color=6D28D9"></a>
|
|
42
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/README.md#lifecycle-and-migration"><img alt="Lifecycle: active" src="https://img.shields.io/static/v1?label=Lifecycle&message=active&labelColor=1E293B&color=166534"></a>
|
|
43
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/static/v1?label=License&message=Apache-2.0&labelColor=1E293B&color=86198F"></a>
|
|
44
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/NOTICE"><img alt="Notice: attribution" src="https://img.shields.io/static/v1?label=Notice&message=attribution&labelColor=1E293B&color=86198F"></a>
|
|
45
|
+
</p>
|
|
46
|
+
<p align="center">
|
|
47
|
+
<a href="https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/"><img alt="Monthly PyPI downloads: swarmauri_tool_jupytergetshellmessage" src="https://img.shields.io/pypi/dm/swarmauri_tool_jupytergetshellmessage?labelColor=1E293B&color=0E7490"></a>
|
|
48
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/README.md"><img alt="README hits: swarmauri_tool_jupytergetshellmessage" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/README.md.svg?label=README%20hits&labelColor=1E293B&color=0E7490"></a>
|
|
49
|
+
</p>
|
|
50
|
+
<p align="center">
|
|
51
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="README standards: CI gate" src="https://img.shields.io/static/v1?label=README%20standards&message=CI%20gate&labelColor=1E293B&color=1D4ED8"></a>
|
|
52
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/tests/unit/test_readme_sources.py"><img alt="Tests: example source" src="https://img.shields.io/static/v1?label=Tests&message=example%20source&labelColor=1E293B&color=0F766E"></a>
|
|
53
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/README.md#certification-status"><img alt="Certification: not certified" src="https://img.shields.io/static/v1?label=Certification&message=not%20certified&labelColor=1E293B&color=92400E"></a>
|
|
54
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"><img alt="Governance: repository policy" src="https://img.shields.io/static/v1?label=Governance&message=repository%20policy&labelColor=1E293B&color=4338CA"></a>
|
|
55
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="Evidence: source and CI" src="https://img.shields.io/static/v1?label=Evidence&message=source%20and%20CI&labelColor=1E293B&color=6D28D9"></a>
|
|
56
|
+
</p>
|
|
57
|
+
<p align="center"><a href="#overview">Overview</a> · <a href="#installation">Installation</a> · <a href="#quick-start">Quick Start</a> · <a href="#usage">Usage</a> · <a href="#public-api-and-import-surfaces">API</a> · <a href="#contributing">Contributing</a> · <a href="#governance">Governance</a> · <a href="#license">License</a></p>
|
|
58
|
+
<!-- readme-standards:end branding -->
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Overview
|
|
63
|
+
|
|
64
|
+
### Summary
|
|
65
|
+
|
|
66
|
+
Retrieves shell-channel messages from a running Jupyter kernel using `jupyter_client`.
|
|
67
|
+
|
|
68
|
+
### Why This Package
|
|
69
|
+
|
|
70
|
+
`swarmauri_tool_jupytergetshellmessage` isolates this responsibility: A tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses. Its [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py) exposes `JupyterGetShellMessageTool`, allowing consumers to select this package without treating adjacent packages as part of its public contract.
|
|
71
|
+
|
|
72
|
+
### When to Use
|
|
73
|
+
|
|
74
|
+
Choose `swarmauri_tool_jupytergetshellmessage` when your integration needs a tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses. Match the imports below to your application boundary and install its declared dependencies before using the example.
|
|
75
|
+
|
|
76
|
+
### Features
|
|
77
|
+
|
|
78
|
+
- Listens on the Jupyter kernel shell channel and captures raw message dicts.
|
|
79
|
+
- Returns a dict containing `messages` or an `error` key.
|
|
80
|
+
- Helpful for debugging live kernel communication during automated notebook workflows.
|
|
81
|
+
|
|
82
|
+
### Non-Goals
|
|
83
|
+
|
|
84
|
+
`swarmauri_tool_jupytergetshellmessage` owns a tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Getting Started
|
|
89
|
+
|
|
90
|
+
### Prerequisites
|
|
91
|
+
|
|
92
|
+
- Python 3.10 or newer.
|
|
93
|
+
- Access to a running Jupyter kernel (Notebook server, JupyterLab, etc.).
|
|
94
|
+
- `jupyter_client` and `websocket-client` (installed automatically).
|
|
95
|
+
|
|
96
|
+
### Installation
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# pip
|
|
100
|
+
pip install swarmauri_tool_jupytergetshellmessage
|
|
101
|
+
|
|
102
|
+
# poetry
|
|
103
|
+
poetry add swarmauri_tool_jupytergetshellmessage
|
|
104
|
+
|
|
105
|
+
# uv (pyproject-based projects)
|
|
106
|
+
uv add swarmauri_tool_jupytergetshellmessage
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
#### uv
|
|
110
|
+
|
|
111
|
+
<!-- readme-standards:begin installation.uv -->
|
|
112
|
+
```bash
|
|
113
|
+
uv add swarmauri_tool_jupytergetshellmessage
|
|
114
|
+
```
|
|
115
|
+
<!-- readme-standards:end installation.uv -->
|
|
116
|
+
|
|
117
|
+
#### pip
|
|
118
|
+
|
|
119
|
+
<!-- readme-standards:begin installation.pip -->
|
|
120
|
+
```bash
|
|
121
|
+
python -m pip install swarmauri_tool_jupytergetshellmessage
|
|
122
|
+
```
|
|
123
|
+
<!-- readme-standards:end installation.pip -->
|
|
124
|
+
|
|
125
|
+
#### Poetry
|
|
126
|
+
|
|
127
|
+
<!-- readme-standards:begin installation.poetry -->
|
|
128
|
+
```bash
|
|
129
|
+
poetry add swarmauri_tool_jupytergetshellmessage
|
|
130
|
+
```
|
|
131
|
+
<!-- readme-standards:end installation.poetry -->
|
|
132
|
+
|
|
133
|
+
### Quick Start
|
|
134
|
+
|
|
135
|
+
#### Example
|
|
136
|
+
|
|
137
|
+
<!-- readme-standards:begin example.quick-start -->
|
|
138
|
+
Source: [docs/readme/quick_start.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/docs/readme/quick_start.py).
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
from swarmauri_tool_jupytergetshellmessage import JupyterGetShellMessageTool
|
|
142
|
+
|
|
143
|
+
channels_url = "ws://localhost:8888/api/kernels/<kernel-id>/channels"
|
|
144
|
+
result = JupyterGetShellMessageTool()(channels_url, timeout=5.0)
|
|
145
|
+
|
|
146
|
+
if "messages" in result:
|
|
147
|
+
for msg in result["messages"]:
|
|
148
|
+
print(msg)
|
|
149
|
+
else:
|
|
150
|
+
print("Error:", result.get("error"))
|
|
151
|
+
```
|
|
152
|
+
<!-- readme-standards:end example.quick-start -->
|
|
153
|
+
|
|
154
|
+
#### Expected Result
|
|
155
|
+
|
|
156
|
+
The example demonstrates the documented `swarmauri_tool_jupytergetshellmessage` source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Usage
|
|
161
|
+
|
|
162
|
+
### Common Workflows
|
|
163
|
+
|
|
164
|
+
<!-- readme-standards:begin example.usage -->
|
|
165
|
+
Source: [docs/readme/usage.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/docs/readme/usage.py).
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
from swarmauri_tool_jupytergetshellmessage import JupyterGetShellMessageTool
|
|
169
|
+
|
|
170
|
+
channels_url = "ws://localhost:8888/api/kernels/<kernel-id>/channels"
|
|
171
|
+
result = JupyterGetShellMessageTool()(channels_url, timeout=5.0)
|
|
172
|
+
|
|
173
|
+
if "messages" in result:
|
|
174
|
+
for msg in result["messages"]:
|
|
175
|
+
print(msg)
|
|
176
|
+
else:
|
|
177
|
+
print("Error:", result.get("error"))
|
|
178
|
+
```
|
|
179
|
+
<!-- readme-standards:end example.usage -->
|
|
180
|
+
|
|
181
|
+
### Configuration
|
|
182
|
+
|
|
183
|
+
Configure `swarmauri_tool_jupytergetshellmessage` through the APIs in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py); its [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml) describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.
|
|
184
|
+
|
|
185
|
+
### Error Handling
|
|
186
|
+
|
|
187
|
+
The inspected `swarmauri_tool_jupytergetshellmessage` source raises `RuntimeError`. Handle these at the calling boundary and consult the implementation for the triggering conditions.
|
|
188
|
+
|
|
189
|
+
### Best Practices
|
|
190
|
+
|
|
191
|
+
- Ensure you pass the correct kernel channels URL (including security tokens/cookies if your server requires them).
|
|
192
|
+
- Increase `timeout` if you expect long-running cells before shell replies are sent.
|
|
193
|
+
- Combine with notebook execution tools to capture both SHELL and IOPub messages for full observability.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Package Boundary
|
|
198
|
+
|
|
199
|
+
### What It Owns
|
|
200
|
+
|
|
201
|
+
`swarmauri_tool_jupytergetshellmessage` is located in `community` and owns a tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses. Source-declared APIs include `JupyterGetShellMessageTool`. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml) records its direct dependency boundary.
|
|
202
|
+
|
|
203
|
+
### Public API and Import Surfaces
|
|
204
|
+
|
|
205
|
+
Import namespace: `swarmauri_tool_jupytergetshellmessage`.
|
|
206
|
+
|
|
207
|
+
Source-declared exports or types: `JupyterGetShellMessageTool`.
|
|
208
|
+
|
|
209
|
+
Inspect [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py) for exact signatures; this inventory does not designate every internal module as stable.
|
|
210
|
+
|
|
211
|
+
### Entry Points
|
|
212
|
+
|
|
213
|
+
<!-- readme-standards:begin entry-points -->
|
|
214
|
+
- `swarmauri.tools` → `JupyterGetShellMessageTool` → `swarmauri_tool_jupytergetshellmessage:JupyterGetShellMessageTool`
|
|
215
|
+
<!-- readme-standards:end entry-points -->
|
|
216
|
+
|
|
217
|
+
### Injected Dependencies
|
|
218
|
+
|
|
219
|
+
The direct installation dependencies of `swarmauri_tool_jupytergetshellmessage` are `jupyter-client`, `ipykernel`, `swarmauri-core`, `swarmauri-base`, `swarmauri-standard`. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py).
|
|
220
|
+
|
|
221
|
+
### Protocol Consumers
|
|
222
|
+
|
|
223
|
+
Direct consumers in this checkout’s package manifests include `swarmauri_toolkit_jupytertoolkit`. These edges describe declared dependencies, not protocol-conformance evidence.
|
|
224
|
+
|
|
225
|
+
### Extensions
|
|
226
|
+
|
|
227
|
+
For `swarmauri_tool_jupytergetshellmessage`, use the source-declared public interfaces (`JupyterGetShellMessageTool`) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## Operations and Readiness
|
|
232
|
+
|
|
233
|
+
### Operational Requirements
|
|
234
|
+
|
|
235
|
+
Operate `swarmauri_tool_jupytergetshellmessage` according to its actual entry points and collaborators. The dependency and Python requirements in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml) are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.
|
|
236
|
+
|
|
237
|
+
### Health and Observability
|
|
238
|
+
|
|
239
|
+
This README does not establish a standalone health endpoint for `swarmauri_tool_jupytergetshellmessage`. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.
|
|
240
|
+
|
|
241
|
+
### Security and Resource Limits
|
|
242
|
+
|
|
243
|
+
Apply the input, credential, and resource constraints implemented in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py). The `swarmauri_tool_jupytergetshellmessage` README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.
|
|
244
|
+
|
|
245
|
+
### Compatibility
|
|
246
|
+
|
|
247
|
+
This source version of `swarmauri_tool_jupytergetshellmessage` declares Python `>=3.10,<3.15`. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Verification
|
|
252
|
+
|
|
253
|
+
### Tests
|
|
254
|
+
|
|
255
|
+
Run `python -m pytest tests/unit/test_readme_sources.py` from the `swarmauri_tool_jupytergetshellmessage` package directory for the maintained example source checks (Python compilation and non-Python file presence). Existing package tests include:
|
|
256
|
+
|
|
257
|
+
- [tests/unit/test_JupyterGetShellMessageTool.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/tests/unit/test_JupyterGetShellMessageTool.py)
|
|
258
|
+
- [tests/unit/test_JupyterGetShellMessageTool__init__.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/tests/unit/test_JupyterGetShellMessageTool__init__.py)
|
|
259
|
+
|
|
260
|
+
The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.
|
|
261
|
+
|
|
262
|
+
### Certification Status
|
|
263
|
+
|
|
264
|
+
No external certification is asserted for `swarmauri_tool_jupytergetshellmessage` by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.
|
|
265
|
+
|
|
266
|
+
### Evidence
|
|
267
|
+
|
|
268
|
+
The [README standards CI](https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml) records mechanical documentation results for its tested commit. The [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py) and example sources support the package-boundary description; external runtime behavior requires its own test evidence.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## FAQ
|
|
273
|
+
|
|
274
|
+
### Why
|
|
275
|
+
|
|
276
|
+
**Why select this package?** `swarmauri_tool_jupytergetshellmessage` provides a tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses; use its own API boundary rather than assuming neighboring packages are bundled or configured automatically.
|
|
277
|
+
|
|
278
|
+
### How
|
|
279
|
+
|
|
280
|
+
**How do I start?** Install or synchronize the environment under Getting Started, follow the maintained example for `swarmauri_tool_jupytergetshellmessage`, and consult [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py) for the exact types and signatures involved.
|
|
281
|
+
|
|
282
|
+
### When
|
|
283
|
+
|
|
284
|
+
**When should I validate an upgrade?** Recheck `swarmauri_tool_jupytergetshellmessage` whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Documentation and Related Packages
|
|
289
|
+
|
|
290
|
+
### More Documentation
|
|
291
|
+
|
|
292
|
+
The [repository contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md), [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py), and [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml) provide the supporting context for `swarmauri_tool_jupytergetshellmessage`. The [README policy](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md) defines the common document structure.
|
|
293
|
+
|
|
294
|
+
### Related Packages
|
|
295
|
+
|
|
296
|
+
- [swarmauri_base](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/20-bases/swarmauri_base/README.md): Reusable Swarmauri base classes, mixins, and dynamic Pydantic component models for composable intelligence infrastructure.
|
|
297
|
+
- [swarmauri_core](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/10-interfaces/swarmauri_core/README.md): Core interface contracts and shared types for Swarmauri composable intelligence infrastructure components.
|
|
298
|
+
- [swarmauri_standard](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/30-standard-kernel/swarmauri_standard/README.md): First-party Swarmauri standard components for agents, tools, parsers, vectors, model adapters, and composable intelligence workflows.
|
|
299
|
+
|
|
300
|
+
### Project Links
|
|
301
|
+
|
|
302
|
+
<!-- readme-standards:begin project-links -->
|
|
303
|
+
- [pypi: swarmauri_tool_jupytergetshellmessage](https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/)
|
|
304
|
+
<!-- readme-standards:end project-links -->
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## Contributing
|
|
309
|
+
|
|
310
|
+
### How to Contribute
|
|
311
|
+
|
|
312
|
+
If you want to contribute to swarmauri-sdk, read up on our [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/contributing.md) that will help you get started.
|
|
313
|
+
|
|
314
|
+
### Development Setup
|
|
315
|
+
|
|
316
|
+
Work from the `pkgs/50-community/swarmauri_tool_jupytergetshellmessage` checkout. Synchronize its declared development environment with uv, then run the relevant package tests and `python -m pytest tests/unit/test_readme_sources.py`. The repository’s dedicated README job installs `readme-standards==0.1.3` without resolving unrelated runtime packages.
|
|
317
|
+
|
|
318
|
+
### Notes for Maintainers
|
|
319
|
+
|
|
320
|
+
Edit authored prose directly in this `swarmauri_tool_jupytergetshellmessage` README. Update source examples in `docs/readme/`, then run `readme-standards render --root . --write` from the package directory and review the diff. Required headings and generated blocks come from package-guide-v1.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Governance
|
|
325
|
+
|
|
326
|
+
### Ownership and Decision Making
|
|
327
|
+
|
|
328
|
+
Changes to `swarmauri_tool_jupytergetshellmessage` follow the maintainer review process of [swarmauri/swarmauri-sdk](https://github.com/swarmauri/swarmauri-sdk) and its contribution guide. Author attribution remains in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml); this README does not assign new publishing or administrative authority.
|
|
329
|
+
|
|
330
|
+
### Standards and Policies
|
|
331
|
+
|
|
332
|
+
`swarmauri_tool_jupytergetshellmessage` follows the versioned [package-guide-v1 outline](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md). All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.
|
|
333
|
+
|
|
334
|
+
### Lifecycle and Migration
|
|
335
|
+
|
|
336
|
+
The `swarmauri_tool_jupytergetshellmessage` source version is `0.11.0`.
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## License and Attribution
|
|
341
|
+
|
|
342
|
+
### License
|
|
343
|
+
|
|
344
|
+
<!-- readme-standards:begin license -->
|
|
345
|
+
Licensed under `Apache-2.0`. See [LICENSE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/LICENSE).
|
|
346
|
+
<!-- readme-standards:end license -->
|
|
347
|
+
|
|
348
|
+
### Notices
|
|
349
|
+
|
|
350
|
+
<!-- readme-standards:begin notices -->
|
|
351
|
+
See [NOTICE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/NOTICE) for attribution.
|
|
352
|
+
<!-- readme-standards:end notices -->
|
|
353
|
+
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# swarmauri_tool_jupytergetshellmessage
|
|
2
|
+
|
|
3
|
+
<!-- readme-standards:begin branding -->
|
|
4
|
+
<p align="center"><a href="https://github.com/swarmauri/swarmauri-sdk"><img src="https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri.brand.theme.svg" alt="Swarmauri SDK" width="300"></a></p>
|
|
5
|
+
<p align="center"><strong>swarmauri_tool_jupytergetshellmessage</strong></p>
|
|
6
|
+
<p align="center">A tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses.</p>
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/"><img alt="pypi: swarmauri_tool_jupytergetshellmessage" src="https://img.shields.io/pypi/v/swarmauri_tool_jupytergetshellmessage?labelColor=1E293B&color=1D4ED8"></a>
|
|
9
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml"><img alt="Source version: 0.11.0" src="https://img.shields.io/static/v1?label=Source%20version&message=0.11.0&labelColor=1E293B&color=4338CA"></a>
|
|
10
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml"><img alt="Python: >=3.10,<3.15" src="https://img.shields.io/static/v1?label=Python&message=%3E%3D3.10%2C%3C3.15&labelColor=1E293B&color=0F766E"></a>
|
|
11
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml"><img alt="Layer: community" src="https://img.shields.io/static/v1?label=Layer&message=community&labelColor=1E293B&color=6D28D9"></a>
|
|
12
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/README.md#lifecycle-and-migration"><img alt="Lifecycle: active" src="https://img.shields.io/static/v1?label=Lifecycle&message=active&labelColor=1E293B&color=166534"></a>
|
|
13
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/static/v1?label=License&message=Apache-2.0&labelColor=1E293B&color=86198F"></a>
|
|
14
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/NOTICE"><img alt="Notice: attribution" src="https://img.shields.io/static/v1?label=Notice&message=attribution&labelColor=1E293B&color=86198F"></a>
|
|
15
|
+
</p>
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/"><img alt="Monthly PyPI downloads: swarmauri_tool_jupytergetshellmessage" src="https://img.shields.io/pypi/dm/swarmauri_tool_jupytergetshellmessage?labelColor=1E293B&color=0E7490"></a>
|
|
18
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/README.md"><img alt="README hits: swarmauri_tool_jupytergetshellmessage" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/README.md.svg?label=README%20hits&labelColor=1E293B&color=0E7490"></a>
|
|
19
|
+
</p>
|
|
20
|
+
<p align="center">
|
|
21
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="README standards: CI gate" src="https://img.shields.io/static/v1?label=README%20standards&message=CI%20gate&labelColor=1E293B&color=1D4ED8"></a>
|
|
22
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/tests/unit/test_readme_sources.py"><img alt="Tests: example source" src="https://img.shields.io/static/v1?label=Tests&message=example%20source&labelColor=1E293B&color=0F766E"></a>
|
|
23
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/README.md#certification-status"><img alt="Certification: not certified" src="https://img.shields.io/static/v1?label=Certification&message=not%20certified&labelColor=1E293B&color=92400E"></a>
|
|
24
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"><img alt="Governance: repository policy" src="https://img.shields.io/static/v1?label=Governance&message=repository%20policy&labelColor=1E293B&color=4338CA"></a>
|
|
25
|
+
<a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="Evidence: source and CI" src="https://img.shields.io/static/v1?label=Evidence&message=source%20and%20CI&labelColor=1E293B&color=6D28D9"></a>
|
|
26
|
+
</p>
|
|
27
|
+
<p align="center"><a href="#overview">Overview</a> · <a href="#installation">Installation</a> · <a href="#quick-start">Quick Start</a> · <a href="#usage">Usage</a> · <a href="#public-api-and-import-surfaces">API</a> · <a href="#contributing">Contributing</a> · <a href="#governance">Governance</a> · <a href="#license">License</a></p>
|
|
28
|
+
<!-- readme-standards:end branding -->
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Overview
|
|
33
|
+
|
|
34
|
+
### Summary
|
|
35
|
+
|
|
36
|
+
Retrieves shell-channel messages from a running Jupyter kernel using `jupyter_client`.
|
|
37
|
+
|
|
38
|
+
### Why This Package
|
|
39
|
+
|
|
40
|
+
`swarmauri_tool_jupytergetshellmessage` isolates this responsibility: A tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses. Its [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py) exposes `JupyterGetShellMessageTool`, allowing consumers to select this package without treating adjacent packages as part of its public contract.
|
|
41
|
+
|
|
42
|
+
### When to Use
|
|
43
|
+
|
|
44
|
+
Choose `swarmauri_tool_jupytergetshellmessage` when your integration needs a tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses. Match the imports below to your application boundary and install its declared dependencies before using the example.
|
|
45
|
+
|
|
46
|
+
### Features
|
|
47
|
+
|
|
48
|
+
- Listens on the Jupyter kernel shell channel and captures raw message dicts.
|
|
49
|
+
- Returns a dict containing `messages` or an `error` key.
|
|
50
|
+
- Helpful for debugging live kernel communication during automated notebook workflows.
|
|
51
|
+
|
|
52
|
+
### Non-Goals
|
|
53
|
+
|
|
54
|
+
`swarmauri_tool_jupytergetshellmessage` owns a tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Getting Started
|
|
59
|
+
|
|
60
|
+
### Prerequisites
|
|
61
|
+
|
|
62
|
+
- Python 3.10 or newer.
|
|
63
|
+
- Access to a running Jupyter kernel (Notebook server, JupyterLab, etc.).
|
|
64
|
+
- `jupyter_client` and `websocket-client` (installed automatically).
|
|
65
|
+
|
|
66
|
+
### Installation
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# pip
|
|
70
|
+
pip install swarmauri_tool_jupytergetshellmessage
|
|
71
|
+
|
|
72
|
+
# poetry
|
|
73
|
+
poetry add swarmauri_tool_jupytergetshellmessage
|
|
74
|
+
|
|
75
|
+
# uv (pyproject-based projects)
|
|
76
|
+
uv add swarmauri_tool_jupytergetshellmessage
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
#### uv
|
|
80
|
+
|
|
81
|
+
<!-- readme-standards:begin installation.uv -->
|
|
82
|
+
```bash
|
|
83
|
+
uv add swarmauri_tool_jupytergetshellmessage
|
|
84
|
+
```
|
|
85
|
+
<!-- readme-standards:end installation.uv -->
|
|
86
|
+
|
|
87
|
+
#### pip
|
|
88
|
+
|
|
89
|
+
<!-- readme-standards:begin installation.pip -->
|
|
90
|
+
```bash
|
|
91
|
+
python -m pip install swarmauri_tool_jupytergetshellmessage
|
|
92
|
+
```
|
|
93
|
+
<!-- readme-standards:end installation.pip -->
|
|
94
|
+
|
|
95
|
+
#### Poetry
|
|
96
|
+
|
|
97
|
+
<!-- readme-standards:begin installation.poetry -->
|
|
98
|
+
```bash
|
|
99
|
+
poetry add swarmauri_tool_jupytergetshellmessage
|
|
100
|
+
```
|
|
101
|
+
<!-- readme-standards:end installation.poetry -->
|
|
102
|
+
|
|
103
|
+
### Quick Start
|
|
104
|
+
|
|
105
|
+
#### Example
|
|
106
|
+
|
|
107
|
+
<!-- readme-standards:begin example.quick-start -->
|
|
108
|
+
Source: [docs/readme/quick_start.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/docs/readme/quick_start.py).
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
from swarmauri_tool_jupytergetshellmessage import JupyterGetShellMessageTool
|
|
112
|
+
|
|
113
|
+
channels_url = "ws://localhost:8888/api/kernels/<kernel-id>/channels"
|
|
114
|
+
result = JupyterGetShellMessageTool()(channels_url, timeout=5.0)
|
|
115
|
+
|
|
116
|
+
if "messages" in result:
|
|
117
|
+
for msg in result["messages"]:
|
|
118
|
+
print(msg)
|
|
119
|
+
else:
|
|
120
|
+
print("Error:", result.get("error"))
|
|
121
|
+
```
|
|
122
|
+
<!-- readme-standards:end example.quick-start -->
|
|
123
|
+
|
|
124
|
+
#### Expected Result
|
|
125
|
+
|
|
126
|
+
The example demonstrates the documented `swarmauri_tool_jupytergetshellmessage` source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Usage
|
|
131
|
+
|
|
132
|
+
### Common Workflows
|
|
133
|
+
|
|
134
|
+
<!-- readme-standards:begin example.usage -->
|
|
135
|
+
Source: [docs/readme/usage.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/docs/readme/usage.py).
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
from swarmauri_tool_jupytergetshellmessage import JupyterGetShellMessageTool
|
|
139
|
+
|
|
140
|
+
channels_url = "ws://localhost:8888/api/kernels/<kernel-id>/channels"
|
|
141
|
+
result = JupyterGetShellMessageTool()(channels_url, timeout=5.0)
|
|
142
|
+
|
|
143
|
+
if "messages" in result:
|
|
144
|
+
for msg in result["messages"]:
|
|
145
|
+
print(msg)
|
|
146
|
+
else:
|
|
147
|
+
print("Error:", result.get("error"))
|
|
148
|
+
```
|
|
149
|
+
<!-- readme-standards:end example.usage -->
|
|
150
|
+
|
|
151
|
+
### Configuration
|
|
152
|
+
|
|
153
|
+
Configure `swarmauri_tool_jupytergetshellmessage` through the APIs in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py); its [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml) describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.
|
|
154
|
+
|
|
155
|
+
### Error Handling
|
|
156
|
+
|
|
157
|
+
The inspected `swarmauri_tool_jupytergetshellmessage` source raises `RuntimeError`. Handle these at the calling boundary and consult the implementation for the triggering conditions.
|
|
158
|
+
|
|
159
|
+
### Best Practices
|
|
160
|
+
|
|
161
|
+
- Ensure you pass the correct kernel channels URL (including security tokens/cookies if your server requires them).
|
|
162
|
+
- Increase `timeout` if you expect long-running cells before shell replies are sent.
|
|
163
|
+
- Combine with notebook execution tools to capture both SHELL and IOPub messages for full observability.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Package Boundary
|
|
168
|
+
|
|
169
|
+
### What It Owns
|
|
170
|
+
|
|
171
|
+
`swarmauri_tool_jupytergetshellmessage` is located in `community` and owns a tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses. Source-declared APIs include `JupyterGetShellMessageTool`. The [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml) records its direct dependency boundary.
|
|
172
|
+
|
|
173
|
+
### Public API and Import Surfaces
|
|
174
|
+
|
|
175
|
+
Import namespace: `swarmauri_tool_jupytergetshellmessage`.
|
|
176
|
+
|
|
177
|
+
Source-declared exports or types: `JupyterGetShellMessageTool`.
|
|
178
|
+
|
|
179
|
+
Inspect [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py) for exact signatures; this inventory does not designate every internal module as stable.
|
|
180
|
+
|
|
181
|
+
### Entry Points
|
|
182
|
+
|
|
183
|
+
<!-- readme-standards:begin entry-points -->
|
|
184
|
+
- `swarmauri.tools` → `JupyterGetShellMessageTool` → `swarmauri_tool_jupytergetshellmessage:JupyterGetShellMessageTool`
|
|
185
|
+
<!-- readme-standards:end entry-points -->
|
|
186
|
+
|
|
187
|
+
### Injected Dependencies
|
|
188
|
+
|
|
189
|
+
The direct installation dependencies of `swarmauri_tool_jupytergetshellmessage` are `jupyter-client`, `ipykernel`, `swarmauri-core`, `swarmauri-base`, `swarmauri-standard`. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py).
|
|
190
|
+
|
|
191
|
+
### Protocol Consumers
|
|
192
|
+
|
|
193
|
+
Direct consumers in this checkout’s package manifests include `swarmauri_toolkit_jupytertoolkit`. These edges describe declared dependencies, not protocol-conformance evidence.
|
|
194
|
+
|
|
195
|
+
### Extensions
|
|
196
|
+
|
|
197
|
+
For `swarmauri_tool_jupytergetshellmessage`, use the source-declared public interfaces (`JupyterGetShellMessageTool`) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Operations and Readiness
|
|
202
|
+
|
|
203
|
+
### Operational Requirements
|
|
204
|
+
|
|
205
|
+
Operate `swarmauri_tool_jupytergetshellmessage` according to its actual entry points and collaborators. The dependency and Python requirements in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml) are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.
|
|
206
|
+
|
|
207
|
+
### Health and Observability
|
|
208
|
+
|
|
209
|
+
This README does not establish a standalone health endpoint for `swarmauri_tool_jupytergetshellmessage`. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.
|
|
210
|
+
|
|
211
|
+
### Security and Resource Limits
|
|
212
|
+
|
|
213
|
+
Apply the input, credential, and resource constraints implemented in [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py). The `swarmauri_tool_jupytergetshellmessage` README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.
|
|
214
|
+
|
|
215
|
+
### Compatibility
|
|
216
|
+
|
|
217
|
+
This source version of `swarmauri_tool_jupytergetshellmessage` declares Python `>=3.10,<3.15`. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Verification
|
|
222
|
+
|
|
223
|
+
### Tests
|
|
224
|
+
|
|
225
|
+
Run `python -m pytest tests/unit/test_readme_sources.py` from the `swarmauri_tool_jupytergetshellmessage` package directory for the maintained example source checks (Python compilation and non-Python file presence). Existing package tests include:
|
|
226
|
+
|
|
227
|
+
- [tests/unit/test_JupyterGetShellMessageTool.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/tests/unit/test_JupyterGetShellMessageTool.py)
|
|
228
|
+
- [tests/unit/test_JupyterGetShellMessageTool__init__.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/tests/unit/test_JupyterGetShellMessageTool__init__.py)
|
|
229
|
+
|
|
230
|
+
The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.
|
|
231
|
+
|
|
232
|
+
### Certification Status
|
|
233
|
+
|
|
234
|
+
No external certification is asserted for `swarmauri_tool_jupytergetshellmessage` by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.
|
|
235
|
+
|
|
236
|
+
### Evidence
|
|
237
|
+
|
|
238
|
+
The [README standards CI](https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml) records mechanical documentation results for its tested commit. The [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py) and example sources support the package-boundary description; external runtime behavior requires its own test evidence.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## FAQ
|
|
243
|
+
|
|
244
|
+
### Why
|
|
245
|
+
|
|
246
|
+
**Why select this package?** `swarmauri_tool_jupytergetshellmessage` provides a tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses; use its own API boundary rather than assuming neighboring packages are bundled or configured automatically.
|
|
247
|
+
|
|
248
|
+
### How
|
|
249
|
+
|
|
250
|
+
**How do I start?** Install or synchronize the environment under Getting Started, follow the maintained example for `swarmauri_tool_jupytergetshellmessage`, and consult [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py) for the exact types and signatures involved.
|
|
251
|
+
|
|
252
|
+
### When
|
|
253
|
+
|
|
254
|
+
**When should I validate an upgrade?** Recheck `swarmauri_tool_jupytergetshellmessage` whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## Documentation and Related Packages
|
|
259
|
+
|
|
260
|
+
### More Documentation
|
|
261
|
+
|
|
262
|
+
The [repository contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md), [package source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/swarmauri_tool_jupytergetshellmessage/JupyterGetShellMessageTool.py), and [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml) provide the supporting context for `swarmauri_tool_jupytergetshellmessage`. The [README policy](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md) defines the common document structure.
|
|
263
|
+
|
|
264
|
+
### Related Packages
|
|
265
|
+
|
|
266
|
+
- [swarmauri_base](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/20-bases/swarmauri_base/README.md): Reusable Swarmauri base classes, mixins, and dynamic Pydantic component models for composable intelligence infrastructure.
|
|
267
|
+
- [swarmauri_core](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/10-interfaces/swarmauri_core/README.md): Core interface contracts and shared types for Swarmauri composable intelligence infrastructure components.
|
|
268
|
+
- [swarmauri_standard](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/30-standard-kernel/swarmauri_standard/README.md): First-party Swarmauri standard components for agents, tools, parsers, vectors, model adapters, and composable intelligence workflows.
|
|
269
|
+
|
|
270
|
+
### Project Links
|
|
271
|
+
|
|
272
|
+
<!-- readme-standards:begin project-links -->
|
|
273
|
+
- [pypi: swarmauri_tool_jupytergetshellmessage](https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/)
|
|
274
|
+
<!-- readme-standards:end project-links -->
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Contributing
|
|
279
|
+
|
|
280
|
+
### How to Contribute
|
|
281
|
+
|
|
282
|
+
If you want to contribute to swarmauri-sdk, read up on our [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/contributing.md) that will help you get started.
|
|
283
|
+
|
|
284
|
+
### Development Setup
|
|
285
|
+
|
|
286
|
+
Work from the `pkgs/50-community/swarmauri_tool_jupytergetshellmessage` checkout. Synchronize its declared development environment with uv, then run the relevant package tests and `python -m pytest tests/unit/test_readme_sources.py`. The repository’s dedicated README job installs `readme-standards==0.1.3` without resolving unrelated runtime packages.
|
|
287
|
+
|
|
288
|
+
### Notes for Maintainers
|
|
289
|
+
|
|
290
|
+
Edit authored prose directly in this `swarmauri_tool_jupytergetshellmessage` README. Update source examples in `docs/readme/`, then run `readme-standards render --root . --write` from the package directory and review the diff. Required headings and generated blocks come from package-guide-v1.
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Governance
|
|
295
|
+
|
|
296
|
+
### Ownership and Decision Making
|
|
297
|
+
|
|
298
|
+
Changes to `swarmauri_tool_jupytergetshellmessage` follow the maintainer review process of [swarmauri/swarmauri-sdk](https://github.com/swarmauri/swarmauri-sdk) and its contribution guide. Author attribution remains in the [manifest](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/pyproject.toml); this README does not assign new publishing or administrative authority.
|
|
299
|
+
|
|
300
|
+
### Standards and Policies
|
|
301
|
+
|
|
302
|
+
`swarmauri_tool_jupytergetshellmessage` follows the versioned [package-guide-v1 outline](https://github.com/groupsum/readme-standards/blob/master/docs/outline.md). All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.
|
|
303
|
+
|
|
304
|
+
### Lifecycle and Migration
|
|
305
|
+
|
|
306
|
+
The `swarmauri_tool_jupytergetshellmessage` source version is `0.11.0`.
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## License and Attribution
|
|
311
|
+
|
|
312
|
+
### License
|
|
313
|
+
|
|
314
|
+
<!-- readme-standards:begin license -->
|
|
315
|
+
Licensed under `Apache-2.0`. See [LICENSE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/LICENSE).
|
|
316
|
+
<!-- readme-standards:end license -->
|
|
317
|
+
|
|
318
|
+
### Notices
|
|
319
|
+
|
|
320
|
+
<!-- readme-standards:begin notices -->
|
|
321
|
+
See [NOTICE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/NOTICE) for attribution.
|
|
322
|
+
<!-- readme-standards:end notices -->
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "swarmauri_tool_jupytergetshellmessage"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.11.0"
|
|
4
4
|
description = "A tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses."
|
|
5
5
|
license = "Apache-2.0"
|
|
6
6
|
readme = "README.md"
|
|
7
|
-
repository = "http://github.com/swarmauri/swarmauri-sdk/pkgs/community/swarmauri_tool_jupytergetshellmessage/"
|
|
7
|
+
repository = "http://github.com/swarmauri/swarmauri-sdk/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/"
|
|
8
8
|
requires-python = ">=3.10,<3.15"
|
|
9
9
|
classifiers = [
|
|
10
|
-
"License :: OSI Approved :: Apache Software License",
|
|
11
10
|
"Natural Language :: English",
|
|
12
11
|
"Development Status :: 3 - Alpha",
|
|
13
12
|
"Intended Audience :: Developers",
|
|
@@ -46,6 +45,7 @@ keywords = [
|
|
|
46
45
|
"execution",
|
|
47
46
|
"responses",
|
|
48
47
|
]
|
|
48
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
49
49
|
|
|
50
50
|
[tool.uv.sources]
|
|
51
51
|
swarmauri_core = { workspace = true }
|
|
@@ -72,6 +72,54 @@ log_cli_format = "%(asctime)s [%(levelname)s] %(message)s"
|
|
|
72
72
|
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
|
|
73
73
|
asyncio_default_fixture_loop_scope = "function"
|
|
74
74
|
|
|
75
|
+
[tool.readme_standards]
|
|
76
|
+
policy = "package-guide-v1"
|
|
77
|
+
readme = "README.md"
|
|
78
|
+
brand = "swarmauri"
|
|
79
|
+
brand_catalog = "../../../tools/readme/brands.toml"
|
|
80
|
+
repository = "https://github.com/swarmauri/swarmauri-sdk"
|
|
81
|
+
ref = "master"
|
|
82
|
+
package_path = "pkgs/50-community/swarmauri_tool_jupytergetshellmessage"
|
|
83
|
+
layer = "community"
|
|
84
|
+
lifecycle = "active"
|
|
85
|
+
license_file = "LICENSE"
|
|
86
|
+
notice_file = "NOTICE"
|
|
87
|
+
|
|
88
|
+
[tool.readme_standards.distributions.pypi]
|
|
89
|
+
name = "swarmauri_tool_jupytergetshellmessage"
|
|
90
|
+
published = true
|
|
91
|
+
|
|
92
|
+
[tool.readme_standards.examples.quick_start]
|
|
93
|
+
source = "docs/readme/quick_start.py"
|
|
94
|
+
test = "tests/unit/test_readme_sources.py"
|
|
95
|
+
language = "python"
|
|
96
|
+
expected_exit_code = 0
|
|
97
|
+
|
|
98
|
+
[tool.readme_standards.examples.usage]
|
|
99
|
+
source = "docs/readme/usage.py"
|
|
100
|
+
test = "tests/unit/test_readme_sources.py"
|
|
101
|
+
language = "python"
|
|
102
|
+
expected_exit_code = 0
|
|
103
|
+
|
|
104
|
+
[tool.readme_standards.statuses.readme]
|
|
105
|
+
label = "CI gate"
|
|
106
|
+
url = "https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"
|
|
107
|
+
|
|
108
|
+
[tool.readme_standards.statuses.tests]
|
|
109
|
+
label = "example source"
|
|
110
|
+
url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/tests/unit/test_readme_sources.py"
|
|
111
|
+
|
|
112
|
+
[tool.readme_standards.statuses.certification]
|
|
113
|
+
label = "not certified"
|
|
114
|
+
url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/50-community/swarmauri_tool_jupytergetshellmessage/README.md#certification-status"
|
|
115
|
+
|
|
116
|
+
[tool.readme_standards.statuses.governance]
|
|
117
|
+
label = "repository policy"
|
|
118
|
+
url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"
|
|
119
|
+
|
|
120
|
+
[tool.readme_standards.statuses.evidence]
|
|
121
|
+
label = "source and CI"
|
|
122
|
+
url = "https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"
|
|
75
123
|
[project.entry-points.'swarmauri.tools']
|
|
76
124
|
JupyterGetShellMessageTool = "swarmauri_tool_jupytergetshellmessage:JupyterGetShellMessageTool"
|
|
77
125
|
|
|
@@ -86,9 +134,10 @@ dev = [
|
|
|
86
134
|
"pytest-xdist>=3.6.1",
|
|
87
135
|
"pytest-json-report>=1.5.0",
|
|
88
136
|
"python-dotenv",
|
|
89
|
-
"
|
|
137
|
+
"httpx>=0.27",
|
|
90
138
|
"flake8>=7.0",
|
|
91
139
|
"pytest-timeout>=2.3.1",
|
|
92
140
|
"ruff>=0.9.9",
|
|
93
141
|
"pytest-benchmark>=4.0.0",
|
|
142
|
+
"readme-standards==0.1.3; python_version >= \"3.11\"",
|
|
94
143
|
]
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
"""
|
|
2
2
|
JupyterGetShellMessageTool.py
|
|
3
|
-
This module defines the JupyterGetShellMessageTool, a component that retrieves
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
This module defines the JupyterGetShellMessageTool, a component that retrieves
|
|
4
|
+
messages
|
|
5
|
+
from the Jupyter kernel's shell channel. It leverages the ToolBase and
|
|
6
|
+
ComponentBase
|
|
7
|
+
classes from the swarmauri framework to integrate with the system's tool
|
|
8
|
+
architecture.
|
|
9
|
+
The JupyterGetShellMessageTool supports retrieving and parsing messages for
|
|
10
|
+
diagnostic
|
|
11
|
+
purposes. It includes timeout-based handling to avoid hanging during message
|
|
12
|
+
retrieval.
|
|
8
13
|
"""
|
|
9
14
|
|
|
10
15
|
from typing import ClassVar, Callable, Any, Dict, List, Literal
|
|
@@ -24,16 +29,20 @@ logger = logging.getLogger(__name__)
|
|
|
24
29
|
@ComponentBase.register_type(ToolBase, "JupyterGetShellMessageTool")
|
|
25
30
|
class JupyterGetShellMessageTool(ToolBase):
|
|
26
31
|
"""
|
|
27
|
-
JupyterGetShellMessageTool is a tool designed to retrieve messages from the
|
|
28
|
-
|
|
32
|
+
JupyterGetShellMessageTool is a tool designed to retrieve messages from the
|
|
33
|
+
kernel's shell channel.
|
|
34
|
+
It listens for shell messages within a specified timeout, logs them for
|
|
35
|
+
diagnostics, and returns
|
|
29
36
|
the structured messages.
|
|
30
37
|
|
|
31
38
|
Attributes:
|
|
32
39
|
version (str): The version of the JupyterGetShellMessageTool.
|
|
33
|
-
parameters (List[Parameter]): A list of parameters that configure
|
|
40
|
+
parameters (List[Parameter]): A list of parameters that configure
|
|
41
|
+
message retrieval.
|
|
34
42
|
name (str): The name of the tool.
|
|
35
43
|
description (str): A brief description of the tool's functionality.
|
|
36
|
-
type (Literal["JupyterGetShellMessageTool"]): The type identifier for
|
|
44
|
+
type (Literal["JupyterGetShellMessageTool"]): The type identifier for
|
|
45
|
+
the tool.
|
|
37
46
|
"""
|
|
38
47
|
|
|
39
48
|
version: str = "1.0.0"
|
|
@@ -42,13 +51,19 @@ class JupyterGetShellMessageTool(ToolBase):
|
|
|
42
51
|
Parameter(
|
|
43
52
|
name="timeout",
|
|
44
53
|
input_type="number",
|
|
45
|
-
description=
|
|
54
|
+
description=(
|
|
55
|
+
"The time in seconds to wait for shell messages before "
|
|
56
|
+
"giving "
|
|
57
|
+
"up."
|
|
58
|
+
),
|
|
46
59
|
required=False,
|
|
47
60
|
),
|
|
48
61
|
]
|
|
49
62
|
)
|
|
50
63
|
name: str = "JupyterGetShellMessageTool"
|
|
51
|
-
description: str =
|
|
64
|
+
description: str = (
|
|
65
|
+
"Retrieves messages from the Jupyter kernel's shell channel."
|
|
66
|
+
)
|
|
52
67
|
type: Literal["JupyterGetShellMessageTool"] = "JupyterGetShellMessageTool"
|
|
53
68
|
|
|
54
69
|
# Public class attributes for patching.
|
|
@@ -67,13 +82,16 @@ class JupyterGetShellMessageTool(ToolBase):
|
|
|
67
82
|
|
|
68
83
|
def __call__(self, timeout: float = 5.0) -> Dict[str, Any]:
|
|
69
84
|
"""
|
|
70
|
-
Retrieves messages from the Jupyter kernel's shell channel within the
|
|
85
|
+
Retrieves messages from the Jupyter kernel's shell channel within the
|
|
86
|
+
specified timeout.
|
|
71
87
|
Args:
|
|
72
|
-
timeout (float, optional): The number of seconds to wait for shell
|
|
88
|
+
timeout (float, optional): The number of seconds to wait for shell
|
|
89
|
+
messages
|
|
73
90
|
before timing out. Defaults to 5.0.
|
|
74
91
|
|
|
75
92
|
Returns:
|
|
76
|
-
Dict[str, Any]: A dictionary containing all retrieved shell
|
|
93
|
+
Dict[str, Any]: A dictionary containing all retrieved shell
|
|
94
|
+
messages or an error message.
|
|
77
95
|
|
|
78
96
|
Example:
|
|
79
97
|
>>> tool = JupyterGetShellMessageTool()
|
|
@@ -81,14 +99,16 @@ class JupyterGetShellMessageTool(ToolBase):
|
|
|
81
99
|
>>> print(result)
|
|
82
100
|
{
|
|
83
101
|
'messages': [
|
|
84
|
-
{'header': {...}, 'parent_header': {...}, 'metadata':
|
|
102
|
+
{'header': {...}, 'parent_header': {...}, 'metadata':
|
|
103
|
+
{...}, 'content': {...}, 'buffers': [...]},
|
|
85
104
|
...
|
|
86
105
|
]
|
|
87
106
|
}
|
|
88
107
|
"""
|
|
89
108
|
messages = []
|
|
90
109
|
try:
|
|
91
|
-
# Use the private attribute that now holds the patched
|
|
110
|
+
# Use the private attribute that now holds the patched
|
|
111
|
+
# find_connection_file.
|
|
92
112
|
connection_file = find_connection_file()
|
|
93
113
|
client = BlockingKernelClient(connection_file=connection_file)
|
|
94
114
|
client.load_connection_file()
|
|
@@ -110,7 +130,9 @@ class JupyterGetShellMessageTool(ToolBase):
|
|
|
110
130
|
|
|
111
131
|
if not retrieved_any_message:
|
|
112
132
|
return {
|
|
113
|
-
"error":
|
|
133
|
+
"error": (
|
|
134
|
+
f"No shell messages received within {timeout} seconds."
|
|
135
|
+
)
|
|
114
136
|
}
|
|
115
137
|
|
|
116
138
|
return {"messages": messages}
|
|
@@ -5,7 +5,9 @@ import subprocess
|
|
|
5
5
|
|
|
6
6
|
def is_kernel_available(kernel_name):
|
|
7
7
|
result = subprocess.run(
|
|
8
|
-
["jupyter", "kernelspec", "list", "--json"],
|
|
8
|
+
["jupyter", "kernelspec", "list", "--json"],
|
|
9
|
+
capture_output=True,
|
|
10
|
+
text=True,
|
|
9
11
|
)
|
|
10
12
|
kernels = json.loads(result.stdout).get("kernelspecs", {})
|
|
11
13
|
return kernel_name in kernels
|
|
@@ -15,7 +17,9 @@ def ensure_kernel(kernel_name, display_name=None):
|
|
|
15
17
|
"""Ensure the Jupyter kernel exists; if not, install it."""
|
|
16
18
|
# Get the list of existing kernels
|
|
17
19
|
result = subprocess.run(
|
|
18
|
-
["jupyter", "kernelspec", "list", "--json"],
|
|
20
|
+
["jupyter", "kernelspec", "list", "--json"],
|
|
21
|
+
capture_output=True,
|
|
22
|
+
text=True,
|
|
19
23
|
)
|
|
20
24
|
kernels = json.loads(result.stdout).get("kernelspecs", {})
|
|
21
25
|
|
|
@@ -54,7 +58,7 @@ def main():
|
|
|
54
58
|
|
|
55
59
|
if not is_kernel_available(required_kernel):
|
|
56
60
|
raise RuntimeError(
|
|
57
|
-
f"Kernel '{required_kernel}' is not available. Please install it with 'python -m ipykernel install --user --name {required_kernel}'"
|
|
61
|
+
f"Kernel '{required_kernel}' is not available. Please install it with 'python -m ipykernel install --user --name {required_kernel}'" # noqa: E501
|
|
58
62
|
)
|
|
59
63
|
|
|
60
64
|
km = KernelManager(kernel_name=required_kernel)
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: swarmauri_tool_jupytergetshellmessage
|
|
3
|
-
Version: 0.10.1.dev2
|
|
4
|
-
Summary: A tool designed to retrieve shell messages from a running Jupyter kernel using jupyter_client, useful for debugging execution responses.
|
|
5
|
-
License-Expression: Apache-2.0
|
|
6
|
-
License-File: LICENSE
|
|
7
|
-
Keywords: swarmauri,tool,jupytergetshellmessage,designed,retrieve,shell,messages,running,jupyter,kernel,client,useful,debugging,execution,responses
|
|
8
|
-
Author: Jacob Stewart
|
|
9
|
-
Author-email: jacob@swarmauri.com
|
|
10
|
-
Requires-Python: >=3.10,<3.15
|
|
11
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
-
Classifier: Natural Language :: English
|
|
13
|
-
Classifier: Development Status :: 3 - Alpha
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
16
|
-
Classifier: Programming Language :: Python
|
|
17
|
-
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
-
Requires-Dist: ipykernel (>=6.29.5)
|
|
25
|
-
Requires-Dist: jupyter_client (>=8.6.3)
|
|
26
|
-
Requires-Dist: swarmauri_base
|
|
27
|
-
Requires-Dist: swarmauri_core
|
|
28
|
-
Requires-Dist: swarmauri_standard
|
|
29
|
-
Description-Content-Type: text/markdown
|
|
30
|
-
|
|
31
|
-

|
|
32
|
-
|
|
33
|
-
<p align="center">
|
|
34
|
-
<a href="https://pepy.tech/project/swarmauri_tool_jupytergetshellmessage/">
|
|
35
|
-
<img src="https://static.pepy.tech/badge/swarmauri_tool_jupytergetshellmessage/month" alt="PyPI - Downloads"/></a>
|
|
36
|
-
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_jupytergetshellmessage/">
|
|
37
|
-
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_jupytergetshellmessage.svg"/></a>
|
|
38
|
-
<a href="https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/">
|
|
39
|
-
<img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
|
|
40
|
-
<a href="https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/">
|
|
41
|
-
<img src="https://img.shields.io/pypi/l/swarmauri_tool_jupytergetshellmessage" alt="PyPI - License"/></a>
|
|
42
|
-
<a href="https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/">
|
|
43
|
-
<img src="https://img.shields.io/pypi/v/swarmauri_tool_jupytergetshellmessage?label=swarmauri_tool_jupytergetshellmessage&color=green" alt="PyPI - swarmauri_tool_jupytergetshellmessage"/></a>
|
|
44
|
-
</p>
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
# Swarmauri Tool Jupyter Get Shell Message
|
|
48
|
-
|
|
49
|
-
Retrieves shell-channel messages from a running Jupyter kernel using `jupyter_client`.
|
|
50
|
-
|
|
51
|
-
## Features
|
|
52
|
-
|
|
53
|
-
- Listens on the Jupyter kernel shell channel and captures raw message dicts.
|
|
54
|
-
- Returns a dict containing `messages` or an `error` key.
|
|
55
|
-
- Helpful for debugging live kernel communication during automated notebook workflows.
|
|
56
|
-
|
|
57
|
-
## Prerequisites
|
|
58
|
-
|
|
59
|
-
- Python 3.10 or newer.
|
|
60
|
-
- Access to a running Jupyter kernel (Notebook server, JupyterLab, etc.).
|
|
61
|
-
- `jupyter_client` and `websocket-client` (installed automatically).
|
|
62
|
-
|
|
63
|
-
## Installation
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
# pip
|
|
67
|
-
pip install swarmauri_tool_jupytergetshellmessage
|
|
68
|
-
|
|
69
|
-
# poetry
|
|
70
|
-
poetry add swarmauri_tool_jupytergetshellmessage
|
|
71
|
-
|
|
72
|
-
# uv (pyproject-based projects)
|
|
73
|
-
uv add swarmauri_tool_jupytergetshellmessage
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Quickstart
|
|
77
|
-
|
|
78
|
-
```python
|
|
79
|
-
from swarmauri_tool_jupytergetshellmessage import JupyterGetShellMessageTool
|
|
80
|
-
|
|
81
|
-
channels_url = "ws://localhost:8888/api/kernels/<kernel-id>/channels"
|
|
82
|
-
result = JupyterGetIOPubMessageTool()(channels_url, timeout=5.0)
|
|
83
|
-
|
|
84
|
-
if "messages" in result:
|
|
85
|
-
for msg in result["messages"]:
|
|
86
|
-
print(msg)
|
|
87
|
-
else:
|
|
88
|
-
print("Error:", result.get("error"))
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Tips
|
|
92
|
-
|
|
93
|
-
- Ensure you pass the correct kernel channels URL (including security tokens/cookies if your server requires them).
|
|
94
|
-
- Increase `timeout` if you expect long-running cells before shell replies are sent.
|
|
95
|
-
- Combine with notebook execution tools to capture both SHELL and IOPub messages for full observability.
|
|
96
|
-
|
|
97
|
-
## Want to help?
|
|
98
|
-
|
|
99
|
-
If you want to contribute to swarmauri-sdk, read up on our [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/contributing.md) that will help you get started.
|
|
100
|
-
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<a href="https://pepy.tech/project/swarmauri_tool_jupytergetshellmessage/">
|
|
5
|
-
<img src="https://static.pepy.tech/badge/swarmauri_tool_jupytergetshellmessage/month" alt="PyPI - Downloads"/></a>
|
|
6
|
-
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_jupytergetshellmessage/">
|
|
7
|
-
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/community/swarmauri_tool_jupytergetshellmessage.svg"/></a>
|
|
8
|
-
<a href="https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/">
|
|
9
|
-
<img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
|
|
10
|
-
<a href="https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/">
|
|
11
|
-
<img src="https://img.shields.io/pypi/l/swarmauri_tool_jupytergetshellmessage" alt="PyPI - License"/></a>
|
|
12
|
-
<a href="https://pypi.org/project/swarmauri_tool_jupytergetshellmessage/">
|
|
13
|
-
<img src="https://img.shields.io/pypi/v/swarmauri_tool_jupytergetshellmessage?label=swarmauri_tool_jupytergetshellmessage&color=green" alt="PyPI - swarmauri_tool_jupytergetshellmessage"/></a>
|
|
14
|
-
</p>
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# Swarmauri Tool Jupyter Get Shell Message
|
|
18
|
-
|
|
19
|
-
Retrieves shell-channel messages from a running Jupyter kernel using `jupyter_client`.
|
|
20
|
-
|
|
21
|
-
## Features
|
|
22
|
-
|
|
23
|
-
- Listens on the Jupyter kernel shell channel and captures raw message dicts.
|
|
24
|
-
- Returns a dict containing `messages` or an `error` key.
|
|
25
|
-
- Helpful for debugging live kernel communication during automated notebook workflows.
|
|
26
|
-
|
|
27
|
-
## Prerequisites
|
|
28
|
-
|
|
29
|
-
- Python 3.10 or newer.
|
|
30
|
-
- Access to a running Jupyter kernel (Notebook server, JupyterLab, etc.).
|
|
31
|
-
- `jupyter_client` and `websocket-client` (installed automatically).
|
|
32
|
-
|
|
33
|
-
## Installation
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
# pip
|
|
37
|
-
pip install swarmauri_tool_jupytergetshellmessage
|
|
38
|
-
|
|
39
|
-
# poetry
|
|
40
|
-
poetry add swarmauri_tool_jupytergetshellmessage
|
|
41
|
-
|
|
42
|
-
# uv (pyproject-based projects)
|
|
43
|
-
uv add swarmauri_tool_jupytergetshellmessage
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
## Quickstart
|
|
47
|
-
|
|
48
|
-
```python
|
|
49
|
-
from swarmauri_tool_jupytergetshellmessage import JupyterGetShellMessageTool
|
|
50
|
-
|
|
51
|
-
channels_url = "ws://localhost:8888/api/kernels/<kernel-id>/channels"
|
|
52
|
-
result = JupyterGetIOPubMessageTool()(channels_url, timeout=5.0)
|
|
53
|
-
|
|
54
|
-
if "messages" in result:
|
|
55
|
-
for msg in result["messages"]:
|
|
56
|
-
print(msg)
|
|
57
|
-
else:
|
|
58
|
-
print("Error:", result.get("error"))
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Tips
|
|
62
|
-
|
|
63
|
-
- Ensure you pass the correct kernel channels URL (including security tokens/cookies if your server requires them).
|
|
64
|
-
- Increase `timeout` if you expect long-running cells before shell replies are sent.
|
|
65
|
-
- Combine with notebook execution tools to capture both SHELL and IOPub messages for full observability.
|
|
66
|
-
|
|
67
|
-
## Want to help?
|
|
68
|
-
|
|
69
|
-
If you want to contribute to swarmauri-sdk, read up on our [guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/contributing.md) that will help you get started.
|
|
File without changes
|