Skip to content

PowerContext v1.4.1

Latest

Choose a tag to compare

@hidb4ai hidb4ai released this 26 Oct 10:57
· 46 commits to master since this release
8ef4f64

PowerContext v1.4.1

Not only memory, but a full story.

English

PowerContext v1.4.1 reduces repeated work in context retrieval and Memory writes, lowers extraction input overhead, and adds portable archives. This release also expands Kimi Code workflows, improves Desktop save recovery, and introduces a complete Server migration framework with explicit upgrade acceptance requirements.

Faster recall and Memory writes

  • Consolidate context preparation queries, batch authorization and evidence reads, and reuse unchanged search index text. Dashboard lists, Memory search, and statistics perform less repeated database work.
  • Batch Source capture and Memory publication while preserving Source order, exact revisions, permissions, and atomic publication. Failed processing windows leave no partial publication or cursor advance.
  • Remove duplicate Source text from extraction input while retaining evidence and provenance. Skip reconciliation when a candidate has no comparable memories, and return invalid reconciliation decisions to the model for correction within the configured retry budget.
  • Skip already-consumed Scope windows during scheduled processing. In the built-in relational processing path, new Sources can be captured while Memory extraction waits for the model.

Selected SQLite measurements illustrate the reduction in database work:

Operation Before After
Experience list, approximately 3,000 records per family with authorization 9,033 SELECTs 4 SELECTs
Capture 3,000 Sources 75,034 SQL statements 24 SQL statements

These are separate, fixed-workload comparisons from read-path optimization and write batching, not a release-wide latency guarantee. Four fixed extraction-input cases also showed 35.7%–59.6% fewer estimated input tokens; this measures serialized extraction input, not provider billing or total Agent cost. Extraction input measurements.

Portable archives with preserved history

  • Export selected complete Scopes as .pcb archives, inspect their contents, and check target compatibility and conflicts with a restore dry run.
  • Preserve exact identities, immutable revisions, evidence, lineage, Handoffs, and supported review state. Repeated restore recognizes identical records and rejects conflicting immutable content.
  • Use powercontext archive export, inspect, and restore for offline administration. Stop writers before restore; credentials, access bindings, and derived indexes are excluded.

Portable archives complement complete database backups and do not replace schema migration. Archive guide.

Inspect blocked processing and recover explicitly

  • Inspect durable Topic Memory blocks through HTTP, the Python SDK, or powercontext topic-memory status, block, and retry. Authorized retries retain exact receipts across restarts; acceptance schedules work without guaranteeing generation success.
  • Reject semantically invalid Topic Memory output. Configure the recall Embedding time budget and inspect why context preparation fell back from semantic retrieval.
  • Optionally aggregate streamed model output to reduce gateway idle-timeout failures. Enable POWERCONTEXT_SERVER_INFERENCE_GENERATION_STREAMING=auto for supported providers; streaming remains disabled by default and requires a streaming-capable endpoint.

See Topic Memory recovery and streamed generation.

More complete Agent workflows

  • Kimi Code: bind working directories to Scopes and opt into recommended or full tool profiles for Handoff, Experience, managed Skill, and Candidate workflows. Initial setup remains minimal; Server capabilities, permissions, and explicit review decisions still apply.
  • Add the powercontext scope command group for Scope management and workspace/session bindings. Improve Agent setup recovery, Codex executable discovery, Windows bootstrap receipts, and bounded WorkBuddy Scope discovery.
  • Guard automatic prompt capture against recognized credentials and bound long-prompt recall queries. Add an optional Jev reranker for explicit injection by Python applications; it requires separate credentials and is not enabled through Server environment settings.

Desktop and Dashboard improvements

  • Add an unsigned macOS app and DMG preview, fix Linux packaged navigation, and show the active connection, Server address, and exact Scope more clearly.
  • Open saved Memory records at their exact revisions, preserve drafts across failed or ambiguous saves, and improve permission recovery, confirmations, and keyboard focus.
  • Add Experience text search to the web Dashboard and an Observation navigation entry to Desktop.

Desktop remains a preview that connects to a compatible standalone Server. The Observation entry does not yet provide a complete observation-data view; signed distribution and complete installed-platform qualification remain separate work.

Operations and reliability

  • Add managed rotating log files with retention and compression, aggregate worker logs through their owning Server, and expose dependency and processing observations. Logs remain best-effort.
  • Add the independent powercontext-ops entry for inspecting, configuring, and managing an already-prepared personal Server runtime. Runtime download, repair, and the Desktop installation bridge remain separate work.
  • Bound HTTP request bodies and active responses, authenticate MCP calls per HTTP request, and preserve path authorization. Commit supported local writes and ownership records atomically, and reject blank text Sources before they can block later processing.

