zettcode-monitor
A ZettCode plugin. It adds /monitor.
/monitoropens a panel in the style of/statusline: a Recording switch, an Images switch and an Export row.↑ ↓moves,← →andspaceset the marked switch,entersaves both switches and closes (on the Export row it writes the report first, saves them too, and closes), andesccloses without saving. The command takes no arguments and has no subcommands.- Every session starts with recording off.
- Export writes an HTML report to
zettcode-monitor-<id8>.htmlin the workspace. - Images are off by default: a record keeps only an
[image]marker. Turn Images on and the data of images is stored and shown in the report (it makes the records much larger, since every turn repeats the whole request).
Each model call stores the full request (system prompt, messages, tools, parameters) and the full response (text, tool calls, usage), plus its duration and any error. Every turn stores the whole request again, so messages repeat between calls. Nothing is redacted.
Data lives in ~/.zettcode/monitor/<session-id>/. state.json holds the switches and calls.jsonl holds
the calls. The switches are read back when a session is resumed. ZETTCODE_MONITOR_DIR changes the root.
Install
ZettCode carries this plugin as an extra, so one command installs both into the same environment:
pip install "zettcode[monitor]"
or, with uv tool:
uv tool install "zettcode[monitor]"
pip install zettcode-monitor beside an installed ZettCode is the same thing, for a program that pins or vendors its
plugins itself. Restart afterwards, and /monitor is there.
It runs on ZettCode 0.4 and later (zettcode-plugin-api>=0.4,<0.5): that is the API built on
PluginContext, TuiPlugin and the three groups. The 0.1.1 release on PyPI is the one for the older
TerminalPlugin / TerminalContainer API: it declares zettcode>=0.1.11,<0.3. From a checkout of this repository:
uv tool install --force --with ./packages/zettcode-monitor zettcode
Releasing
The version is __version__ in src/zettcode/monitor/__init__.py. Set it, commit, then tag and push (the tag names
the version you just set):
git tag monitor-v0.2.1
git push origin monitor-v0.2.1
.github/workflows/release-packages.yml releases every plugin in this repository, this one included: it reads the
version from the package and asks PyPI, so a version PyPI already has is skipped rather than failing, and
re-pushing a tag whose version is already published succeeds without publishing anything. The tag is
<name>-v<version>, where the name is monitor (the plugin's entry-point name) or zettcode-monitor (its
directory); it is separate from zettcode's v* tag. Running the workflow by hand releases the same way, and ticking
all with no package named releases every plugin whose version PyPI does not have. The first publish needs the
zettcode-monitor project name to be free on PyPI.
The workflow installs ./zettcode and this plugin from the same checkout and runs the tests on Python 3.10 and 3.15,
so tag this only from a commit whose zettcode-plugin-api version the plugin's zettcode-plugin-api>=0.4,<0.5
allows.
When ZettCode starts a new line — 0.5, say — publish this plugin first, with its zettcode range widened to allow
both lines (>=0.4,<0.6), and only then release the new ZettCode whose monitor extra names it. The other order
leaves a window in which pip install "zettcode[monitor]" cannot resolve, because the extra would name a plugin that
does not accept the version being installed.
Test
The plugin is a member of this repository's uv workspace, so it is developed and tested in the one environment the workspace syncs. From the repository root:
make test # the program and every plugin
uv run pytest packages/zettcode-monitor/tests # this plugin alone
Metadata
Release files for zettcode-monitor 0.4.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zettcode_monitor-0.4.7.tar.gz | 26.3 kB | Without provenance | Details for zettcode_monitor-0.4.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zettcode_monitor-0.4.7-py3-none-any.whl | Python 3 | none | any | Details for zettcode_monitor-0.4.7-py3-none-any.whl |
Total release size: 49.7 kB
Release files / zettcode_monitor-0.4.7.tar.gz
| Download URL | zettcode_monitor-0.4.7.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
840f5ce10855dbfe1fb2acb7ed67f39f87f8596e21e1d622775dd88eecefe7f8
|
|
BLAKE2b-256 checksum How to use checksums |
cfe49a4006d7ccb94758be2beb03cd125f23ff7e4ef88d33661617eb6c4a1d61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / zettcode_monitor-0.4.7-py3-none-any.whl
| Download URL | zettcode_monitor-0.4.7-py3-none-any.whl |
|---|---|
| Size | 23.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e648620fa2f2f4c069a96003dbe3eeb4ef7078a7c24fbba9e62cbf7541a2b3c0
|
|
BLAKE2b-256 checksum How to use checksums |
7db8e2e6a9c3390a2c040176186261df30d86d371f11f930eeaca5025cfb08fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for zettcode-monitor 0.4.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.