Skip to content

PowerContext v1.1.0

Choose a tag to compare

@Teingi Teingi released this 21 Sep 02:27
· 115 commits to master since this release
86e687f

PowerContext v1.1.0

Expand recall on demand · Review failures and revise Experiences · Unify tag management · Improve Agent handoffs and diagnostics

按需补充检索 · 复盘失败、修订经验 · 统一标签管理 · 增强 Agent 交接与诊断

Release tag: powercontext-v1.1.0 · Python package: powercontext==1.1.0

English

Work that spans sessions and Agents needs relevant history, a record of failures that keep returning, and a way to carry topic knowledge and current progress into the next execution.

PowerContext 1.1.0 adds an optional recall sufficiency gate and evidence-based recurring failure records, extends tags to every built-in Artifact family, and integrates native MiniMax embeddings. It also improves Topic Memory management, Pi and OpenClaw work continuity, host diagnostics, and remote Source processing and provenance.

Four highlights

  1. Expand recall on demand
  2. Review failures and revise Experiences
  3. Unify tag management
  4. Improve Agent handoffs and diagnostics

Detailed changes

1. Expand thin recall within explicit limits

An optional Recall Sufficiency Gate evaluates candidate counts, family coverage, and lexical signals during prepare_context to decide whether another search is useful.

  • Disabled by default; when enabled, it can run at most two additional searches with progressively relaxed admission thresholds.
  • Preserves the request's Scopes, Artifact families, result limits, and context byte budget, and reuses existing query embeddings.
  • Makes its assessment without an additional generation-model call; expansion failures retain the first-round recall results.
  • Lexical recall excludes recognized standalone execution instructions, such as English directives not to call tools appended to a question, while retaining explicitly quoted search terms. This is a conservative lexical rule; matching words still do not establish semantic relevance.
  • During context preparation, empty Topic Scopes skip query embedding. When Topics exist, each query embedding attempt has a 250 ms budget before falling back to full-text search; expansion rounds reuse that choice within the same request. Direct Topic search retains the configured inference timeout.

2. Manage Topic Memory and tags across all Artifact families

Applications can now manage evolving topic knowledge through a shared interface, making information from long-running tasks easier to inspect, organize, and reuse.

  • Create and replace Topic Memory through the generic Artifact APIs, and read current content, exact revisions, revision history, and lineage.
  • Tag all seven built-in Artifact families: Memory, Topic Memory, Experience, Skill, Handoff, Profile, and Prompt. Read and replace tags, filter listings, and query across families while preserving tags across content revisions.
  • Publish an exact Topic Memory revision to another Scope, then read and search the published content in that Scope.
  • Manage Topic Memory processing Prompts by Scope to customize topic extraction and update instructions.

A Prompt must be saved as an Artifact before it can be tagged; an unsaved built-in default Prompt has no independent tag set.

Automatic topic generation still requires a configured Generation model and background processing. Capturing a Source confirms that evidence was saved; processing results determine whether a topic was created or updated.

3. Track recurring failures with evidence for Experience revisions

Experiences can carry structured failure information: an identifying cue, a repair surface, and verification conditions. Task Outcomes, Handoffs, and receipt evidence support records of Experience selection, failure recurrence, and verified avoidance.

  • Associates failures with Experiences through normalized exact matching, recording unmatched or ambiguous cases; similar wording alone does not increment recurrence counts.
  • Keeps replayable, idempotent records and exposes recurrence data in Scope statistics.
  • Can propose a revision for review after the same failure recurs three consecutive times against one Experience revision, when the repair surface is Experience content. Other repair surfaces remain visible in statistics without automatic Artifact changes.
  • Checks failure evidence and revision targets during review. Revisions require explicit approval; this workflow does not automatically modify code, install Skills, or execute repairs.

4. More complete work continuity in Pi and OpenClaw

Pi now satisfies the project's Full core integration profile. In addition to recall and capture, it provides:

  • Memory change history, current-Scope statistics, Topic Memory search, and exact-revision reads.
  • Work Contracts, structured Handoffs, receiver acknowledgements, and Task Outcomes to record objectives, handoff state, and execution results.
  • Experience and Skill Candidate generation, plus read-only Artifact and Candidate inspection.
  • Discovery and resolution of local External Skills, with import available after explicit confirmation.

