acp-kernel 0.0.87-pr.389.248 → 0.0.87
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 +351 -54
- package/dist/compress-tools.d.ts.map +1 -1
- package/dist/index.js +83 -83
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -588,50 +588,89 @@ var ACP_SEARCH_OPEN = "<acp_search>";
|
|
|
588
588
|
var ACP_SEARCH_CLOSE = "</acp_search>";
|
|
589
589
|
var ACP_DECOMPRESS_OPEN = "<acp_decompress>";
|
|
590
590
|
var ACP_DECOMPRESS_CLOSE = "</acp_decompress>";
|
|
591
|
-
var
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
591
|
+
var COMPRESS_RANGE_OBJECT = {
|
|
592
|
+
type: "object",
|
|
593
|
+
properties: {
|
|
594
|
+
topic: { type: "string" },
|
|
595
|
+
startId: {
|
|
596
|
+
type: "string",
|
|
597
|
+
description: "mNNNNN ref at the start of the range"
|
|
598
|
+
},
|
|
599
|
+
endId: {
|
|
600
|
+
type: "string",
|
|
601
|
+
description: "mNNNNN ref at the end of the range"
|
|
602
|
+
},
|
|
603
|
+
startRef: {
|
|
604
|
+
type: "string",
|
|
605
|
+
description: "Alternate spelling of startId"
|
|
606
|
+
},
|
|
607
|
+
endRef: {
|
|
608
|
+
type: "string",
|
|
609
|
+
description: "Alternate spelling of endId"
|
|
610
|
+
},
|
|
611
|
+
summary: {
|
|
612
|
+
type: "string",
|
|
613
|
+
description: "Self-contained summary replacing the range"
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
anyOf: [
|
|
617
|
+
{ required: ["startId", "endId", "summary"] },
|
|
618
|
+
{ required: ["startRef", "endRef", "summary"] }
|
|
619
|
+
]
|
|
620
|
+
};
|
|
621
|
+
var COMPRESS_PARAMETERS = {
|
|
622
|
+
type: "object",
|
|
623
|
+
properties: {
|
|
624
|
+
topic: {
|
|
625
|
+
type: "string",
|
|
626
|
+
description: "Optional short title for the compressed range"
|
|
627
|
+
},
|
|
628
|
+
content: {
|
|
629
|
+
type: ["array", "string"],
|
|
630
|
+
description: "One or more ranges to compress into separate summary blocks. Array form (preferred): one entry per range \u2014 line form (one STRING per range: first line 'm00150\u2013m00220 optional topic', remaining lines the markdown summary verbatim) or object form {startId,endId,summary,topic?}. String form also accepted: bare line-form text, or a JSON-encoded array of ranges (some gateways stringify arrays). REQUIRED unless the flat single-range form is used.",
|
|
631
|
+
items: {
|
|
632
|
+
anyOf: [
|
|
633
|
+
{
|
|
634
|
+
type: "string",
|
|
635
|
+
description: "Line form: first line 'm00150\u2013m00220 optional topic', remaining lines the summary markdown, verbatim (no JSON escaping)"
|
|
636
|
+
},
|
|
637
|
+
COMPRESS_RANGE_OBJECT
|
|
638
|
+
]
|
|
631
639
|
}
|
|
632
640
|
},
|
|
633
|
-
|
|
634
|
-
|
|
641
|
+
startId: {
|
|
642
|
+
type: "string",
|
|
643
|
+
description: "Flat single-range form (no content): mNNNNN ref at the start of the range"
|
|
644
|
+
},
|
|
645
|
+
endId: {
|
|
646
|
+
type: "string",
|
|
647
|
+
description: "Flat single-range form (no content): mNNNNN ref at the end of the range"
|
|
648
|
+
},
|
|
649
|
+
startRef: {
|
|
650
|
+
type: "string",
|
|
651
|
+
description: "Flat single-range form: alternate spelling of startId"
|
|
652
|
+
},
|
|
653
|
+
endRef: {
|
|
654
|
+
type: "string",
|
|
655
|
+
description: "Flat single-range form: alternate spelling of endId"
|
|
656
|
+
},
|
|
657
|
+
summary: {
|
|
658
|
+
type: "string",
|
|
659
|
+
description: "Flat single-range form (no content): self-contained summary replacing the range"
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
anyOf: [
|
|
663
|
+
{ required: ["content"] },
|
|
664
|
+
{
|
|
665
|
+
required: ["summary"],
|
|
666
|
+
anyOf: [{ required: ["startId", "endId"] }, { required: ["startRef", "endRef"] }]
|
|
667
|
+
}
|
|
668
|
+
]
|
|
669
|
+
};
|
|
670
|
+
var COMPRESS_TOOL = {
|
|
671
|
+
name: COMPRESS_TOOL_NAME,
|
|
672
|
+
description: "Replace consumed conversation ranges with self-contained summaries you write, identified by their refs. Line form (preferred): content = one STRING per range \u2014 first line 'm00150\u2013m00220 optional topic', remaining lines the markdown summary written verbatim (no JSON structure, no escaping). Also accepted: object entries {startId,endId,summary,topic?} in the content array, content as a single string (bare line form or JSON-encoded array), and a flat single-range call {startId,endId,summary,topic?} without content. Use when content is genuinely consumed. REQUIRED \u2014 compress without content or flat range fields is invalid.",
|
|
673
|
+
input_schema: COMPRESS_PARAMETERS
|
|
635
674
|
};
|
|
636
675
|
function parseCompressInput(input, callId, onWarn) {
|
|
637
676
|
if (!input || typeof input !== "object") {
|
|
@@ -681,47 +720,7 @@ var COMPRESS_TOOL_OPENAI = {
|
|
|
681
720
|
function: {
|
|
682
721
|
name: COMPRESS_TOOL_NAME,
|
|
683
722
|
description: COMPRESS_TOOL.description,
|
|
684
|
-
parameters:
|
|
685
|
-
type: "object",
|
|
686
|
-
properties: {
|
|
687
|
-
topic: {
|
|
688
|
-
type: "string",
|
|
689
|
-
description: "Optional short title for the compressed range"
|
|
690
|
-
},
|
|
691
|
-
content: {
|
|
692
|
-
type: "array",
|
|
693
|
-
description: "One or more ranges to compress into separate summary blocks. Line form (preferred): one string per range \u2014 first line 'm00150\u2013m00220 optional topic', remaining lines the markdown summary verbatim. Object form also accepted. REQUIRED \u2014 compress without content is invalid.",
|
|
694
|
-
items: {
|
|
695
|
-
anyOf: [
|
|
696
|
-
{
|
|
697
|
-
type: "string",
|
|
698
|
-
description: "Line form: first line 'm00150\u2013m00220 optional topic', remaining lines the summary markdown, verbatim (no JSON escaping)"
|
|
699
|
-
},
|
|
700
|
-
{
|
|
701
|
-
type: "object",
|
|
702
|
-
properties: {
|
|
703
|
-
topic: { type: "string" },
|
|
704
|
-
startId: {
|
|
705
|
-
type: "string",
|
|
706
|
-
description: "mNNNNN ref at the start of the range"
|
|
707
|
-
},
|
|
708
|
-
endId: {
|
|
709
|
-
type: "string",
|
|
710
|
-
description: "mNNNNN ref at the end of the range"
|
|
711
|
-
},
|
|
712
|
-
summary: {
|
|
713
|
-
type: "string",
|
|
714
|
-
description: "Self-contained summary replacing the range"
|
|
715
|
-
}
|
|
716
|
-
},
|
|
717
|
-
required: ["startId", "endId", "summary"]
|
|
718
|
-
}
|
|
719
|
-
]
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
},
|
|
723
|
-
required: ["content"]
|
|
724
|
-
}
|
|
723
|
+
parameters: COMPRESS_PARAMETERS
|
|
725
724
|
}
|
|
726
725
|
};
|
|
727
726
|
var FUNCTION_PROMPT_SECTIONS = [
|
|
@@ -7895,6 +7894,7 @@ export {
|
|
|
7895
7894
|
ACP_TOOL_NAMES,
|
|
7896
7895
|
BLOCKED_REF,
|
|
7897
7896
|
BoundaryNotFoundError,
|
|
7897
|
+
COMPRESS_PARAMETERS,
|
|
7898
7898
|
COMPRESS_PHILOSOPHY,
|
|
7899
7899
|
COMPRESS_TOOL,
|
|
7900
7900
|
COMPRESS_TOOL_GOOGLE,
|