Install and upgrade

After the package is published:

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

Retain the extras your deployment uses, such as code or seekdb. Upgrade Server, clients, CLI, MCP, and Agent integrations together, then reopen Agent sessions.

The Server migration framework now provides powercontext server db-migrate with status, plan, apply, and verify subcommands. It recognizes registered source layouts, preserves source history and recovery evidence, and validates the full Server before reporting readiness. Migration steps display as v1_4_1_001 through v1_4_1_003, while existing revision IDs and checksums remain intact.

Existing databases require an accepted upgrade path for the exact target artifact. The 1.3.0 acceptance matrix declares 12 backend/configuration combinations: publication requires all 10 automatic cases to pass and the support declaration to be reviewed. The two embedded seekDB configurations with Code enabled remain manual-only, unverified, and excluded from supported upgrades. The registered 1.4.0 bridge is outside this acceptance matrix.

Stop all writers, back up the complete database and configuration, and review the migration plan before applying it. Drain queued or running 1.3.0 Dream tasks and preserve the historical Embedding configuration. Follow the documented recovery procedure after interruption, and restart services only after full Server verification succeeds. Database migration guide.

Compatibility changes:

  • Custom Atomic Memory and Topic Memory indexes must support complete-set projection publication.
  • The old /dashboard/guide route, Notes entry parameter, and Methods kind=all compatibility paths have been removed.

Full changelog


中文

PowerContext v1.4.1 减少上下文检索与记忆写入中的重复操作,降低提取输入开销,并新增可移植归档。本次还扩展了 Kimi Code 工作流,完善 Desktop 保存恢复体验,提供完整的 Server 迁移框架,并明确升级验收要求。

优化检索与记忆写入

  • 合并上下文准备查询,批量读取权限和证据,复用未变化的搜索索引文本,减少 Dashboard 列表、Memory 搜索与统计中的重复数据库操作。
  • 批量采集 Source、发布 Memory,保留 Source 顺序、精确版本、权限检查与原子提交语义。处理窗口失败时,不留下部分发布结果,也不推进游标。
  • 去掉提取输入中重复的 Source 正文,保留证据与来源信息。候选记忆没有可比较对象时跳过协调;模型给出无效协调决策时,在配置的重试预算内反馈原因并请求纠正。
  • 定时处理跳过已消费的 Scope 窗口。在内置关系型处理路径中,Memory 提取等待模型期间仍可采集新的 Source。

以下 SQLite 对照展示了数据库操作的减少:

操作 优化前 优化后
Experience 列表,每类约 3,000 条记录、启用授权 9,033 条 SELECT 4 条 SELECT
采集 3,000 条 Source 75,034 条 SQL 24 条 SQL

两组数据分别来自读取路径优化和写入批处理,是固定工作负载下的独立对照,不代表整个版本的统一延迟降幅。四组固定提取输入的估算 Token 数减少了 35.7%~59.6%;该指标衡量序列化提取输入,不等于供应商计费 Token 或整个 Agent 任务的费用降幅。提取输入测量。

可移植归档,保留项目历史

  • 将选定的完整 Scope 导出为 .pcb 归档,检查归档内容,并通过恢复预演核对目标兼容性与冲突。
  • 保留精确身份、不可变历史版本、证据、血缘、Handoff 和受支持的审核状态。重复恢复时识别相同记录,遇到不可变内容冲突则拒绝写入。
  • 通过 powercontext archive export、inspect、restore 执行离线管理。恢复前需停止写入;凭据、权限绑定和派生索引不包含在归档中。

可移植归档与完整数据库备份配合使用,不能替代数据库结构迁移。归档指南。

查看处理阻塞,显式恢复任务

  • 通过 HTTP、Python SDK 或 powercontext topic-memory status、block、retry 查看持久化的 Topic Memory 阻塞并执行授权重试。重启后仍保留精确回执;接受重试会安排后续处理,不保证生成一定成功。
  • 拒绝语义不符合要求的 Topic Memory 输出。支持配置召回 Embedding 时间预算,并查看上下文准备为何回退到非语义检索。
  • 可选聚合模型流式输出,缓解网关空闲超时导致的生成失败。为受支持的 Provider 设置 POWERCONTEXT_SERVER_INFERENCE_GENERATION_STREAMING=auto 即可启用;默认关闭,模型端点需支持流式请求。

