Skip to main content
Pre-release

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.0rc1

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

Source distribution (sdist)

Source distribution for pyxis-harness-compaction 0.1.0rc1
File Size Uploaded Provenance Actions
pyxis_harness_compaction-0.1.0rc1.tar.gz 8.5 kB Without provenance Details for pyxis_harness_compaction-0.1.0rc1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyxis-harness-compaction 0.1.0rc1
File Interpreter ABI Platform Actions
pyxis_harness_compaction-0.1.0rc1-py3-none-any.whl Python 3 none any Details for pyxis_harness_compaction-0.1.0rc1-py3-none-any.whl

Total release size: 20.5 kB

Release files / pyxis_harness_compaction-0.1.0rc1.tar.gz

Download URL pyxis_harness_compaction-0.1.0rc1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b013960de76f3fd5114eb535fe97a3f07a52e851cf1778d2425061e25665f01f
BLAKE2b-256 checksum
How to use checksums
e698d0717cc7db541ad7fcdb827edf679b56807a4283b12a151eb8cdf879870b
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.0rc1-py3-none-any.whl

Download URL pyxis_harness_compaction-0.1.0rc1-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
107532659b9e4fe48cfe8a24839ef1a7e366dd141fc11b0394b621ea2dec2173
BLAKE2b-256 checksum
How to use checksums
b0cea58143ef6a3b8c7ebdf55a3e059bf1252d67e80e4910be5579cb4b3971ac
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.0rc1

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