billion-context-omp 0.3.2-pr.142.7 → 0.3.2-pr.144.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,7 +1,22 @@
1
- # billion-context-omp
1
+ # billion-context-omp — DEPRECATED
2
+
3
+ > [!WARNING]
4
+ > **This package is deprecated.** For omp (oh-my-pi) context compression, use the
5
+ > [billion-context](https://github.com/ranxianglei/billion-context) proxy, which now
6
+ > supports omp directly:
7
+ >
8
+ > ```bash
9
+ > npm i -g billion-context && bili setup omp
10
+ > ```
11
+ >
12
+ > The proxy runs the same compression engine ([acp-kernel](https://github.com/ranxianglei/acp-kernel))
13
+ > at the HTTP layer, works with every omp model/provider (no extension API dependency),
14
+ > and is where all active development happens. This plugin repository is maintenance-only.
2
15
 
3
16
  [English](./README.md) | [中文](./README.zh-CN.md)
4
17
 
18
+ ---
19
+
5
20
  <p align="center">
6
21
  <strong>Billion-Context</strong> for <a href="https://github.com/can1357/oh-my-pi">omp (oh-my-pi)</a>
7
22
  <br />
@@ -10,12 +25,6 @@ The model decides <em>when</em> and <em>what</em> to compress — not a hard lim
10
25
 
11
26
  ---
12
27
 
13
- <p align="center">
14
- <a href="https://www.npmjs.com/package/billion-context-omp"><img src="https://img.shields.io/npm/v/billion-context-omp.svg?style=flat-square" alt="npm"></a>
15
- <a href="https://github.com/ranxianglei/billion-context-omp/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/billion-context-omp.svg?style=flat-square" alt="license"></a>
16
- <a href="https://github.com/ranxianglei/billion-context-omp"><img src="https://img.shields.io/badge/GitHub-ranxianglei%2Fbillion--context--omp-181717?style=flat-square&logo=github" alt="GitHub"></a>
17
- </p>
18
-
19
28
  <p align="center">
20
29
  <code>omp install billion-context-omp</code>
21
30
  </p>
package/README.zh-CN.md CHANGED
@@ -1,12 +1,17 @@
1
- [English](./README.md) | [中文](./README.zh-CN.md)
2
-
3
- # billion-context-omp
1
+ # billion-context-omp — 已废弃
2
+
3
+ > [!WARNING]
4
+ > **本包已废弃。** omp (oh-my-pi) 的上下文压缩请改用
5
+ > [billion-context](https://github.com/ranxianglei/billion-context) 代理版本,现已直接支持 omp:
6
+ >
7
+ > ```bash
8
+ > npm i -g billion-context && bili setup omp
9
+ > ```
10
+ >
11
+ > 代理在 HTTP 层运行同一压缩引擎([acp-kernel](https://github.com/ranxianglei/acp-kernel)),
12
+ > 适配 omp 的全部模型/供应商(不依赖插件扩展 API),后续开发都在那边进行。本插件仓库仅保留维护。
4
13
 
5
- <p align="center">
6
- 面向 <a href="https://github.com/can1357/oh-my-pi">omp (oh-my-pi)</a> 的 <strong>Billion-Context</strong>
7
- <br />
8
- 由模型决定<em>何时</em>压缩、<em>压缩什么</em> —— 而不是硬截断。
9
- </p>
14
+ [English](./README.md) | [中文](./README.zh-CN.md)
10
15
 
11
16
  ---
12
17
 
package/dist/index.js CHANGED
@@ -1,6 +1,3 @@
1
- // src/index.ts
2
- import { settings } from "@oh-my-pi/pi-coding-agent";
3
-
4
1
  // node_modules/acp-kernel/dist/chunk-MWXUJVMN.js
5
2
  import { createRequire } from "module";
6
3
  var require2 = createRequire(import.meta.url);
@@ -4910,7 +4907,7 @@ function isViewFlip(foldedLen, lcp) {
4910
4907
  }
4911
4908
  function preserveCompressedSlot(prev) {
4912
4909
  const slot = freshSlot(prev);
4913
- slot.state = { ...slot.state, blocks: prev.state.blocks, messageRefs: prev.state.messageRefs, stats: prev.state.stats };
4910
+ slot.state = { ...slot.state, blocks: prev.state.blocks, messageRefs: prev.state.messageRefs, stats: prev.state.stats, nextBlockId: prev.state.nextBlockId, nextRunId: prev.state.nextRunId };
4914
4911
  slot.appliedCallIds = new Set(prev.appliedCallIds);
4915
4912
  return slot;
4916
4913
  }
@@ -4974,7 +4971,7 @@ function createRuntime(adapter) {
4974
4971
  lcp = 0;
4975
4972
  }
4976
4973
  if (lcp === 0 && slot.state.blocks.length > 0) {
4977
- const presentIds = new Set(ids);
4974
+ const presentIds = new Set(stream.map((m) => m.id));
4978
4975
  const surviving = slot.state.blocks.filter((b) => b.active === false || b.effectiveMessageIds.some((id) => presentIds.has(id)));
4979
4976
  if (surviving.length < slot.state.blocks.length) {
4980
4977
  debug.event("fold-purge-stale-blocks", { sid, before: slot.state.blocks.length, after: surviving.length });
@@ -6560,16 +6557,8 @@ function applyUserConfig(adapter, user) {
6560
6557
  }
6561
6558
 
6562
6559
  // src/index.ts
6563
- function disableHostCompaction() {
6564
- try {
6565
- settings.override("compaction.enabled", false);
6566
- settings.override("compaction.strategy", "off");
6567
- } catch {
6568
- }
6569
- }
6570
6560
  function createAcpExtension(adapter = {}) {
6571
6561
  return (pi) => {
6572
- disableHostCompaction();
6573
6562
  const runtime = createRuntime(adapter);
6574
6563
  const warnDelivery = makeDeliveryWarner();
6575
6564
  wireSessionLifecycle(pi, runtime);