acp-kernel 0.0.97-pr.468.322 → 0.0.97-pr.471.324
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/LICENSE +36 -0
- package/README.md +6 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/parse-compress-input.d.ts +3 -0
- package/dist/parse-compress-input.d.ts.map +1 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -19,3 +19,39 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Additional Term — Attribution on Product Surfaces
|
|
26
|
+
(在 MIT 之上附加的条款 —— 产品出处标注)
|
|
27
|
+
|
|
28
|
+
In addition to the conditions above, if you use or incorporate the Software
|
|
29
|
+
in a product or service that end users can see or interact with — whether
|
|
30
|
+
commercial or open source — you must make attribution clearly visible in at
|
|
31
|
+
least one of the following places:
|
|
32
|
+
|
|
33
|
+
1. the product's home page;
|
|
34
|
+
2. its documentation; or
|
|
35
|
+
3. its "About" / "Credits" / "Acknowledgements" page.
|
|
36
|
+
|
|
37
|
+
The attribution must state that the product uses acp-kernel (and
|
|
38
|
+
billion-context, where applicable) and include a link to
|
|
39
|
+
https://github.com/ranxianglei/acp-kernel (and
|
|
40
|
+
https://github.com/ranxianglei/billion-context, where applicable).
|
|
41
|
+
|
|
42
|
+
For purely server-side or embedded uses with no user-facing surface, carrying
|
|
43
|
+
these notices in the shipped documentation satisfies this term.
|
|
44
|
+
|
|
45
|
+
附加条款(中文):
|
|
46
|
+
|
|
47
|
+
除上述条件外,若将本软件用于任何终端用户可见或可交互的产品或服务(无论商业或开源),
|
|
48
|
+
须在下述至少一处显著位置标明出处:
|
|
49
|
+
|
|
50
|
+
1. 产品首页;
|
|
51
|
+
2. 产品文档;或
|
|
52
|
+
3. “关于 / 致谢 / Acknowledgements”页面。
|
|
53
|
+
|
|
54
|
+
署名须说明该产品使用了 acp-kernel(涉及时包括 billion-context),并附指向
|
|
55
|
+
https://github.com/ranxianglei/acp-kernel (及 https://github.com/ranxianglei/billion-context,
|
|
56
|
+
涉及时)的链接。纯服务端或内嵌、无用户可见界面的用途,随附文档中包含上述声明即可。
|
|
57
|
+
|
package/README.md
CHANGED
|
@@ -298,6 +298,12 @@ to decide between message-level and wire-level surgery.
|
|
|
298
298
|
|
|
299
299
|
> **Protected tool messages:** protected tool calls (per `config.protectedTools`) and their paired tool-results are hard-excluded from compression — they are dropped from the compressible set and from the new block's `effectiveMessageIds`, so they stay fully visible and are never folded into a summary. This matches opencode-acp's Bug 39 fix. The soft-protected recent zone (`preserveRecentMessages` / last user message) is handled separately: messages there are excluded from the range but do not fail it (an entirely-protected range fails with a clear error).
|
|
300
300
|
|
|
301
|
+
## Attribution requirement (one term on top of MIT)
|
|
302
|
+
|
|
303
|
+
`acp-kernel` is MIT-licensed **plus one additional term**: any product or service (commercial or open source) whose users can see or interact with it and which uses this kernel must attribute it — stating that it uses acp-kernel with a link back to this repository — on its home page, documentation, or About/Credits page. Pure server-side/embedded use satisfies this via shipped documentation. See the **Additional Term** at the end of [LICENSE](LICENSE).
|
|
304
|
+
|
|
305
|
+
If you build on this kernel, we'd love to hear about it: open an issue (no obligation) so we can track where it's used.
|
|
306
|
+
|
|
301
307
|
## License
|
|
302
308
|
|
|
303
309
|
MIT © ranxianglei
|
package/dist/index.js
CHANGED
|
@@ -7538,6 +7538,11 @@ function parseObjectValue(value, callId, diag) {
|
|
|
7538
7538
|
entries = parsed.entries;
|
|
7539
7539
|
salvaged = parsed.salvaged;
|
|
7540
7540
|
if (parsed.quoteRepaired) diag.quoteSalvage = true;
|
|
7541
|
+
} else if (content !== null && typeof content === "object") {
|
|
7542
|
+
const obj = content;
|
|
7543
|
+
const nested = obj["ranges"];
|
|
7544
|
+
entries = Array.isArray(nested) ? nested : [obj];
|
|
7545
|
+
diag.contentSalvage = true;
|
|
7541
7546
|
} else {
|
|
7542
7547
|
diag.kind = "content-not-array";
|
|
7543
7548
|
return finish([], diag);
|