zettcode-recap
A ZettCode plugin. It adds /recap, and writes one on its own when you step away.
A recap is one sentence about where the session is: the goal, what is done, and the next thing to do. It is for a reader coming back to a long conversation — the model's own context is not touched, and neither the question nor the answer is stored as part of the conversation.
/recapwrites one now, whatever the clock says. It needs a request to have finished. While the model answers, the pinned row saysRecap … writing, and Ctrl-C or Escape stops it; the answer follows as a quoted message.- On its own, once no new turn has started for long enough and the conversation is worth summarising: at least 3
messages you typed, and at least 2 since the last recap. The delay is
min(after_seconds, 0.8 × cache_ttl_seconds), which is 180 seconds by default (the provider's prompt cache is likely cold by then, so waiting longer only costs more). Any new turn cancels a recap that is waiting or being written: it would be news about a conversation that has moved on. It is the reader's own activity that is measured, not the window — somebody reading the last answer is still there, and somebody who switched to another application after a turn is as idle as one reading.
The summary is requested with cache="read": the conversation's warm prompt-cache prefix is reused, and the recap's
own words are not written into the cache. It runs with no tools, a 60-second deadline, and a prompt that asks for
under 40 words and no markdown.
Settings
Each setting has a default and can be overridden in config.toml; your value wins:
[plugins.recap]
after_seconds = 180 # how long no new turn may start
cache_ttl_seconds = 300 # the provider's prompt-cache lifetime; the delay is 0.8 of it
min_messages = 3 # messages you typed before a recap is worth writing
min_since_recap = 2 # and messages since the last one
A value of the wrong type is refused when the plugin loads, naming the table and the key.
The automatic recap needs nothing of the terminal but turns; the focus hook the shell offers is not used. A recap waiting when the program exits ends with it.
Install
From a checkout of this repository:
uv tool install --force --with ./plugins/zettcode-recap zettcode
or, with pip in the environment ZettCode runs in:
pip install ./plugins/zettcode-recap
There is no zettcode[recap] extra yet: the plugin has not been released, and an extra that names a package no index
carries would break pip install "zettcode[recap]". The release workflow is in place (recap-v*), and the extra
lands with the first release.
It runs on ZettCode 0.3 and later (zettcode>=0.3,<0.4), whose terminal group has the turn hooks this plugin is
built on.
Metadata
Release files for zettcode-recap 0.1.0
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_recap-0.1.0.tar.gz | 11.2 kB | Without provenance | Details for zettcode_recap-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zettcode_recap-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for zettcode_recap-0.1.0-py3-none-any.whl |
Total release size: 19.7 kB
Release files / zettcode_recap-0.1.0.tar.gz
| Download URL | zettcode_recap-0.1.0.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8791ce4be6303cd09234e25d73fb2151e18c0167f6cd8fc2c79f2af43e8e8d9
|
|
BLAKE2b-256 checksum How to use checksums |
e239cc6068f0f2463fe6830fc8a5cb0436d0115177986dae9a3017451213bd50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / zettcode_recap-0.1.0-py3-none-any.whl
| Download URL | zettcode_recap-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce6348cb5fe7453d93fb7545457987edb828e814fd91790e20c1c48b88bf7a8f
|
|
BLAKE2b-256 checksum How to use checksums |
72646f49afffc4b2a015cb6766a95cbf63d171e934e056eec41f04042dc2e9bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for zettcode-recap 0.1.0
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.