acp-kernel 0.0.75-pr.316.181 → 0.0.75-pr.323.188
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/dist/compress-tools.d.ts +191 -0
- package/dist/compress-tools.d.ts.map +1 -1
- package/dist/compress.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +202 -44
- package/dist/index.js.map +1 -1
- package/dist/output-headroom.d.ts +52 -0
- package/dist/output-headroom.d.ts.map +1 -0
- package/dist/recommend.d.ts.map +1 -1
- package/dist/turn-integrity.d.ts +28 -0
- package/dist/turn-integrity.d.ts.map +1 -1
- package/dist/wire/bili-message.d.ts +10 -0
- package/dist/wire/bili-message.d.ts.map +1 -1
- package/dist/wire/formats.d.ts +1 -1
- package/dist/wire/formats.d.ts.map +1 -1
- package/dist/wire/google.d.ts +96 -0
- package/dist/wire/google.d.ts.map +1 -0
- package/dist/wire/index.d.ts +1 -0
- package/dist/wire/index.d.ts.map +1 -1
- package/dist/wire/index.js +310 -1
- package/dist/wire/index.js.map +1 -1
- package/dist/wire/strip-images.d.ts +1 -1
- package/dist/wire/strip-images.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/compress-tools.d.ts
CHANGED
|
@@ -813,4 +813,195 @@ export declare const ABSORB_TOOL_OPENAI: {
|
|
|
813
813
|
};
|
|
814
814
|
};
|
|
815
815
|
};
|
|
816
|
+
export declare const COMPRESS_TOOL_GOOGLE: {
|
|
817
|
+
name: string;
|
|
818
|
+
description: string;
|
|
819
|
+
parameters: {
|
|
820
|
+
type: string;
|
|
821
|
+
properties: {
|
|
822
|
+
topic: {
|
|
823
|
+
type: string;
|
|
824
|
+
description: string;
|
|
825
|
+
};
|
|
826
|
+
content: {
|
|
827
|
+
type: string;
|
|
828
|
+
description: string;
|
|
829
|
+
items: {
|
|
830
|
+
type: string;
|
|
831
|
+
properties: {
|
|
832
|
+
topic: {
|
|
833
|
+
type: string;
|
|
834
|
+
};
|
|
835
|
+
startId: {
|
|
836
|
+
type: string;
|
|
837
|
+
description: string;
|
|
838
|
+
};
|
|
839
|
+
endId: {
|
|
840
|
+
type: string;
|
|
841
|
+
description: string;
|
|
842
|
+
};
|
|
843
|
+
summary: {
|
|
844
|
+
type: string;
|
|
845
|
+
description: string;
|
|
846
|
+
};
|
|
847
|
+
};
|
|
848
|
+
required: string[];
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
required: string[];
|
|
853
|
+
};
|
|
854
|
+
};
|
|
855
|
+
export declare const DECOMPRESS_TOOL_GOOGLE: {
|
|
856
|
+
name: string;
|
|
857
|
+
description: string;
|
|
858
|
+
parameters: {
|
|
859
|
+
type: string;
|
|
860
|
+
properties: {
|
|
861
|
+
blockId: {
|
|
862
|
+
type: string;
|
|
863
|
+
description: string;
|
|
864
|
+
};
|
|
865
|
+
toFile: {
|
|
866
|
+
type: string;
|
|
867
|
+
description: string;
|
|
868
|
+
};
|
|
869
|
+
full: {
|
|
870
|
+
type: string;
|
|
871
|
+
description: string;
|
|
872
|
+
};
|
|
873
|
+
};
|
|
874
|
+
required: string[];
|
|
875
|
+
};
|
|
876
|
+
};
|
|
877
|
+
export declare const SEARCH_CONTEXT_TOOL_GOOGLE: {
|
|
878
|
+
name: string;
|
|
879
|
+
description: string;
|
|
880
|
+
parameters: {
|
|
881
|
+
type: string;
|
|
882
|
+
properties: {
|
|
883
|
+
query: {
|
|
884
|
+
type: string;
|
|
885
|
+
description: string;
|
|
886
|
+
};
|
|
887
|
+
limit: {
|
|
888
|
+
type: string;
|
|
889
|
+
description: string;
|
|
890
|
+
};
|
|
891
|
+
};
|
|
892
|
+
required: string[];
|
|
893
|
+
};
|
|
894
|
+
};
|
|
895
|
+
export declare const ACP_STATUS_TOOL_GOOGLE: {
|
|
896
|
+
name: string;
|
|
897
|
+
description: string;
|
|
898
|
+
parameters: {
|
|
899
|
+
type: string;
|
|
900
|
+
properties: {};
|
|
901
|
+
};
|
|
902
|
+
};
|
|
903
|
+
/** All ACP tools in Gemini flat format, matching ACP_TOOL_NAMES. */
|
|
904
|
+
export declare const ACP_TOOLS_GOOGLE: readonly [{
|
|
905
|
+
name: string;
|
|
906
|
+
description: string;
|
|
907
|
+
parameters: {
|
|
908
|
+
type: string;
|
|
909
|
+
properties: {
|
|
910
|
+
topic: {
|
|
911
|
+
type: string;
|
|
912
|
+
description: string;
|
|
913
|
+
};
|
|
914
|
+
content: {
|
|
915
|
+
type: string;
|
|
916
|
+
description: string;
|
|
917
|
+
items: {
|
|
918
|
+
type: string;
|
|
919
|
+
properties: {
|
|
920
|
+
topic: {
|
|
921
|
+
type: string;
|
|
922
|
+
};
|
|
923
|
+
startId: {
|
|
924
|
+
type: string;
|
|
925
|
+
description: string;
|
|
926
|
+
};
|
|
927
|
+
endId: {
|
|
928
|
+
type: string;
|
|
929
|
+
description: string;
|
|
930
|
+
};
|
|
931
|
+
summary: {
|
|
932
|
+
type: string;
|
|
933
|
+
description: string;
|
|
934
|
+
};
|
|
935
|
+
};
|
|
936
|
+
required: string[];
|
|
937
|
+
};
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
required: string[];
|
|
941
|
+
};
|
|
942
|
+
}, {
|
|
943
|
+
name: string;
|
|
944
|
+
description: string;
|
|
945
|
+
parameters: {
|
|
946
|
+
type: string;
|
|
947
|
+
properties: {
|
|
948
|
+
blockId: {
|
|
949
|
+
type: string;
|
|
950
|
+
description: string;
|
|
951
|
+
};
|
|
952
|
+
toFile: {
|
|
953
|
+
type: string;
|
|
954
|
+
description: string;
|
|
955
|
+
};
|
|
956
|
+
full: {
|
|
957
|
+
type: string;
|
|
958
|
+
description: string;
|
|
959
|
+
};
|
|
960
|
+
};
|
|
961
|
+
required: string[];
|
|
962
|
+
};
|
|
963
|
+
}, {
|
|
964
|
+
name: string;
|
|
965
|
+
description: string;
|
|
966
|
+
parameters: {
|
|
967
|
+
type: string;
|
|
968
|
+
properties: {
|
|
969
|
+
query: {
|
|
970
|
+
type: string;
|
|
971
|
+
description: string;
|
|
972
|
+
};
|
|
973
|
+
limit: {
|
|
974
|
+
type: string;
|
|
975
|
+
description: string;
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
required: string[];
|
|
979
|
+
};
|
|
980
|
+
}, {
|
|
981
|
+
name: string;
|
|
982
|
+
description: string;
|
|
983
|
+
parameters: {
|
|
984
|
+
type: string;
|
|
985
|
+
properties: {};
|
|
986
|
+
};
|
|
987
|
+
}];
|
|
988
|
+
/** Opt-in absorb tool in Gemini flat format (config.absorb.enabled). */
|
|
989
|
+
export declare const ABSORB_TOOL_GOOGLE: {
|
|
990
|
+
name: string;
|
|
991
|
+
description: string;
|
|
992
|
+
parameters: {
|
|
993
|
+
type: "object";
|
|
994
|
+
properties: {
|
|
995
|
+
ref: {
|
|
996
|
+
type: string;
|
|
997
|
+
description: string;
|
|
998
|
+
};
|
|
999
|
+
summary: {
|
|
1000
|
+
type: string;
|
|
1001
|
+
description: string;
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
1004
|
+
required: string[];
|
|
1005
|
+
};
|
|
1006
|
+
};
|
|
816
1007
|
//# sourceMappingURL=compress-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compress-tools.d.ts","sourceRoot":"","sources":["../src/compress-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5D,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAC7C,eAAO,MAAM,oBAAoB,eAAe,CAAC;AACjD,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AACzD,eAAO,MAAM,oBAAoB,eAAe,CAAC;AACjD,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,gBAAgB,WAAW,C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MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,EAAE,CAAC;IACJ,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,KAAK,EAAE,gBAAgB,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CACnC;AA2DD,wBAAgB,UAAU,CAAC,KAAK,GAAE,KAAU,GAAG,eAAe,CA+U7D;AA0jCD,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { createCore } from "./compress.js";
|
|
|
3
3
|
export type { Ports, CompressionCore, ProcessTurnInput, ApplyCompressionInput, } from "./compress.js";
|
|
4
4
|
export { createInitialState, allocateBlockId, allocateRunId, blockById, activeBlocks, coveredMessageIds, highestActiveTier, advanceSurvival, } from "./state.js";
|
|
5
5
|
export { defaultConfig, validateConfig } from "./config.js";
|
|
6
|
+
export { DEFAULT_OUTPUT_HEADROOM_MAX_PCT, resolveOutputHeadroomCap, reserveOutputHeadroom, shouldReserveOutputHeadroom, applyOutputHeadroom, } from "./output-headroom.js";
|
|
6
7
|
export * from "./compress-tools.js";
|
|
7
8
|
export { assignRefs, highestUsedIndex, emptyRefMap, indexToRef, refToIndex, refForRaw, rawForRef, BLOCKED_REF, } from "./refs.js";
|
|
8
9
|
export { prune, SUMMARY_HEADER, summaryMessageId, isSummaryMessageId, isRenderedSummaryMessage, } from "./prune.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EACV,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,cAAc,qBAAqB,CAAC;AACpC,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,KAAK,EACL,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAChE,YAAY,EACV,UAAU,EACV,aAAa,EACb,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,GACpB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AAC;AAC/D,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,cAAc,GACf,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,YAAY,EACZ,aAAa,EACb,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,EACT,aAAa,EACb,WAAW,EACX,WAAW,EACX,WAAW,EACX,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EACL,WAAW,EACX,MAAM,EACN,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EACV,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,EACxB,qBAAqB,EACrB,2BAA2B,EAC3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AO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EACL,WAAW,EACX,MAAM,EACN,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,MAAM,EACX,KAAK,WAAW,GACjB,MAAM,eAAe,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1391,6 +1391,73 @@ var ABSORB_TOOL_OPENAI = {
|
|
|
1391
1391
|
parameters: ABSORB_PARAMETERS
|
|
1392
1392
|
}
|
|
1393
1393
|
};
|
|
1394
|
+
var COMPRESS_TOOL_GOOGLE = {
|
|
1395
|
+
name: COMPRESS_TOOL_NAME,
|
|
1396
|
+
description: COMPRESS_TOOL.description,
|
|
1397
|
+
// `anyOf` is rejected by older API revisions, so `content` declares the
|
|
1398
|
+
// object form; a JSON-encoded string of that array is still accepted by
|
|
1399
|
+
// parseCompressInput, and the line form (a summary whose first line is
|
|
1400
|
+
// 'm00150–m00220 optional topic') is documented in the description.
|
|
1401
|
+
parameters: {
|
|
1402
|
+
type: "object",
|
|
1403
|
+
properties: {
|
|
1404
|
+
topic: {
|
|
1405
|
+
type: "string",
|
|
1406
|
+
description: "Optional short title for the compressed range"
|
|
1407
|
+
},
|
|
1408
|
+
content: {
|
|
1409
|
+
type: "array",
|
|
1410
|
+
description: "One or more ranges to compress into separate summary blocks. Object form: {startId,endId,summary,topic?}. A JSON-encoded string of that array is also accepted; in the line form the summary begins with its own first line 'm00150\u2013m00220 optional topic', the rest being the summary markdown verbatim. REQUIRED \u2014 compress without content is invalid.",
|
|
1411
|
+
items: {
|
|
1412
|
+
type: "object",
|
|
1413
|
+
properties: {
|
|
1414
|
+
topic: { type: "string" },
|
|
1415
|
+
startId: {
|
|
1416
|
+
type: "string",
|
|
1417
|
+
description: "mNNNNN ref at the start of the range"
|
|
1418
|
+
},
|
|
1419
|
+
endId: {
|
|
1420
|
+
type: "string",
|
|
1421
|
+
description: "mNNNNN ref at the end of the range"
|
|
1422
|
+
},
|
|
1423
|
+
summary: {
|
|
1424
|
+
type: "string",
|
|
1425
|
+
description: "Self-contained summary replacing the range"
|
|
1426
|
+
}
|
|
1427
|
+
},
|
|
1428
|
+
required: ["startId", "endId", "summary"]
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
},
|
|
1432
|
+
required: ["content"]
|
|
1433
|
+
}
|
|
1434
|
+
};
|
|
1435
|
+
var DECOMPRESS_TOOL_GOOGLE = {
|
|
1436
|
+
name: DECOMPRESS_TOOL_NAME,
|
|
1437
|
+
description: DECOMPRESS_TOOL_OPENAI.function.description,
|
|
1438
|
+
parameters: DECOMPRESS_TOOL_OPENAI.function.parameters
|
|
1439
|
+
};
|
|
1440
|
+
var SEARCH_CONTEXT_TOOL_GOOGLE = {
|
|
1441
|
+
name: SEARCH_CONTEXT_TOOL_NAME,
|
|
1442
|
+
description: SEARCH_CONTEXT_TOOL_OPENAI.function.description,
|
|
1443
|
+
parameters: SEARCH_CONTEXT_TOOL_OPENAI.function.parameters
|
|
1444
|
+
};
|
|
1445
|
+
var ACP_STATUS_TOOL_GOOGLE = {
|
|
1446
|
+
name: ACP_STATUS_TOOL_NAME,
|
|
1447
|
+
description: ACP_STATUS_TOOL_OPENAI.function.description,
|
|
1448
|
+
parameters: ACP_STATUS_TOOL_OPENAI.function.parameters
|
|
1449
|
+
};
|
|
1450
|
+
var ACP_TOOLS_GOOGLE = [
|
|
1451
|
+
COMPRESS_TOOL_GOOGLE,
|
|
1452
|
+
DECOMPRESS_TOOL_GOOGLE,
|
|
1453
|
+
SEARCH_CONTEXT_TOOL_GOOGLE,
|
|
1454
|
+
ACP_STATUS_TOOL_GOOGLE
|
|
1455
|
+
];
|
|
1456
|
+
var ABSORB_TOOL_GOOGLE = {
|
|
1457
|
+
name: ABSORB_TOOL_NAME,
|
|
1458
|
+
description: ABSORB_TOOL_DESCRIPTION,
|
|
1459
|
+
parameters: ABSORB_PARAMETERS
|
|
1460
|
+
};
|
|
1394
1461
|
|
|
1395
1462
|
// src/protected.ts
|
|
1396
1463
|
var ALWAYS_PROTECTED_TOOLS = ["compress"];
|
|
@@ -2002,6 +2069,73 @@ function computeTurnGroups(messages) {
|
|
|
2002
2069
|
}
|
|
2003
2070
|
return groups;
|
|
2004
2071
|
}
|
|
2072
|
+
function computeIntegrityWithdrawals(messages, foldedIds) {
|
|
2073
|
+
const remaining = new Set(foldedIds);
|
|
2074
|
+
const withdrawn = /* @__PURE__ */ new Set();
|
|
2075
|
+
const handledTurns = /* @__PURE__ */ new Set();
|
|
2076
|
+
const handledPairs = /* @__PURE__ */ new Set();
|
|
2077
|
+
const reasoningIds = /* @__PURE__ */ new Set();
|
|
2078
|
+
const callIds = /* @__PURE__ */ new Set();
|
|
2079
|
+
const callIdByMessageId = /* @__PURE__ */ new Map();
|
|
2080
|
+
const resultIdByCallId = /* @__PURE__ */ new Map();
|
|
2081
|
+
for (const m of messages) {
|
|
2082
|
+
if (!m.id) continue;
|
|
2083
|
+
if (m.contentType === "reasoning") reasoningIds.add(m.id);
|
|
2084
|
+
if (m.role === "assistant" && m.contentType === "tool-call") {
|
|
2085
|
+
callIds.add(m.id);
|
|
2086
|
+
if (typeof m.toolCallId === "string") {
|
|
2087
|
+
callIdByMessageId.set(m.id, m.toolCallId);
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
if (m.contentType === "tool-result" && typeof m.toolCallId === "string") {
|
|
2091
|
+
if (!resultIdByCallId.has(m.toolCallId)) {
|
|
2092
|
+
resultIdByCallId.set(m.toolCallId, m.id);
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
const groups = computeTurnGroups(messages);
|
|
2097
|
+
let changed = true;
|
|
2098
|
+
while (changed) {
|
|
2099
|
+
changed = false;
|
|
2100
|
+
for (let g = 0; g < groups.length; g++) {
|
|
2101
|
+
if (handledTurns.has(g)) continue;
|
|
2102
|
+
const group = groups[g];
|
|
2103
|
+
const foldHasReasoning = group.some(
|
|
2104
|
+
(id) => remaining.has(id) && reasoningIds.has(id)
|
|
2105
|
+
);
|
|
2106
|
+
if (!foldHasReasoning) continue;
|
|
2107
|
+
const keptHasCall = group.some(
|
|
2108
|
+
(id) => !remaining.has(id) && callIds.has(id)
|
|
2109
|
+
);
|
|
2110
|
+
if (!keptHasCall) continue;
|
|
2111
|
+
handledTurns.add(g);
|
|
2112
|
+
for (const id of group) {
|
|
2113
|
+
remaining.delete(id);
|
|
2114
|
+
withdrawn.add(id);
|
|
2115
|
+
}
|
|
2116
|
+
changed = true;
|
|
2117
|
+
}
|
|
2118
|
+
for (const m of messages) {
|
|
2119
|
+
if (!m.id || !callIds.has(m.id)) continue;
|
|
2120
|
+
const callId = callIdByMessageId.get(m.id);
|
|
2121
|
+
if (callId === void 0 || handledPairs.has(callId)) continue;
|
|
2122
|
+
const resultId = resultIdByCallId.get(callId);
|
|
2123
|
+
if (resultId === void 0) continue;
|
|
2124
|
+
if (remaining.has(m.id) === remaining.has(resultId)) continue;
|
|
2125
|
+
handledPairs.add(callId);
|
|
2126
|
+
remaining.delete(m.id);
|
|
2127
|
+
remaining.delete(resultId);
|
|
2128
|
+
withdrawn.add(m.id);
|
|
2129
|
+
withdrawn.add(resultId);
|
|
2130
|
+
changed = true;
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
return {
|
|
2134
|
+
withdrawn,
|
|
2135
|
+
splitTurnCount: handledTurns.size,
|
|
2136
|
+
splitPairCount: handledPairs.size
|
|
2137
|
+
};
|
|
2138
|
+
}
|
|
2005
2139
|
|
|
2006
2140
|
// src/recommend.ts
|
|
2007
2141
|
function estimateTextTokens(text) {
|
|
@@ -2053,7 +2187,7 @@ function computeProtectedRefs(messages, state, config, countTokens = estimateTex
|
|
|
2053
2187
|
return result;
|
|
2054
2188
|
}
|
|
2055
2189
|
function buildCompressibleRanges(messages, state, config, protectedZoneRefs, countTokens = estimateTextTokens) {
|
|
2056
|
-
|
|
2190
|
+
let compressibleMsgs = [];
|
|
2057
2191
|
const protectedMsgs = [];
|
|
2058
2192
|
const protectedCallIds = collectProtectedToolCallIds(messages, config);
|
|
2059
2193
|
let skipSinceCompressible = false;
|
|
@@ -2083,6 +2217,7 @@ function buildCompressibleRanges(messages, state, config, protectedZoneRefs, cou
|
|
|
2083
2217
|
continue;
|
|
2084
2218
|
}
|
|
2085
2219
|
compressibleMsgs.push({
|
|
2220
|
+
id: msg.id,
|
|
2086
2221
|
ref,
|
|
2087
2222
|
gapBefore: skipSinceCompressible,
|
|
2088
2223
|
tokens: countMessageTokens(msg, countTokens),
|
|
@@ -2093,6 +2228,23 @@ function buildCompressibleRanges(messages, state, config, protectedZoneRefs, cou
|
|
|
2093
2228
|
skipSinceCompressible = false;
|
|
2094
2229
|
skipSinceProtected = true;
|
|
2095
2230
|
}
|
|
2231
|
+
const unfoldedIds = computeIntegrityWithdrawals(
|
|
2232
|
+
messages,
|
|
2233
|
+
new Set(compressibleMsgs.map((info) => info.id))
|
|
2234
|
+
).withdrawn;
|
|
2235
|
+
if (unfoldedIds.size > 0) {
|
|
2236
|
+
let gapPending = false;
|
|
2237
|
+
const kept = [];
|
|
2238
|
+
for (const info of compressibleMsgs) {
|
|
2239
|
+
if (unfoldedIds.has(info.id)) {
|
|
2240
|
+
gapPending = true;
|
|
2241
|
+
continue;
|
|
2242
|
+
}
|
|
2243
|
+
kept.push(gapPending ? { ...info, gapBefore: true } : info);
|
|
2244
|
+
gapPending = false;
|
|
2245
|
+
}
|
|
2246
|
+
compressibleMsgs = kept;
|
|
2247
|
+
}
|
|
2096
2248
|
const compressible = [];
|
|
2097
2249
|
let cur = null;
|
|
2098
2250
|
for (const info of compressibleMsgs) {
|
|
@@ -2764,49 +2916,11 @@ function applySingleRange(input) {
|
|
|
2764
2916
|
);
|
|
2765
2917
|
}
|
|
2766
2918
|
{
|
|
2767
|
-
const
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
if (m.role === "assistant" && m.contentType === "tool-call")
|
|
2773
|
-
callIds.add(m.id);
|
|
2774
|
-
}
|
|
2775
|
-
const withdrawIds = /* @__PURE__ */ new Set();
|
|
2776
|
-
let splitTurnCount = 0;
|
|
2777
|
-
for (const group of computeTurnGroups(input.messages)) {
|
|
2778
|
-
const foldHasReasoning = group.some(
|
|
2779
|
-
(id) => effectiveMessageIds.has(id) && reasoningIds.has(id)
|
|
2780
|
-
);
|
|
2781
|
-
if (!foldHasReasoning) continue;
|
|
2782
|
-
const keptHasCall = group.some(
|
|
2783
|
-
(id) => !effectiveMessageIds.has(id) && callIds.has(id)
|
|
2784
|
-
);
|
|
2785
|
-
if (!keptHasCall) continue;
|
|
2786
|
-
splitTurnCount++;
|
|
2787
|
-
for (const id of group) withdrawIds.add(id);
|
|
2788
|
-
}
|
|
2789
|
-
const resultIdByCallId = /* @__PURE__ */ new Map();
|
|
2790
|
-
for (const m of input.messages) {
|
|
2791
|
-
if (!m.id || m.contentType !== "tool-result") continue;
|
|
2792
|
-
if (typeof m.toolCallId !== "string") continue;
|
|
2793
|
-
if (!resultIdByCallId.has(m.toolCallId)) {
|
|
2794
|
-
resultIdByCallId.set(m.toolCallId, m.id);
|
|
2795
|
-
}
|
|
2796
|
-
}
|
|
2797
|
-
let splitPairCount = 0;
|
|
2798
|
-
for (const m of input.messages) {
|
|
2799
|
-
if (!m.id || m.contentType !== "tool-call") continue;
|
|
2800
|
-
if (typeof m.toolCallId !== "string") continue;
|
|
2801
|
-
const resultId = resultIdByCallId.get(m.toolCallId);
|
|
2802
|
-
if (resultId === void 0) continue;
|
|
2803
|
-
if (effectiveMessageIds.has(m.id) === effectiveMessageIds.has(resultId)) {
|
|
2804
|
-
continue;
|
|
2805
|
-
}
|
|
2806
|
-
withdrawIds.add(m.id);
|
|
2807
|
-
withdrawIds.add(resultId);
|
|
2808
|
-
splitPairCount++;
|
|
2809
|
-
}
|
|
2919
|
+
const {
|
|
2920
|
+
withdrawn: withdrawIds,
|
|
2921
|
+
splitTurnCount,
|
|
2922
|
+
splitPairCount
|
|
2923
|
+
} = computeIntegrityWithdrawals(input.messages, effectiveMessageIds);
|
|
2810
2924
|
if (withdrawIds.size > 0) {
|
|
2811
2925
|
for (const id of withdrawIds) effectiveMessageIds.delete(id);
|
|
2812
2926
|
const beforeWithdraw = filteredIds.length;
|
|
@@ -3226,6 +3340,39 @@ function countOccurrences(haystack, needle) {
|
|
|
3226
3340
|
return count;
|
|
3227
3341
|
}
|
|
3228
3342
|
|
|
3343
|
+
// src/output-headroom.ts
|
|
3344
|
+
var DEFAULT_OUTPUT_HEADROOM_MAX_PCT = 0.25;
|
|
3345
|
+
function resolveOutputHeadroomCap(value) {
|
|
3346
|
+
if (value === void 0) return DEFAULT_OUTPUT_HEADROOM_MAX_PCT;
|
|
3347
|
+
if (typeof value === "number") return value;
|
|
3348
|
+
const s = value.trim();
|
|
3349
|
+
return s.endsWith("%") ? Number(s.slice(0, -1)) / 100 : Number(s);
|
|
3350
|
+
}
|
|
3351
|
+
function reserveOutputHeadroom(window, maxOutput, capPct = 1) {
|
|
3352
|
+
if (Number.isFinite(window) && window > 0 && Number.isFinite(maxOutput) && maxOutput > 0 && maxOutput < window) {
|
|
3353
|
+
const cap = Number.isFinite(capPct) ? Math.max(0, Math.min(capPct, 1)) : 1;
|
|
3354
|
+
const reserved = Math.min(maxOutput, cap * window);
|
|
3355
|
+
return reserved > 0 ? window - reserved : window;
|
|
3356
|
+
}
|
|
3357
|
+
return window;
|
|
3358
|
+
}
|
|
3359
|
+
var ANTHROPIC_PROTOCOLS = /* @__PURE__ */ new Set(["anthropic", "anthropicmessages"]);
|
|
3360
|
+
function normalizeProtocol(protocol) {
|
|
3361
|
+
return protocol.trim().toLowerCase().replace(/[-_\s]/g, "");
|
|
3362
|
+
}
|
|
3363
|
+
function shouldReserveOutputHeadroom(protocol) {
|
|
3364
|
+
if (protocol === void 0) return true;
|
|
3365
|
+
return !ANTHROPIC_PROTOCOLS.has(normalizeProtocol(protocol));
|
|
3366
|
+
}
|
|
3367
|
+
function applyOutputHeadroom(config, model, capPct = 1) {
|
|
3368
|
+
const maxOutput = model?.maxTokens ?? 0;
|
|
3369
|
+
if (shouldReserveOutputHeadroom(model?.api)) {
|
|
3370
|
+
const reserved = reserveOutputHeadroom(config.modelContextLimit, maxOutput, capPct);
|
|
3371
|
+
if (reserved !== config.modelContextLimit) return { ...config, modelContextLimit: reserved };
|
|
3372
|
+
}
|
|
3373
|
+
return config;
|
|
3374
|
+
}
|
|
3375
|
+
|
|
3229
3376
|
// src/packs.ts
|
|
3230
3377
|
import { readFileSync, readdirSync } from "fs";
|
|
3231
3378
|
import * as path from "path";
|
|
@@ -5110,6 +5257,7 @@ export {
|
|
|
5110
5257
|
ABSORB_PROMPT_MARKER,
|
|
5111
5258
|
ABSORB_TOOL,
|
|
5112
5259
|
ABSORB_TOOL_DESCRIPTION,
|
|
5260
|
+
ABSORB_TOOL_GOOGLE,
|
|
5113
5261
|
ABSORB_TOOL_NAME,
|
|
5114
5262
|
ABSORB_TOOL_OPENAI,
|
|
5115
5263
|
ACP_CACHE_TOOL,
|
|
@@ -5127,12 +5275,14 @@ export {
|
|
|
5127
5275
|
ACP_STATUS_CLOSE,
|
|
5128
5276
|
ACP_STATUS_OPEN,
|
|
5129
5277
|
ACP_STATUS_TOOL,
|
|
5278
|
+
ACP_STATUS_TOOL_GOOGLE,
|
|
5130
5279
|
ACP_STATUS_TOOL_NAME,
|
|
5131
5280
|
ACP_STATUS_TOOL_OPENAI,
|
|
5132
5281
|
ACP_STATUS_TOOL_RESPONSES,
|
|
5133
5282
|
ACP_TEXT_CLOSE,
|
|
5134
5283
|
ACP_TEXT_OPEN,
|
|
5135
5284
|
ACP_TOOLS_ANTHROPIC,
|
|
5285
|
+
ACP_TOOLS_GOOGLE,
|
|
5136
5286
|
ACP_TOOLS_OPENAI,
|
|
5137
5287
|
ACP_TOOLS_RESPONSES,
|
|
5138
5288
|
ACP_TOOL_NAMES,
|
|
@@ -5140,19 +5290,23 @@ export {
|
|
|
5140
5290
|
BoundaryNotFoundError,
|
|
5141
5291
|
COMPRESS_PHILOSOPHY,
|
|
5142
5292
|
COMPRESS_TOOL,
|
|
5293
|
+
COMPRESS_TOOL_GOOGLE,
|
|
5143
5294
|
COMPRESS_TOOL_NAME,
|
|
5144
5295
|
COMPRESS_TOOL_OPENAI,
|
|
5145
5296
|
COMPRESS_TOOL_RESPONSES,
|
|
5146
5297
|
DECOMPRESS_TOOL,
|
|
5298
|
+
DECOMPRESS_TOOL_GOOGLE,
|
|
5147
5299
|
DECOMPRESS_TOOL_NAME,
|
|
5148
5300
|
DECOMPRESS_TOOL_OPENAI,
|
|
5149
5301
|
DECOMPRESS_TOOL_RESPONSES,
|
|
5150
5302
|
DEFAULT_ABSORB_CONFIG,
|
|
5151
5303
|
DEFAULT_ALGORITHM,
|
|
5304
|
+
DEFAULT_OUTPUT_HEADROOM_MAX_PCT,
|
|
5152
5305
|
DEFAULT_ROLE_WEIGHTS,
|
|
5153
5306
|
HOW_TO_COMPRESS_RULES,
|
|
5154
5307
|
LEAN_HOW_TO_COMPRESS,
|
|
5155
5308
|
SEARCH_CONTEXT_TOOL,
|
|
5309
|
+
SEARCH_CONTEXT_TOOL_GOOGLE,
|
|
5156
5310
|
SEARCH_CONTEXT_TOOL_NAME,
|
|
5157
5311
|
SEARCH_CONTEXT_TOOL_OPENAI,
|
|
5158
5312
|
SEARCH_CONTEXT_TOOL_RESPONSES,
|
|
@@ -5169,6 +5323,7 @@ export {
|
|
|
5169
5323
|
applyAbsorb,
|
|
5170
5324
|
applyAcpToolOverrides,
|
|
5171
5325
|
applyMessageFilters,
|
|
5326
|
+
applyOutputHeadroom,
|
|
5172
5327
|
applySectionOverrides,
|
|
5173
5328
|
assignRefs,
|
|
5174
5329
|
blockById,
|
|
@@ -5249,9 +5404,11 @@ export {
|
|
|
5249
5404
|
renderNudgeText,
|
|
5250
5405
|
renderRefsNode,
|
|
5251
5406
|
renderVisibleRefs,
|
|
5407
|
+
reserveOutputHeadroom,
|
|
5252
5408
|
resolveAbsorbConfig,
|
|
5253
5409
|
resolveBlockSpan,
|
|
5254
5410
|
resolveBoundaries,
|
|
5411
|
+
resolveOutputHeadroomCap,
|
|
5255
5412
|
resolvePrompts,
|
|
5256
5413
|
resolveTransformChannel,
|
|
5257
5414
|
runPipeline,
|
|
@@ -5259,6 +5416,7 @@ export {
|
|
|
5259
5416
|
searchBlocks,
|
|
5260
5417
|
searchBlocksAsync,
|
|
5261
5418
|
setDocCacheCap,
|
|
5419
|
+
shouldReserveOutputHeadroom,
|
|
5262
5420
|
summarizeFoldEconomics,
|
|
5263
5421
|
summaryMessageId,
|
|
5264
5422
|
syncBlocks,
|