Explicit durable writes in Pi require interactive confirmation. Generated Candidates still require explicit review; generation does not automatically approve or install a Skill.

OpenClaw adds /pc commands and work coordination workflows for checking service status, creating Work Contracts, preparing and committing Handoffs, acknowledging receipt, and recording Task Outcomes.

Agent guidance and Skill routing are also aligned across integrations, helping Agents select retrieval, save, handoff, or inspection operations and read the relevant guidance on demand.

5. Inspect context metrics and trace recall and writes

  • Claude Code: A native status line shows estimated token reduction for the current Scope today and over the last 30 days, while preserving unrelated custom status lines.
  • OpenCode: A PowerContext TUI command entry point provides access to operations, with connection status and token reduction estimates in the status line.
  • Codex: A turn-end Hook reports estimated token reduction for the current Scope in the interactive TUI. The message is not rendered in codex exec text output.
  • DeepSeek Harness: /pc exposes observed recall and capture status with diagnostic information.
  • Server tracing: Additional Source capture, Memory processing, and commit spans complement model-call traces to help locate latency and failures.

Token figures come from the recall-context estimator and describe compression for individual recall calls. They are not provider-verified billing savings or end-to-end task savings. When recall increases context usage, the display reports cost.

6. Easier access to Profiles, Experiences, and Handoffs

  • Read Profile content in the personal Dashboard.
  • Export the Handoff content shown in the Dashboard as Markdown, preserving multiline text and code formatting for copying, archiving, and handoff.
  • List and read Experiences through dedicated CLI commands.

7. Native MiniMax embedding support

A native MiniMax adapter uses the provider's request format and distinguishes document embeddings from query embeddings. A MiniMax endpoint or minimax: model prefix selects this adapter, with batching, timeouts, vector count and dimension validation, and detection of provider errors returned inside HTTP 200 responses.

8. Reliability and compatibility improvements

  • Shared authorization-filter derivation and a consistent policy snapshot boundary for access decisions.
  • Fewer database transactions for Scope statistics, plus batched SQLite vector completeness checks that detect stale Memory references and missing or mismatched vectors.
  • Improved Windows command encoding, native service status inspection, and OpenCode file URI handling.
  • Native Codex MCP authentication verification on Windows to detect cases where configuration appears complete but the host cannot connect.
  • Preserves dynamically registered Source types and identifiers, including accepted Unicode characters and interior spaces, across Artifact listings, details, and historical revisions.
  • Processes persisted remote Source text evidence alongside built-in Sources for Topic Memory, preserving the original Source references in generated revisions.
  • Distinguishes missing Memory entries from pending ownership information for callers with Scope read access, avoiding a temporary-unavailable response for an absent entry.
  • Supports Markdown Handoff Reports over MCP, aligns the trailing slash in Codex MCP URLs, and extends the outer WorkBuddy prompt Hook timeout to 30 seconds.
  • Broader cross-platform tests, pinned CI dependencies, and improved evidence checks, along with fixes for Windows paths and CRLF document handling.

Install and verify

Install the CLI and Server:

uv tool install --force "powercontext[cli,server]==1.1.0"

For a new installation, follow the Quick Start to configure and start the Server. Install the Agent integration from the matching release tag, for example with Codex:

powercontext setup codex --ref powercontext-v1.1.0
powercontext doctor codex

Check the running service from a client environment configured with the Server address and authentication:

powercontext doctor
powercontext ready
powercontext capabilities

Python applications can install the Client SDK separately:

uv add "powercontext[client]==1.1.0"

