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.1.dev1

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.1.dev1
File Size Uploaded Provenance Actions
pyxis_harness_compaction-0.1.1.dev1.tar.gz 8.6 kB Without provenance Details for pyxis_harness_compaction-0.1.1.dev1.tar.gz

Built distribution (wheel)

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

Total release size: 20.5 kB

Release files / pyxis_harness_compaction-0.1.1.dev1.tar.gz

Download URL pyxis_harness_compaction-0.1.1.dev1.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2360c216ee91e9b6b78ee61833468e9f1e8e180a00b81e788b554eaac327a3dc
BLAKE2b-256 checksum
How to use checksums
eb9b76e366a2aec73e48eccd5b018c0d96ce35187b387485735382c2fb1bed0a
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.dev1-py3-none-any.whl

Download URL pyxis_harness_compaction-0.1.1.dev1-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a1a143e7d79ab568cdd2e638f043057f012a46b0616aba4c091d6655a67b0db
BLAKE2b-256 checksum
How to use checksums
ceb4e645277b4f98c3a150067f0819df900d6a8a0151a9a4164f301bfcc143e7
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.dev1

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