参见 Topic Memory 恢复与流式生成。

更完整的 Agent 工作流

  • Kimi Code:支持工作目录与 Scope 绑定,可选择 recommended 或 full 工具配置,使用 Handoff、Experience、托管 Skill 和 Candidate 工作流。首次安装仍默认 minimal;相应 Server 能力、权限与显式审核要求继续生效。
  • 新增 powercontext scope 命令组,管理 Scope 及工作目录、会话绑定。完善 Agent 安装恢复、Codex 可执行文件发现、Windows 开场上下文回执和有时间预算的 WorkBuddy Scope 发现。
  • 自动提示采集会防护已识别的凭据,并限制长提示的召回查询长度。新增可由 Python 应用显式注入的 Jev 重排器,需要独立凭据,不通过 Server 环境变量启用。

Desktop 与 Dashboard 改进

  • 新增未签名的 macOS 应用与 DMG 预览,修复 Linux 打包后的导航,更清楚地展示当前连接、Server 地址和精确 Scope。
  • 按精确版本打开已保存的 Memory,在保存失败或结果不确定时保留草稿,完善权限恢复、确认对话框与键盘焦点处理。
  • 网页 Dashboard 新增 Experience 文本搜索,Desktop 新增 Observation 导航入口。

Desktop 仍为预览,需要连接兼容的独立 Server。Observation 入口尚未提供完整的观测数据视图;签名发行与完整安装平台验收仍需单独完成。

运维与稳定性

  • 新增支持保留与压缩的托管轮转日志,由所属 Server 汇聚 Worker 日志,并提供依赖与处理状态观测。日志仍采用尽力交付机制。
  • 新增独立的 powercontext-ops 入口,检查、配置和管理已准备好的个人 Server 运行环境。运行环境下载、修复与 Desktop 安装桥接仍属于独立工作。
  • 限制 HTTP 请求体与活跃响应规模,按每次 HTTP 请求认证 MCP 调用,并保留路径授权约束。让受支持的本地写入与所有权记录原子提交,在创建时拒绝空白文本 Source,避免其阻塞后续处理。

安装与升级

包发布后执行:

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

保留当前部署使用的 code、seekdb 等扩展,一起升级 Server、客户端、CLI、MCP 与 Agent 集成,并重新打开 Agent 会话。

Server 迁移框架现已提供 powercontext server db-migrate,通过 status、plan、apply、verify 子命令查看状态、制定计划、执行和验证。框架识别已登记的来源结构,保留来源历史与恢复证据,完成整体校验后才报告 Server 就绪。迁移步骤显示为 v1_4_1_001 至 v1_4_1_003,原有 revision ID 与校验和保持不变。

已有数据库需具备针对目标发行物的已验收升级路径。 1.3.0 升级矩阵登记了 12 个后端与配置组合;发布要求其中 10 个自动验收组合全部通过,并完成支持声明审阅。两个启用 Code 的嵌入式 seekDB 组合暂仅支持手动执行,尚未验证,不计入支持的升级范围。已登记的 1.4.0 桥接也不在本轮验收矩阵内。

执行迁移前停止全部写入,完整备份数据库与配置,并检查迁移计划。排空 1.3.0 中排队或运行中的 Dream 任务,保持历史 Embedding 配置;中断后按文档执行恢复,整体 Server 验证通过后再重启服务。数据库迁移指南。

兼容性变化:

  • 自定义 Atomic Memory 和 Topic Memory 索引需支持完整集合的投影发布。
  • 移除旧 /dashboard/guide 路由、Notes 的 entry 参数,以及 Methods 的 kind=all 兼容路径。

完整变更