Upgrade notes

  • Upgrade the Server, clients, and Agent integrations together. Use the powercontext-v1.1.0 tag for integrations; individual plugin manifests retain their own version numbers. Restart the Server and host sessions after updating.
  • Back up the database and configuration first. Version 1.1.0 upgrades legacy tag-table constraints during Server startup to support tags across all built-in Artifact families and adds recurring failure record tables. Stop old Server instances, let one upgraded instance complete the schema upgrade, and then start the remaining instances.
  • Check Artifact processing migration for older deployments. If an existing database has not completed its processing-state migration, follow the migration guide to plan, perform maintenance, and verify. Resume writes and background processing only after verification reports ready: true. New empty databases initialize automatically.
  • Account for client field and query-scope changes. SourceTypeReference.source_type is now an open string; Python callers should use the value directly instead of accessing an enum's .value. Tag queries that omit families cover all seven families; specify families explicitly to retain a narrower selection.
  • Enable the recall gate when needed. RuntimeConfig.recall_gate_enabled remains false by default. Enabling it can add searches, so evaluate retrieval results and latency on your own tasks.
  • The Dashboard remains opt-in and requires static Bearer authentication. Windows support remains experimental. Embedded seekDB is available only on supported macOS and Linux environments.
  • Check each integration's capabilities and runtime requirements. Pi and OpenClaw are community integrations. The OpenClaw integration requires Node.js 24.15 or newer within the 24.x line, plus pnpm.

Links

Thank you to everyone who contributed code, documentation, tests, and issue reports.

中文

当任务跨越多个会话和 Agent,需要找回与当前问题相关的历史、跟踪反复出现的失败,并把主题知识和工作进度交给下一次执行。

PowerContext 1.1.0 增加可选的召回充分性门控和基于证据的重复失败记录,将标签能力扩展到全部内置 Artifact 类型,并接入 MiniMax 原生 Embedding。版本同时完善 Topic Memory 管理、Pi 与 OpenClaw 工作延续、宿主内诊断,以及远程 Source 的处理和溯源。

详细更新

1. 召回不足时进行有边界的补充搜索

新增可选的 Recall Sufficiency Gate,在 prepare_context 中通过候选数量、类型覆盖和词法匹配等信号判断是否需要补充搜索。

  • 默认关闭;启用后最多追加两轮搜索,逐步放宽候选准入阈值。
  • 保持请求原有的 Scope、Artifact 类型、条数限制和上下文字节预算,复用已有查询向量。
  • 判断过程不调用额外的生成模型;扩展失败时保留首轮召回结果。
  • 词法召回排除已识别的独立执行指令,例如问题后附带的 Do not call tools,保留显式引号中的检索词。这是保守的词法规则,词语匹配仍不等同于语义相关。
  • 上下文准备时,空 Topic Scope 不请求查询 Embedding;有 Topic 时,每次查询 Embedding 尝试限定为 250 ms,超时回退到全文检索,并在同一请求的扩展轮次中复用该选择。直接 Topic 搜索继续使用配置的推理超时。

2. 统一管理 Topic Memory 与全部 Artifact 标签

持续演进的主题知识现在可以通过统一接口管理,便于应用读取、整理和复用长期任务中的信息。

  • 通过通用 Artifact API 创建和替换 Topic Memory,读取当前内容、指定修订、修订历史及证据链。
  • 标签覆盖全部七类内置 Artifact:Memory、Topic Memory、Experience、Skill、Handoff、Profile 和 Prompt。支持标签读写、筛选列表与跨类型查询,标签随逻辑对象跨修订保留。
  • 将指定 Topic Memory 修订发布到其他 Scope,在目标 Scope 中读取和检索发布后的内容。
  • 按 Scope 管理 Topic Memory 处理 Prompt,定制主题提炼与更新的指引。

Prompt 必须保存为 Artifact 后才能添加标签;未保存的内置默认 Prompt 没有独立标签集。

自动主题生成仍需要配置 Generation 模型和后台处理。采集到 Source 表示证据已保存,主题是否生成或更新需以处理结果为准。

3. 记录重复失败,让经验修订有证据可查

