Skip to main content

zettcode-monitor

A ZettCode plugin. It adds /monitor.

  • /monitor opens a panel in the style of /statusline: a Recording switch, an Images switch and an Export row. ↑ ↓ moves, ← → and space set the marked switch, enter saves both switches and closes (on the Export row it writes the report first, saves them too, and closes), and esc closes 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>.html in 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

pip install zettcode-monitor

It runs on ZettCode 0.1.11 and later, across the 0.1 and the 0.2 line (zettcode>=0.1.11,<0.3): the plugin API it is built on is the same in both, and 0.1.1 is the release that says so — 0.1.0 stopped at <0.2 and could not be installed beside a 0.2.x release. ZettCode 0.3 is a different plugin API, and the plugin for it is 0.2.0 or later. Install it into the same environment as ZettCode, then restart. With a uv tool install:

uv tool install --force --with zettcode-monitor zettcode

From a checkout of this repository:

uv tool install --force --with ./plugins/zettcode-monitor zettcode

Releasing

The version is __version__ in src/zettcode_monitor/__init__.py. Set it, commit, then tag and push:

git tag monitor-v0.1.1
git push origin monitor-v0.1.1

.github/workflows/release-monitor.yml checks the tag against the version, runs the tests, builds, and publishes with the same PYPI_API_TOKEN secret as zettcode. The monitor-v* tag is separate from zettcode's v* tag. The first publish needs the zettcode-monitor project name to be free on PyPI.

Test

Run this from plugins/zettcode-monitor:

PYTHONPATH=src <zettcode-venv>/bin/python -m pytest tests

This package is not a member of the root uv workspace, so make check does not cover it.

Metadata

Release files for zettcode-monitor 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zettcode-monitor 0.1.1
File Size Uploaded Provenance Actions
zettcode_monitor-0.1.1.tar.gz 24.5 kB Without provenance Details for zettcode_monitor-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zettcode-monitor 0.1.1
File Interpreter ABI Platform Actions
zettcode_monitor-0.1.1-py3-none-any.whl Python 3 none any Details for zettcode_monitor-0.1.1-py3-none-any.whl

Total release size: 47.4 kB

Release files / zettcode_monitor-0.1.1.tar.gz

Download URL zettcode_monitor-0.1.1.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bb10243d0e658e7b7563ced4104cff1bfae4bf8e6617cec1b8b468c16b040d34
BLAKE2b-256 checksum
How to use checksums
50f938c4ec2eb8ae2af450704e4e4a980bb9000bea69d59d95a52603cd529e4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / zettcode_monitor-0.1.1-py3-none-any.whl

Download URL zettcode_monitor-0.1.1-py3-none-any.whl
Size 22.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a29c5a8446a6dd40d19c1a5fd0b8d5b54312726ca36ed3935d1360125e7f3874
BLAKE2b-256 checksum
How to use checksums
e712917530d834df94737c1b72523ce6cb5fdc7001600deac2eed4b7f15d3c48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for zettcode-monitor 0.1.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page