This release is a pre-release and may not be stable for production use.
pyxis-harness-compaction
上下文压缩:一条检查点摘要替换较早的历史。
| 项 | 值 |
|---|---|
| 条目 | compaction(base bundle) |
| 服务 | CompactionService,ctx.compaction |
| 注入 | agentLoop、llm |
文件
| 文件 | 内容 |
|---|---|
__init__.py |
导出 |
service.py |
CompactionService 及其中间件:压力下的自动压缩、/compact 命令 |
checkpoint.py |
检查点消息:标记、摘要提示词、上下文测量、切点选择、对话记录渲染 |
prompts.toml |
模型可见的文本 |
触发
| 方式 | 时机 | 原样保留 |
|---|---|---|
| 自动 | 模型调用之前;测得的上下文达到 threshold_ratio × 窗口 |
尾部,量为 retain_ratio × 窗口 |
| 手动 | /compact:一次 compact 类型的运行(POST /sessions/{id}/compact) |
无;整段历史进入摘要 |
| 失败 | 结果 |
|---|---|
| 自动压缩 | 记入日志;该轮继续 |
| 手动压缩 | 运行失败 |
测量
| 情况 | 上下文 token 数 |
|---|---|
| 有 usage | 最近一次模型应答的 usage(输入 + 输出 token)+ 其后消息的估算 |
| 无 usage(最初几步、刚压缩之后) | 全部消息的估算 |
| 窗口 | 来源 |
|---|---|
| 首选 | 模型声明的 context_window(设置 → 模型) |
| 否则 | default_context_window |
检查点
| 项 | 契约 |
|---|---|
| 切点 | 不拆开一次工具调用与它的结果 |
| 摘要模型 | 会话的模型;summary_model 覆盖 |
| 摘要提示词 | 结构化的检查点模板 |
| 替换消息 | 用户消息;additional_kwargs["pyharness"] 为 {"kind": "compact-checkpoint", ...} |
| Web UI | 显示为标记 |
| 运行流 | compact 事件 |
| 轮次记录 | compact 条目 |
prompts.toml
| 项 | 契约 |
|---|---|
| 表 | 以使用它的模块命名:[checkpoint]、[service] |
| 读取 | pyxis_harness.package_prompts;每个字符串值去掉首尾空白 |
| 占位符 | string.Template 语法(${name}) |
Metadata
Release files for pyxis-harness-compaction 0.1.1.dev2
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 |
|---|---|---|---|---|
| pyxis_harness_compaction-0.1.1.dev2.tar.gz | 8.6 kB | Without provenance | Details for pyxis_harness_compaction-0.1.1.dev2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyxis_harness_compaction-0.1.1.dev2-py3-none-any.whl | Python 3 | none | any | Details for pyxis_harness_compaction-0.1.1.dev2-py3-none-any.whl |
Total release size: 20.5 kB
Release files / pyxis_harness_compaction-0.1.1.dev2.tar.gz
| Download URL | pyxis_harness_compaction-0.1.1.dev2.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06e571398a4138fb30639df76925d8be5e07fb45f75ac2e33ada1d9126236b48
|
|
BLAKE2b-256 checksum How to use checksums |
d8eb1443878522e5e4609fe14525772cfa155c92fd5bebfb3f6fcaf7c92f0d69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pyxis_harness_compaction-0.1.1.dev2-py3-none-any.whl
| Download URL | pyxis_harness_compaction-0.1.1.dev2-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72fa39f913de5bee76e7b9fbd9d2f1139528768b52c69fcd11d093664ba39e05
|
|
BLAKE2b-256 checksum How to use checksums |
d2abe6a95febc7c43c4a85f3e546d585ce5bc66a0b2c5c56b4b5764fd692d2ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pyxis-harness-compaction 0.1.1.dev2
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.