Experience 可携带结构化失败信息,包括失败识别线索、修复面和验证条件。系统结合 Task Outcome、Handoff 与接收凭据,记录经验被选用、失败再次发生和问题经验证已避免的证据。

  • 使用规范化后的精确匹配关联失败与 Experience,记录无法匹配或存在歧义的情况;相似描述不会直接增加复发计数。
  • 保留可重放、幂等的记录,并在 Scope 统计中提供复发数据。
  • 当同一 Experience 修订的同一失败连续复发三次,且修复面为经验内容时,可提出待审核的修订;其他修复面保留统计,不自动改写 Artifact。
  • 审核流程检查失败证据与修订目标。修订需显式批准,系统不会据此自动修改代码、安装 Skill 或执行修复。

4. Pi 与 OpenClaw 提供更完整的工作延续流程

Pi 达到项目定义的 Full 核心集成能力档位,在现有召回和采集能力上增加:

  • Memory 变更历史、当前 Scope 统计,以及 Topic Memory 搜索与精确修订读取。
  • Work Contract、结构化 Handoff、接收确认和 Task Outcome,记录工作目标、交接状态与执行结果。
  • Experience、Skill 的 Candidate 生成,以及 Artifact 和 Candidate 的只读查看。
  • 本机 External Skill 的发现、解析与显式确认后的导入。

Pi 的显式持久化写入需要交互确认;生成 Candidate 后仍需显式审核,生成操作不会自动批准或安装 Skill。

OpenClaw 新增 /pc 命令和工作协调流程,支持查看服务状态、创建 Work Contract、准备和提交 Handoff、确认接收以及记录 Task Outcome。

各宿主的 Agent 指引与 Skill 路由也得到统一,帮助 Agent 根据任务选择检索、保存、交接或查看操作,并按需读取相关指引。

5. 在 Agent 宿主中查看上下文指标,追踪召回与写入

  • Claude Code:通过原生状态栏显示当前 Scope 当日及近 30 天的 token 缩减估算,保留用户已有的其他自定义状态栏。
  • OpenCode:新增 PowerContext TUI 命令入口,在状态栏显示连接状态和 token 缩减估算。
  • Codex:通过回合结束 Hook 显示当前 Scope 的 token 缩减估算。提示出现在交互式 TUI 中;codex exec 的文本输出不展示该提示。
  • DeepSeek Harness:通过 /pc 查看实际观察到的召回、采集状态及诊断信息。
  • Server tracing:补充 Source 采集、Memory 处理和提交阶段的追踪,便于结合已有模型调用记录定位处理耗时与失败位置。

token 数值来自召回上下文估算,用于观察单次召回的压缩效果;它不代表模型服务商确认的账单节省,也不等同于完整任务的端到端节省。当召回增加上下文用量时,界面会显示 cost。

6. 更方便地查看 Profile、Experience 与交接内容

  • 在个人 Dashboard 中读取 Profile 内容。
  • 将 Dashboard 展示的 Handoff 内容导出为 Markdown,保留多行文本和代码格式,便于复制、存档与交接。
  • 通过专用 CLI 命令列出和读取 Experience。

7. 支持 MiniMax 原生 Embedding

新增 MiniMax 原生向量适配器,按其接口格式发送请求,并区分文档与查询向量。配置 MiniMax 地址或 minimax: 模型前缀后使用原生适配器,支持批量请求、超时、向量数量与维度校验,并识别 HTTP 200 响应中的业务错误。

8. 稳定性与兼容性改进

  • 统一访问控制中的权限过滤推导,并在一致的策略快照边界内完成授权决策。
  • 减少 Scope 统计读取中的数据库事务,合并 SQLite 向量完整性检查,并识别过期的 Memory 引用和缺失或不匹配的向量。
  • 改进 Windows 命令编码、原生服务状态检查和 OpenCode 文件 URI 处理。
  • 在 Windows 上验证 Codex 原生 MCP 认证,减少配置看似完成但宿主实际无法连接的情况。
  • 保留动态注册 Source 的类型和标识,包括允许的 Unicode 字符与内部空格,使 Artifact 列表、详情和历史修订保留完整来源引用。
  • Topic Memory 可使用已持久化的远程 Source 文本证据,与内置 Source 一起处理,生成的修订继续引用原始 Source。
  • 对已有 Scope 读取权限的调用方,准确区分不存在的 Memory 条目与所有者信息待写入状态,避免将不存在的条目误报为临时不可用。
  • 支持通过 MCP 获取 Markdown 格式的 Handoff Report,统一 Codex MCP 地址的尾部斜杠,并将 WorkBuddy 提示 Hook 的外层超时扩展到 30 秒。
  • 完善跨平台测试、CI 依赖固定和证据检查,修复 Windows 路径及 CRLF 文档处理问题。