What's Changed

  • feat(website): add documentation search scopes by @frf12 in #2058
  • build(deps): bump actions/upload-artifact from 7.0.1 to 7.0.2 by @dependabot[bot] in #2062
  • build(deps): bump actions/download-artifact from 8.0.1 to 8.0.2 by @dependabot[bot] in #2063
  • build(deps): bump jdx/mise-action from 5.1.1 to 5.2.0 by @dependabot[bot] in #2064
  • build(deps): bump astral-sh/setup-uv from 10.0.0 to 10.3.0 by @dependabot[bot] in #2065
  • docs: add artifact workflow guide by @syedmustafan in #2037
  • fix(integrations): read a missing token estimate as unavailable, not zero by @kragent66-glitch in #2006
  • feat(e2e): run paired continuation workloads with Kimi Code by @Fengzdadi in #2038
  • docs(review): clarify approval authority and reviewer separation by @Lkx-JY in #2041
  • feat(kimi-code): add workspace Scope bindings by @jackie-cqz in #2043
  • fix(zcode): stop two plugin tests from depending on runner timing by @Fengzdadi in #2051
  • fix(notebooks): align introductory tutorials with Atomic Memory by @chenncy in #2053
  • perf: separate content lifecycle maintenance from authorized reads by @PsiACE in #2060
  • ci: scope PR validation to changed areas by @hidb4ai in #2072
  • fix(zcode): abort unknown boundary flush after request arrival by @luochen211 in #2094
  • fix(e2e): fill the Kimi Code Scope script path in installed guidance by @Fengzdadi in #2090
  • perf(review): batch the candidate evidence artifact existence check by @Inference1 in #2091
  • fix: tolerate multiple scheduler activations in trace test by @Skylm808 in #2097
  • test(recall): pin the prepare_context statement ceiling by @Inference1 in #2087
  • fix(hooks): bound recall queries for long prompts by @yydawx in #2034
  • feat(observability): trace workers and expose processing health by @happy-v587 in #2025
  • refactor(cli): unify agent installation lifecycle by @PsiACE in #2052
  • build(deps): bump aiohttp from 3.14.3 to 3.14.4 in /e2e/bub by @dependabot[bot] in #2121
  • feat: expose dependency and processing observations by @Pika-Yalei in #2019
  • feat(e2e): leave out ON runs that reached another trial's Scope by @Fengzdadi in #2035
  • fix(runtime): make the recall embedding budget configurable and log its fallback by @Fengzdadi in #2042
  • fix(server): keep a failed cursor key write from bricking the data location by @tlyyxjz in #2061
  • fix(skill): make repeated remote publication idempotent by @knqiufan in #2120
  • perf(search): simplify retrieval queries and lifecycle checks by @PsiACE in #2095
  • fix(review): short-circuit approval of rejected candidates by @knqiufan in #2123
  • build(deps-dev): bump vite from 8.3.0 to 8.3.3 in /desktop by @dependabot[bot] in #2140
  • build(deps): bump vite from 7.3.6 to 7.3.7 in /integrations/openclaw/plugins/memory-powercontext by @dependabot[bot] in #2142
  • build(deps): bump certifi from 2026.6.17 to 2026.10.19 by @dependabot[bot] in #2143
  • build(deps): bump uv from 0.11.26 to 0.13.4 by @dependabot[bot] in #2141
  • docs(rfc): propose source plugin framework by @Junkrat77 in #2012
  • fix: restore isolated installs and stabilize migration CI by @knqiufan in #2118
  • fix(storage): recover interrupted scope search migrations by @knqiufan in #2124
  • fix(server): keep path authorization authoritative by @DongYao0 in #2131
  • test(recall): tighten the prepare_context statement ceiling to the current measurement by @Inference1 in #2133
  • fix(mcp): authenticate tool calls per HTTP request by @tmt-123 in #2134
  • perf(evidence): reuse the loaded revision when the head still selects it by @Inference1 in #2136
  • docs(rfc): define minimal Topic Memory recovery storage by @knqiufan in #2018
  • fix(topic-memory): add durable block inspection and recovery by @knqiufan in #1966
  • refactor(desktop): generate Rust models from OpenAPI by @CX33071 in #2113
  • test(dsh): correlate runtime context observations by @DongYao0 in #2145
  • fix(workbuddy): honor hook deadlines during scope binding by @AlexStocks in #2151
  • fix(runtime): retain one owner for worker process reaping by @AlexStocks in #2171
  • perf(sources): bound the receipt migration scan and detect shared plugin drift by @AlexStocks in #2148
  • fix(runtime): allow source capture during memory extraction by @AlexStocks in #2152
  • perf(processing): skip consumed scopes in scheduled source windows by @AlexStocks in #2170
  • fix(authz): commit local write ownership atomically by @AlexStocks in #2164
  • test(runtime): await usage settlement in rollback isolation test by @AlexStocks in #2179
  • fix(integrations): persist bootstrap receipts on Windows by @AlexStocks in #2177
  • feat(kimi-code): support full-profile workflows by @jackie-cqz in #2077
  • feat(cli): add powercontext scope command group by @happy-v587 in #2093
  • feat(dashboard): add text search to the Experience list by @yydawx in #2033
  • feat(evaluation): add artifact evolution recording by @beatenevo in #2048
  • fix(authz): repair ownerless migrated memories by @DongYao0 in #2138
  • docs(contract): correct the held-window contract, plan read-only, and docs CI coverage by @AlexStocks in #2147
  • feat(profile): adapt PowerMem profile prompts as concise defaults by @Zxf-xufeng in #2176
  • perf(atomic-memory): stop duplicating source text in extraction input to reduce token consumption by @lizining1231 in #2139
  • perf(context): consolidate recall queries by @PsiACE in #2079
  • fix(migration): admit frozen snapshots within an explicit memory budget by @AlexStocks in #2172
  • perf(atomic-memory): compact repeated bodies in additional projections by @jasondeng1997 in #2163
  • build(deps): bump vite from 7.3.6 to 7.3.7 in /integrations/pi/plugins/powercontext by @dependabot[bot] in #2193
  • build(deps): bump virtualenv from 21.7.13 to 21.14.9 by @dependabot[bot] in #2194
  • build(deps): bump vite from 7.3.6 to 7.3.7 in /integrations/opencode/plugins/powercontext by @dependabot[bot] in #2195
  • docs(rfc): number topic memory API proposal as 1614 by @Zxf-xufeng in #2198
  • feat(desktop): add macOS native preview support by @happy-v587 in #2056
  • test(recall): repin prepare statement ceiling after consolidation by @Inference1 in #2200
  • feat: add portable archive export and restore by @larry-zy in #1561
  • fix(migrations): parse arithmetic CHECK constraints by @Zxf-xufeng in #2178
  • fix/1946-topic-memory-semantic-validation by @Lkx-JY in #2089
  • feat(evaluation): measure scoped recall lineage occupancy by @chenncy in #2125
  • fix: name the field or reason in four failed tool results (#2149) by @guamiao in #2150
  • docs(rfc): propose Artifact plugin framework by @Junkrat77 in #2175
  • fix(atomic-memory): return broken reconciliation rules to the model before failing a flush by @Fengzdadi in #2185
  • fix(cli): resolve Codex shims and reject unsafe batch input by @nanmulimeng in #2197
  • feat(context): report why a preparation lost its semantic recall path (#2039) by @jasondeng1997 in #2144
  • fix(integrations): guard automatic prompt capture and preparation by @AlexStocks in #2174
  • evaluation(memory): trace collected-source poisoning into host answers by @AlexStocks in #2186
  • perf(statistics): batch cited experience reads by @Inference1 in #2201
  • test(runtime): await commit-lock recovery settlement by @AlexStocks in #2208
  • feat(desktop): add observation navigation and unify feedback and context by @sunlight798 in #2188
  • build(deps): bump next from 16.3.6 to 16.4.1 in /website by @dependabot[bot] in #2213
  • build(deps): bump virtualenv from 21.14.9 to 21.14.13 by @dependabot[bot] in #2227
  • feat(memory): add optional Jev reranking and comparison by @Oxidaner in #2005
  • fix(metrics): wait for a stable timestamp instead of failure count by @lizining1231 in #2173
  • feat(server): bound HTTP request bodies and active responses by @AlexStocks in #2162
  • feat(ops): add independent personal server operations by @knqiufan in #2190
  • build(deps): bump fastmcp-slim from 3.4.4 to 3.4.10 by @dependabot[bot] in #2228
  • test(runtime): await commit-lock recovery usage settlement by @Zxf-xufeng in #2209
  • perf(memory): batch write lifecycle and authorization by @PsiACE in #2229
  • feat: aggregate streamed generation to survive gateway idle timeouts by @huto-c in #2202
  • feat(desktop): complete Memory save recovery and exact-read navigation by @WuShang-d in #2135
  • perf(atomic-memory): skip reconciliation when a candidate has nothing to compare by @Fengzdadi in #2206
  • fix(desktop): allow Linux packaged navigation by @CX33071 in #2223
  • feat(logging): add managed file output and worker log aggregation by @PsiACE in #2196
  • fix(sources): reject blank text content at creation by @huto-c in #2224
  • feat(migrations): complete the reusable database upgrade framework by @Zxf-xufeng in #2168
  • ci(release): harden integrated upgrade acceptance by @Zxf-xufeng in #2181
  • chore(release): prepare v1.4.1 by @hidb4ai in #2245

New Contributors

Full Changelog: powercontext-v1.4.0...powercontext-v1.4.1