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

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.0rc2
File Size Uploaded Provenance Actions
pyxis_harness_compaction-0.1.0rc2.tar.gz 8.5 kB Without provenance Details for pyxis_harness_compaction-0.1.0rc2.tar.gz

Built distribution (wheel)

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

Total release size: 20.5 kB

Release files / pyxis_harness_compaction-0.1.0rc2.tar.gz

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

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

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