安装与验证

安装 CLI 和 Server:

uv tool install --force "powercontext[cli,server]==1.1.0"

首次使用请按快速开始完成配置并启动 Server。将 Agent 集成安装到相同发布 tag,例如 Codex:

powercontext setup codex --ref powercontext-v1.1.0
powercontext doctor codex

在已经配置好 Server 地址和认证的客户端环境中,检查运行状态:

powercontext doctor
powercontext ready
powercontext capabilities

Python 应用可单独安装 Client SDK:

uv add "powercontext[client]==1.1.0"

升级说明

  • 同步升级 Server、客户端和 Agent 集成。 集成使用 powercontext-v1.1.0 tag;各插件清单保留各自独立的版本号。更新完成后重启 Server 和宿主会话。
  • 升级前备份数据库和配置。 1.1.0 在 Server 启动时升级旧标签表约束,以支持全部内置 Artifact 类型的标签,并增加重复失败记录表。先停止旧 Server 实例,再由一个升级后的实例完成结构升级,之后再启动其他实例。
  • 旧部署检查 Artifact 处理迁移。 对于尚未完成处理状态迁移的旧数据库,按迁移指南执行计划、维护和验证;验证返回 ready: true 后再恢复写入及后台处理。新空数据库会自动初始化。
  • 留意客户端字段和查询范围变化。 SourceTypeReference.source_type 现在是开放字符串;使用该字段的 Python 代码应直接读取字符串,不再访问枚举的 .value。标签查询省略 families 时覆盖全部七类;需要原有范围时请显式指定类型。
  • 召回门控按需启用。 RuntimeConfig.recall_gate_enabled 默认仍为 false;开启后可能增加检索次数,应结合自己的任务评估结果与延迟。
  • Dashboard 仍需显式启用并配置静态 Bearer 认证。 Windows 支持仍为实验性;嵌入式 seekDB 仅适用于受支持的 macOS 和 Linux 环境。
  • 宿主能力与运行要求以各集成文档为准。 Pi 和 OpenClaw 为社区集成;OpenClaw 集成要求 Node.js 24.x 中的 24.15 或更高版本以及 pnpm。

相关链接

感谢所有贡献代码、文档、测试和问题反馈的社区成员。

