Repository navigation
PowerContext v1.6.0
Not only memory, but a full story.
English
PowerContext v1.6.0 introduces knowledge bases and the stable Gateway. Bring existing documents into searchable, revisioned knowledge bases, and reduce the cost of building long-term memory by reusing the Agent conversation's cached prefix. This release also adds plugin hot reload, centrally managed Source collection, clearer recall diagnostics, and more reliable Agent integrations.
Knowledge bases: turn existing documents into searchable knowledge
- Introduce the knowledge-base plugin, with spaces and knowledge bases for organizing documents.
- Upload Markdown and PNG/JPEG/WebP images, or import files from allowed Server directories. Process images through OCR and retrieve content through revisioned chunks and hybrid search.
- Manage the workflow in the Dashboard: inspect processing, test retrieval, edit chunks, forget documents, and reprocess them.
- Preserve evidence and historical chunks for exact document revisions. Keep plugin-created Scopes out of general Scope listings.
- Support SQLite, seekdb, and OceanBase storage.
Install the knowledge-base plugin and its optional dependencies explicitly. PDF/Office ingestion and generated answers are not included in this release.
See the knowledge-base plugin and plugin Scope isolation.
Stable Gateway: reuse cached context to lower memory-extraction cost
- Promote Gateway from alpha to stable, with cache-aware Atomic Memory extraction for supported Responses conversations.
- Append extraction instructions after the exact Agent request and final response, preserving the prefix eligible for the provider's prompt cache. Core selects this path only when its estimate is cheaper than normal extraction; otherwise it falls back.
- Enable prefix extraction by default for supported upstreams and include built-in cost guidance in Responses requests. Conversation capture remains opt-in, and extraction requires the Server callback URL and generation model.
- Support prefix extraction through Codex subscriptions when Core is confirmed to be non-enforcing, using the same subscription account. Other subscriptions use normal extraction.
- Preserve distinct terminal-turn captures and forward
session-idto the Codex subscription endpoint for conversation continuity.
Cache hits reduce input billed at the uncached rate; they do not necessarily reduce the total number of input tokens. Cache misses and fallback calls can add cost, so savings depend on the workload, model, and provider cache behavior. Gateway continues to buffer complete responses for inspection before release; stable status does not introduce live token streaming.
See cached-prefix extraction, Codex subscription support, Gateway defaults, and session continuity.
Process Atomic Memory in one conversation
- Add
one_passprocessing to keep extraction, related-memory reconciliation, and re-checks in one conversation, with Core validation before publication. - Allow this multi-step conversation to run after the cached Agent prefix.
- Default to
one_passwhen the Server extraction callback URL is configured and no processing mode is explicitly selected. Other Server deployments and direct SDK use retainper_candidate.
The prefixed path also sends existing memories used for comparison to the Agent's model and account. Evaluate quality and total cost for your deployment.
See one-pass processing and one-pass extraction over the cached prefix.
Plugins and Source collection: connect more of your existing material
- Hot-reload directory plugins from validated snapshots and run plugin-owned data upgrades before activation.
- Expose declared plugin routes through OpenAPI and MCP.
- Collect Sources through Server and device runners using centrally managed collection targets.
Plugins own their data and upgrade logic. Back up plugin databases and local snapshots together with Core storage.
See plugin reload, upgrades, and APIs and Source collection.
Understand recall decisions and processing failures
- Inspect recall decisions and processing failures more clearly in the Dashboard, including Artifact publication, model-usage accounting, and provider failures.
- Retain same-execution prepare diagnostics separately from Sources and public body-free Receipts.
- Expose Experience recurrence effectiveness as a read-only projection.
- Improve recall of short related memories from long candidates, wait for Source configuration locks, allow Source capture during Experience incubation, and drain pending usage writes more reliably.
Private prepare diagnostics can contain queries and candidate/final text and have no automatic expiry. Account for this content when managing access, retention, and backups.
See recall diagnostics, publication diagnostics, provider failure evidence, and Experience effectiveness.
More integrations and native Gateway distribution
- Add a Deep Agents integration and expand provider-specific OAuth subscription adapters.
- Improve DSH companion-memory support, long-prompt recall, credential forwarding, and shared prompt-privacy handling across integrations.
- Add release packaging for Linux x86_64/arm64 and macOS Intel/Apple Silicon Gateway binaries, with SHA256 checksums, build identity, and a complete platform manifest.
- Verify unpacked binaries against a real Core and repeat verification after downloading published release assets.
Linux packages target glibc 2.28+; macOS packages target macOS 15+ and are unsigned and not notarized. Native Windows packages and Gateway container images are not included. Core and any provider CLI remain separately installed. Subscription routes retain their documented protocol and protection limits, and provider/account usage rules still apply.
See Deep Agents, OAuth subscriptions, and Gateway distribution.
Install and upgrade
uv tool install --force "powercontext[cli,server]==1.6.0"Upgrade Server, Gateway, SDK, CLI, and integrations together. Use powercontext-v1.6.0 for Agent integration refs and reopen Agent sessions after upgrading. Gateway remains optional. Install the knowledge-base plugin and optional dependencies separately according to its guide.
Gateway configuration:
- Enable conversation capture with
PC_GATEWAY_SEDIMENT=on. - Configure the Server extraction callback URL and generation model for cached-prefix memory extraction.
- Set
PC_GATEWAY_PREFIX_EXTRACTION=offorPC_GATEWAY_STEERING=offto disable prefix extraction or Responses cost guidance respectively. - Download native Gateway archives only from a release with all platform assets present and successful distribution verification.
Compatibility changes:
- The target database revision is
v1_6_0, followingv1_5_0_006. The release adds private prepare-diagnostics storage without backfilling historical queries. Existing managed databases require explicit maintenance. - Databases retaining legacy plugin registrations or data still have no supported in-place upgrade path. Uninstalling a plugin does not remove these records. Do not delete framework records manually to bypass migration checks.
- Development databases and recovery plans using the former PR-based Source collection revision or unpublished
000must be rebuilt; do not stamp them as released revisions. - The release upgrade gate retains all twelve registered 1.3.0 source/backend/configuration profiles. The separately registered 1.4.0 path is not certified by that gate.
For supported migration paths, stop writers, back up the complete database and configuration, inspect the migration plan, and restart only after full Server verification succeeds. Database upgrade support is limited to source-version, target-artifact, backend, and configuration combinations that pass full Server acceptance.
Guides: Knowledge bases · Gateway installation · Gateway deployment · Database migrations
中文
PowerContext v1.6.0 首次发布知识库,并推出 Gateway 正式版。将已有文档整理为可检索、可追溯版本的知识库;复用 Agent 对话的缓存前缀,降低构建长期记忆的成本。本次还带来插件热重载、集中管理的 Source 采集、更清晰的召回诊断,以及更可靠的 Agent 集成。
知识库首次发布:让已有文档成为可检索的知识
- 新增知识库插件,通过空间和知识库组织文档。
- 支持上传 Markdown、PNG/JPEG/WebP 图片,或从允许的 Server 目录导入文件;通过 OCR 处理图片,以版本化分块和混合检索查找内容。
- 在 Dashboard 中完成管理:查看处理状态、测试召回、编辑分块、遗忘文档和重新处理。
- 为精确文档版本保留证据和历史分块;插件创建的 Scope 不再出现在通用 Scope 列表中。
- 支持 SQLite、seekdb 和 OceanBase 存储。
知识库插件及其可选依赖需要显式安装。本次不包含 PDF/Office 导入和答案生成。
参见知识库插件和插件 Scope 隔离。
Gateway 正式版:复用缓存上下文,降低记忆提取成本
- Gateway 从 alpha 进入正式版,为支持的 Responses 对话提供缓存感知的 Atomic Memory 提取。
- 在 Agent 的精确请求和最终响应之后追加提取指令,保留供应商提示词缓存可复用的前缀。Core 仅在估算比常规提取更便宜时采用此路径,否则回退。
- 对支持的上游默认开启前缀提取,并在 Responses 请求中加入内置成本引导。对话采集仍需显式开启,提取还需要配置 Server 回调地址和生成模型。
- 在确认 Core 未强制执行保护时,支持通过 Codex 订阅复用前缀,使用同一订阅账户;其他订阅仍走常规提取。
- 保留不同终结回合的采集记录,并向 Codex 订阅端点转发
session-id,维持会话连续性。
缓存命中减少按非缓存价格计费的输入,不一定减少输入 token 总量。缓存未命中和回退调用可能增加成本,实际收益取决于负载、模型和供应商缓存行为。Gateway 仍在完整缓冲响应并检查后才释放内容;正式版不意味着新增实时 token 流式输出。
参见缓存前缀提取、Codex 订阅支持、Gateway 默认设置和会话连续性。
在同一段对话中完成 Atomic Memory 处理
- 新增
one_pass处理模式,将提取、相关记忆协调和复查放在同一段对话中完成,发布前仍由 Core 校验。 - 支持将这段多步对话接在 Agent 的缓存前缀之后运行。
- 配置 Server 提取回调地址且未显式指定处理模式时,默认使用
one_pass;其他 Server 部署和直接使用 SDK 时仍使用per_candidate。
前缀路径也会将参与比较的已有记忆发送给 Agent 使用的模型和账户。请结合实际部署评估质量和总成本。
参见one-pass 处理和缓存前缀上的 one-pass 提取。
插件与 Source 采集:接入更多已有资料
- 目录插件可从校验后的快照热重载,并在激活前执行插件自有的数据升级。
- 通过 OpenAPI 和 MCP 暴露插件声明的路由。
- 使用集中管理的采集目标,通过 Server runner 和设备 runner 采集 Source。
插件负责自身数据和升级逻辑。备份时需同时保留 Core 存储、插件数据库和本地快照。
看清召回决策与处理失败
- 在 Dashboard 中更清楚地查看召回决策和处理失败,包括 Artifact 发布、模型用量记账及供应商失败。
- 将同次执行的上下文准备诊断独立于 Source 和公开的不含正文的 Receipt 保存。
- 新增 Experience 重复出现效果的只读视图。
- 改进长候选对短相关记忆的召回,等待 Source 配置锁,允许 Experience 孵化期间采集 Source,并更可靠地完成待写入的用量记录。
私有上下文准备诊断可能包含查询、候选文本和最终文本,且不会自动过期。管理访问权限、保留策略和备份时,应考虑这些内容。
参见召回诊断、发布诊断、供应商失败证据和 Experience 效果。
更多集成与 Gateway 原生分发
- 新增 Deep Agents 集成,扩展各供应商的 OAuth 订阅适配器。
- 完善 DSH 伴侣记忆、长提示词召回、凭证转发,以及跨集成共享的提示词隐私处理。
- 增加 Linux x86_64/arm64 和 macOS Intel/Apple Silicon 的 Gateway 发布打包,包含 SHA256 校验、构建身份和完整平台清单。
- 使用解包后的二进制连接真实 Core 验证,并在下载已发布附件后重复验证。
Linux 包以 glibc 2.28+ 为基线;macOS 包要求 macOS 15+,未签名、未公证。本次不包含原生 Windows 包和 Gateway 容器镜像。Core 和所需的提供方 CLI 仍需单独安装。订阅路由仍受文档列明的协议与保护限制约束,并遵循供应商及账户的用量规则。
参见 Deep Agents、OAuth 订阅和 Gateway 分发。
安装与升级
uv tool install --force "powercontext[cli,server]==1.6.0"Server、Gateway、SDK、CLI 与集成需协调升级。Agent 集成引用使用 powercontext-v1.6.0,升级后重新打开 Agent 会话。Gateway 仍为可选组件;知识库插件和可选依赖请按指南单独安装。
Gateway 配置:
- 设置
PC_GATEWAY_SEDIMENT=on开启对话采集。 - 配置 Server 提取回调地址和生成模型,以使用缓存前缀记忆提取。
- 分别设置
PC_GATEWAY_PREFIX_EXTRACTION=off或PC_GATEWAY_STEERING=off,关闭前缀提取或 Responses 成本引导。 - 仅从四个平台附件齐全且分发验证成功的 Release 下载 Gateway 原生包。
兼容性变化:
- 目标数据库 revision 为
v1_6_0,接在v1_5_0_006之后。本次新增私有上下文准备诊断存储,不回填历史查询;已有托管数据库需要显式维护。 - 仍保留旧插件登记或数据的数据库,没有受支持的原地升级路径。 卸载插件不会删除这些记录,请勿手动删除框架记录来绕过迁移检查。
- 使用原 PR 编号命名的 Source 采集 revision 或未发布
000的开发数据库及恢复计划需要重建,不能直接标记为已发布 revision。 - 发布升级门禁保留全部十二种已登记的 1.3.0 来源、后端和配置组合;独立登记的 1.4.0 路径不由该门禁认证。
对于受支持的迁移路径,请先停止写入,完整备份数据库和配置,检查迁移计划,并在完整 Server 验证通过后再重启。数据库升级支持仅限于通过完整 Server 验收的源版本、目标产物、后端和配置组合。
使用指南:知识库 · Gateway 安装 · Gateway 部署 · 数据库迁移
Full Changelog: powercontext-v1.5.2...powercontext-v1.6.0