What's Changed

  • docs: align English deployment and tracing guides by @Zxf-xufeng in #1567
  • docs: migrate website links to official domain by @happy-v587 in #1568
  • docs: correct context management workflows by @Zxf-xufeng in #1566
  • chore: clean outdated links by @PsiACE in #1570
  • docs(rfc): record recurring failures and gate their repair by @AlexStocks in #1557
  • test(native): report the service's state at the moment it fails to start by @L4XB in #1575
  • docs: remove accidentally committed superpowers working spec by @frf12 in #1582
  • fix(website): handle Windows paths in link validation by @Doar999 in #1576
  • feat(cli): add Experience read commands by @happy-v587 in #1579
  • docs(readme): add contributor wall by @zhanghuidinah in #1584
  • feat(website): add GitHub stars to shared navigation by @zhanghuidinah in #1581
  • ci: harden workflow reproducibility and evidence gates by @AlexStocks in #1587
  • fix(pi): keep failure diagnostics off stderr by default by @L4XB in #1562
  • feat(openclaw): add pc commands and work coordination workflows by @XnLemon in #1569
  • docs: add project governance by @zhanghuidinah in #1588
  • docs(rfc): add recall sufficiency gate proposal by @AlexStocks in #1560
  • fix(opencode): normalize Windows file URI paths by @sunlight798 in #1592
  • refactor(windows): switch from PowerShell to schtasks for task info retrieval by @Alanxtl in #1591
  • test(windows): make skill snapshot tests portable by @Lianminx in #1595
  • test(windows): make CLI fixtures and permission checks portable by @Lianminx in #1603
  • feat(evaluation): validate LongMemEval-V2 smoke inputs by @chenncy in #1460
  • fix(website): support CRLF frontmatter by @Doar999 in #1552
  • fix(website): remove duplicate test script by @XnLemon in #1606
  • feat(prompts): add Topic Memory prompt management by @frf12 in #1563
  • Feat/memory write tracing by @Oxidaner in #1605
  • feat(pi): add artifact inspection tools by @wutongyuonce in #1604
  • ci: improve evidence scan diagnostics and action pinning by @AlexStocks in #1589
  • feat(pi): add Topic Memory read tools by @wutongyuonce in #1608
  • perf(server): read POST /v1/stats in one transaction per selection by @L4XB in #1616
  • feat(pi): add structured work continuity tools by @wutongyuonce in #1617
  • feat(dsh): expose observed recall and capture status through /pc by @knqiufan in #1600
  • docs: add Topic Memory guide by @frf12 in #1565
  • feat(integrations): align agent guidance and tool routing by @knqiufan in #1522
  • test(windows): fix process and checkout fixture portability by @knqiufan in #1623
  • build(deps): bump actions/configure-pages from 5.0.0 to 6.0.0 by @dependabot[bot] in #1612
  • build(deps): bump apache/skywalking-eyes/header from 0.8.0 to 0.9.0 by @dependabot[bot] in #1613
  • feat(pi): add external skill tools by @wutongyuonce in #1626
  • feat(pi): add artifact candidate review tools by @wutongyuonce in #1625
  • feat(integrations): add layered PowerContext Skill routing by @knqiufan in #1622
  • feat(pi): add experience and skill generation tools by @wutongyuonce in #1621
  • feat(pi): add Memory Changes and Stats tools by @wutongyuonce in #1633
  • docs(rfc): complete topic memory generic Artifact APIs by @Zxf-xufeng in #1614
  • feat(integrations): show token savings in Claude Code, OpenCode, and Codex by @happy-v587 in #1580
  • feat(topic-memory): complete generic Artifact APIs by @Zxf-xufeng in #1615
  • docs: vendor integration icons for README and website by @Holidayrabbit in #1638
  • Codex/fix windows command encoding by @Doar999 in #1636
  • feat(pi): promote integration to Full profile by @wutongyuonce in #1639
  • feat(authz): shared filter derivation, snapshot decision boundary, and adapter conformance suite by @tlyyxjz in #1483
  • fix(codex): verify native MCP authentication on Windows by @beatenevo in #1632
  • feat(dashboard): profile reading and exact handoff Markdown export by @Zxf-xufeng in #1630
  • fix(sqlite): batch vector completeness checks by @notepix in #1640
  • docs(rfc): profile dashboard and exact handoff Markdown export by @Zxf-xufeng in #1629
  • feat: record recurring failures and gate their repair (#1557) by @AlexStocks in #1586
  • feat(runtime): add a bounded recall sufficiency gate to prepare_context by @AlexStocks in #1596
  • feat(tags): support all artifact families by @Teingi in #1650
  • docs(rfc): propose Tauri desktop control center by @knqiufan in #1455
  • fix(workbuddy): extend prompt hook timeout by @AlexStocks in #1660
  • fix(mcp): allow Markdown handoff report output by @Teingi in #1670
  • fix(topic-memory): process persisted remote source evidence by @Teingi in #1673
  • fix(access): distinguish missing Memory from pending ownership by @Teingi in #1674
  • bug: authenticated Codex MCP probe fails on /mcp URL redirect by @Alanxtl in #1662
  • fix(context): bound optional Topic recall embedding by @Teingi in #1671
  • fix(artifacts): preserve registered Source provenance by @Teingi in #1672
  • fix(recall): separate lexical evidence from execution instructions by @Teingi in #1675
  • feat(inference): add MiniMax native embedding adapter by @AlexStocks in #1653
  • chore(release): prepare v1.1.0 by @Teingi in #1684

New Contributors

Full Changelog: powercontext-v1.0.0...powercontext-v1.1.0