pi-smart-compact 9.2.1 → 9.3.1
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/ARCHITECTURE.md +2 -2
- package/CHANGELOG.md +101 -0
- package/dist/app/steps/extract.d.ts.map +1 -1
- package/dist/app/steps/synthesize.d.ts.map +1 -1
- package/dist/app/steps/verify.d.ts.map +1 -1
- package/dist/constants.d.ts +1 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/domain/scrub.d.ts.map +1 -1
- package/dist/domain/summary-parse.d.ts +5 -0
- package/dist/domain/summary-parse.d.ts.map +1 -1
- package/dist/index.js +721 -155
- package/dist/infra/llm-client.d.ts +1 -1
- package/dist/infra/llm-client.d.ts.map +1 -1
- package/dist/infra/paths.d.ts +9 -0
- package/dist/infra/paths.d.ts.map +1 -1
- package/dist/phases/synthesize.d.ts +3 -5
- package/dist/phases/synthesize.d.ts.map +1 -1
- package/dist/phases/verify.d.ts +2 -1
- package/dist/phases/verify.d.ts.map +1 -1
- package/dist/provider-eval.js +393 -58
- package/dist/provider-scenario-eval.js +801 -249
- package/dist/telemetry-report.js +366 -31
- package/dist/utils/extraction.d.ts.map +1 -1
- package/dist/utils/file-needles.d.ts.map +1 -1
- package/dist/utils/file-ref-detect.d.ts.map +1 -1
- package/dist/utils/session-log.d.ts.map +1 -1
- package/dist/utils/state.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/telemetry-report.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
4
|
// src/constants.ts
|
|
5
|
-
var VERSION = "9.
|
|
5
|
+
var VERSION = "9.3.1";
|
|
6
6
|
var SETTLED_TRIGGER_COOLDOWN_MS = 10 * 60000;
|
|
7
7
|
var COMPACT_SYSTEM_PREFIX = "You are an expert conversation summarizer for a coding agent. " + "Produce structured markdown summaries. " + "Follow output format exactly. " + "Use EXACT names \u2014 never paraphrase code identifiers. " + "Trust deterministic extraction data over intuition.";
|
|
8
8
|
var PROFILES = {
|
|
@@ -490,8 +490,9 @@ function readJsonlTail(target, limit, maxBytes = 512 * 1024) {
|
|
|
490
490
|
|
|
491
491
|
// src/infra/paths.ts
|
|
492
492
|
import path from "path";
|
|
493
|
+
import os from "os";
|
|
493
494
|
function home() {
|
|
494
|
-
return process.env.HOME ??
|
|
495
|
+
return process.env.HOME ?? os.homedir();
|
|
495
496
|
}
|
|
496
497
|
function piAgentDir() {
|
|
497
498
|
return path.join(home(), ".pi", "agent");
|
|
@@ -534,6 +535,188 @@ function lruSet(m, key, value, max) {
|
|
|
534
535
|
}
|
|
535
536
|
|
|
536
537
|
// src/utils/tokens.ts
|
|
538
|
+
var PROVIDER_MAP = {
|
|
539
|
+
"zai-anthropic": {
|
|
540
|
+
maxOutputTokens: 8192,
|
|
541
|
+
supportsTools: "probe",
|
|
542
|
+
jsonReliability: "high",
|
|
543
|
+
instructionFollowing: "high",
|
|
544
|
+
tokenRatioEstimate: 3.5,
|
|
545
|
+
concurrencyLimit: 3,
|
|
546
|
+
cacheStrategy: "anthropic",
|
|
547
|
+
timeoutMultiplier: 1.2,
|
|
548
|
+
singlePassTokenMultiplier: 1,
|
|
549
|
+
multimodal: "metadata-only"
|
|
550
|
+
},
|
|
551
|
+
"kimi-coding": {
|
|
552
|
+
maxOutputTokens: 8192,
|
|
553
|
+
supportsTools: "probe",
|
|
554
|
+
jsonReliability: "high",
|
|
555
|
+
instructionFollowing: "high",
|
|
556
|
+
tokenRatioEstimate: 3.5,
|
|
557
|
+
concurrencyLimit: 2,
|
|
558
|
+
cacheStrategy: "anthropic",
|
|
559
|
+
timeoutMultiplier: 1.5,
|
|
560
|
+
singlePassTokenMultiplier: 0.95,
|
|
561
|
+
multimodal: "metadata-only"
|
|
562
|
+
},
|
|
563
|
+
anthropic: {
|
|
564
|
+
maxOutputTokens: 8192,
|
|
565
|
+
supportsTools: true,
|
|
566
|
+
jsonReliability: "high",
|
|
567
|
+
instructionFollowing: "high",
|
|
568
|
+
tokenRatioEstimate: 3.5,
|
|
569
|
+
concurrencyLimit: 3,
|
|
570
|
+
cacheStrategy: "anthropic",
|
|
571
|
+
timeoutMultiplier: 1.2,
|
|
572
|
+
singlePassTokenMultiplier: 1,
|
|
573
|
+
multimodal: "native"
|
|
574
|
+
},
|
|
575
|
+
openai: {
|
|
576
|
+
maxOutputTokens: 16384,
|
|
577
|
+
supportsTools: true,
|
|
578
|
+
jsonReliability: "high",
|
|
579
|
+
instructionFollowing: "high",
|
|
580
|
+
tokenRatioEstimate: 4,
|
|
581
|
+
concurrencyLimit: 5,
|
|
582
|
+
cacheStrategy: "openai",
|
|
583
|
+
timeoutMultiplier: 1,
|
|
584
|
+
singlePassTokenMultiplier: 1.15,
|
|
585
|
+
multimodal: "native"
|
|
586
|
+
},
|
|
587
|
+
google: {
|
|
588
|
+
maxOutputTokens: 8192,
|
|
589
|
+
supportsTools: true,
|
|
590
|
+
jsonReliability: "high",
|
|
591
|
+
instructionFollowing: "high",
|
|
592
|
+
tokenRatioEstimate: 3.8,
|
|
593
|
+
concurrencyLimit: 3,
|
|
594
|
+
cacheStrategy: "openai",
|
|
595
|
+
timeoutMultiplier: 1.15,
|
|
596
|
+
singlePassTokenMultiplier: 1.1,
|
|
597
|
+
multimodal: "native"
|
|
598
|
+
},
|
|
599
|
+
deepseek: {
|
|
600
|
+
maxOutputTokens: 8192,
|
|
601
|
+
supportsTools: true,
|
|
602
|
+
jsonReliability: "medium",
|
|
603
|
+
instructionFollowing: "medium",
|
|
604
|
+
tokenRatioEstimate: 3.6,
|
|
605
|
+
concurrencyLimit: 2,
|
|
606
|
+
cacheStrategy: "none",
|
|
607
|
+
timeoutMultiplier: 1.5,
|
|
608
|
+
singlePassTokenMultiplier: 0.85,
|
|
609
|
+
multimodal: "metadata-only"
|
|
610
|
+
},
|
|
611
|
+
minimax: {
|
|
612
|
+
maxOutputTokens: 4096,
|
|
613
|
+
supportsTools: "probe",
|
|
614
|
+
jsonReliability: "medium",
|
|
615
|
+
instructionFollowing: "medium",
|
|
616
|
+
tokenRatioEstimate: 3.8,
|
|
617
|
+
concurrencyLimit: 2,
|
|
618
|
+
cacheStrategy: "anthropic",
|
|
619
|
+
timeoutMultiplier: 1.6,
|
|
620
|
+
singlePassTokenMultiplier: 0.8,
|
|
621
|
+
multimodal: "metadata-only"
|
|
622
|
+
},
|
|
623
|
+
"xiaomi-token-plan": {
|
|
624
|
+
maxOutputTokens: 8192,
|
|
625
|
+
supportsTools: "probe",
|
|
626
|
+
jsonReliability: "medium",
|
|
627
|
+
instructionFollowing: "medium",
|
|
628
|
+
tokenRatioEstimate: 3.3,
|
|
629
|
+
concurrencyLimit: 2,
|
|
630
|
+
cacheStrategy: "openai",
|
|
631
|
+
timeoutMultiplier: 1.35,
|
|
632
|
+
singlePassTokenMultiplier: 0.9,
|
|
633
|
+
multimodal: "metadata-only"
|
|
634
|
+
},
|
|
635
|
+
"xiaomi-mimo": {
|
|
636
|
+
maxOutputTokens: 8192,
|
|
637
|
+
supportsTools: "probe",
|
|
638
|
+
jsonReliability: "medium",
|
|
639
|
+
instructionFollowing: "medium",
|
|
640
|
+
tokenRatioEstimate: 3.3,
|
|
641
|
+
concurrencyLimit: 2,
|
|
642
|
+
cacheStrategy: "anthropic",
|
|
643
|
+
timeoutMultiplier: 1.35,
|
|
644
|
+
singlePassTokenMultiplier: 0.9,
|
|
645
|
+
multimodal: "metadata-only"
|
|
646
|
+
},
|
|
647
|
+
crofai: {
|
|
648
|
+
maxOutputTokens: 8192,
|
|
649
|
+
supportsTools: "probe",
|
|
650
|
+
jsonReliability: "medium",
|
|
651
|
+
instructionFollowing: "medium",
|
|
652
|
+
tokenRatioEstimate: 3.8,
|
|
653
|
+
concurrencyLimit: 3,
|
|
654
|
+
cacheStrategy: "none",
|
|
655
|
+
timeoutMultiplier: 1.2,
|
|
656
|
+
singlePassTokenMultiplier: 0.95,
|
|
657
|
+
multimodal: "metadata-only"
|
|
658
|
+
},
|
|
659
|
+
mistral: {
|
|
660
|
+
maxOutputTokens: 8192,
|
|
661
|
+
supportsTools: true,
|
|
662
|
+
jsonReliability: "high",
|
|
663
|
+
instructionFollowing: "high",
|
|
664
|
+
tokenRatioEstimate: 3.5,
|
|
665
|
+
concurrencyLimit: 3,
|
|
666
|
+
cacheStrategy: "openai",
|
|
667
|
+
timeoutMultiplier: 1.2,
|
|
668
|
+
singlePassTokenMultiplier: 1,
|
|
669
|
+
multimodal: "metadata-only"
|
|
670
|
+
},
|
|
671
|
+
xai: {
|
|
672
|
+
maxOutputTokens: 8192,
|
|
673
|
+
supportsTools: true,
|
|
674
|
+
jsonReliability: "medium",
|
|
675
|
+
instructionFollowing: "high",
|
|
676
|
+
tokenRatioEstimate: 3.8,
|
|
677
|
+
concurrencyLimit: 3,
|
|
678
|
+
cacheStrategy: "openai",
|
|
679
|
+
timeoutMultiplier: 1.2,
|
|
680
|
+
singlePassTokenMultiplier: 1,
|
|
681
|
+
multimodal: "native"
|
|
682
|
+
}
|
|
683
|
+
};
|
|
684
|
+
var PROVIDER_ALIASES = [
|
|
685
|
+
{ pattern: /anthropic/i, provider: "anthropic" },
|
|
686
|
+
{ pattern: /kimi/i, provider: "kimi-coding" },
|
|
687
|
+
{ pattern: /zai/i, provider: "zai-anthropic" },
|
|
688
|
+
{ pattern: /openai/i, provider: "openai" },
|
|
689
|
+
{ pattern: /gpt/i, provider: "openai" },
|
|
690
|
+
{ pattern: /google|gemini/i, provider: "google" },
|
|
691
|
+
{ pattern: /deepseek/i, provider: "deepseek" },
|
|
692
|
+
{ pattern: /minimax/i, provider: "minimax" },
|
|
693
|
+
{ pattern: /xiaomi-mimo/i, provider: "xiaomi-mimo" },
|
|
694
|
+
{ pattern: /xiaomi/i, provider: "xiaomi-token-plan" },
|
|
695
|
+
{ pattern: /crofai/i, provider: "crofai" },
|
|
696
|
+
{ pattern: /mistral/i, provider: "mistral" },
|
|
697
|
+
{ pattern: /xai|grok/i, provider: "xai" }
|
|
698
|
+
];
|
|
699
|
+
var DEFAULT_CAPS = {
|
|
700
|
+
maxOutputTokens: 8192,
|
|
701
|
+
supportsTools: "probe",
|
|
702
|
+
jsonReliability: "medium",
|
|
703
|
+
instructionFollowing: "medium",
|
|
704
|
+
tokenRatioEstimate: 3.8,
|
|
705
|
+
concurrencyLimit: 2,
|
|
706
|
+
cacheStrategy: "none",
|
|
707
|
+
timeoutMultiplier: 1.35,
|
|
708
|
+
singlePassTokenMultiplier: 0.9,
|
|
709
|
+
multimodal: "metadata-only"
|
|
710
|
+
};
|
|
711
|
+
function getProviderCaps(provider) {
|
|
712
|
+
if (PROVIDER_MAP[provider])
|
|
713
|
+
return PROVIDER_MAP[provider];
|
|
714
|
+
for (const { pattern, provider: key } of PROVIDER_ALIASES) {
|
|
715
|
+
if (pattern.test(provider))
|
|
716
|
+
return PROVIDER_MAP[key] ?? DEFAULT_CAPS;
|
|
717
|
+
}
|
|
718
|
+
return DEFAULT_CAPS;
|
|
719
|
+
}
|
|
537
720
|
class TokenCalibrationStore {
|
|
538
721
|
maxEntries;
|
|
539
722
|
factors = new Map;
|
|
@@ -631,10 +814,22 @@ function buildUniquePathNeedles(filePath, allPaths) {
|
|
|
631
814
|
});
|
|
632
815
|
}
|
|
633
816
|
function isKnownPathReference(ref, knownPaths) {
|
|
634
|
-
const normalizedRef = normalizePath(ref);
|
|
817
|
+
const normalizedRef = normalizePath(ref).replace(/^\/+/, "");
|
|
818
|
+
if (!normalizedRef)
|
|
819
|
+
return false;
|
|
820
|
+
const pathShaped = normalizedRef.includes("/");
|
|
635
821
|
return knownPaths.some((path2) => {
|
|
636
|
-
const normalizedPath = normalizePath(path2);
|
|
637
|
-
|
|
822
|
+
const normalizedPath = normalizePath(path2).replace(/^\/+/, "");
|
|
823
|
+
if (normalizedPath === normalizedRef || normalizedPath.endsWith("/" + normalizedRef))
|
|
824
|
+
return true;
|
|
825
|
+
if (normalizedPath.endsWith(normalizedRef)) {
|
|
826
|
+
const boundary = normalizedPath[normalizedPath.length - normalizedRef.length - 1];
|
|
827
|
+
if (boundary && !/[\w./-]/.test(boundary))
|
|
828
|
+
return true;
|
|
829
|
+
}
|
|
830
|
+
if (!pathShaped)
|
|
831
|
+
return false;
|
|
832
|
+
return normalizedPath.split("/").some((_, index, parts) => parts.slice(index).join("/").startsWith(normalizedRef + "/"));
|
|
638
833
|
});
|
|
639
834
|
}
|
|
640
835
|
|
|
@@ -720,10 +915,20 @@ function isLikelyFileRef(candidate) {
|
|
|
720
915
|
return CODE_EXT_RE.test(candidate);
|
|
721
916
|
}
|
|
722
917
|
function extractFileRefs(summary) {
|
|
723
|
-
const
|
|
724
|
-
|
|
918
|
+
const matcher = new RegExp(FILE_REF_CANDIDATE_RE.source, FILE_REF_CANDIDATE_RE.flags);
|
|
919
|
+
const refs = [];
|
|
920
|
+
for (const match of summary.matchAll(matcher)) {
|
|
921
|
+
if (/[\\/]/.test(summary[(match.index ?? 0) + match[0].length] ?? ""))
|
|
922
|
+
continue;
|
|
923
|
+
if (isLikelyFileRef(match[0]))
|
|
924
|
+
refs.push(match[0]);
|
|
925
|
+
}
|
|
926
|
+
return refs;
|
|
725
927
|
}
|
|
726
928
|
|
|
929
|
+
// src/domain/summary-parse.ts
|
|
930
|
+
import { createHash } from "crypto";
|
|
931
|
+
|
|
727
932
|
// src/domain/summary-schema.ts
|
|
728
933
|
function classifyHeading(raw) {
|
|
729
934
|
const text = raw.replace(/^#+\s*/, "").replace(/[:\s]+$/, "").trim().toLowerCase();
|
|
@@ -763,6 +968,58 @@ var HEADING_RE = /^(#{1,3})\s+(.+?)\s*$/;
|
|
|
763
968
|
function summaryEvidenceLine(value, maxLength) {
|
|
764
969
|
return value.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, " ").replace(/\s+/g, " ").trim().replace(/^(?:(?:#{1,6}|[-*+]|>)\s+)+/, "").slice(0, maxLength).trim();
|
|
765
970
|
}
|
|
971
|
+
function summaryPathLine(value) {
|
|
972
|
+
return JSON.stringify(value);
|
|
973
|
+
}
|
|
974
|
+
function compactPathLine(value, maxLength, digest) {
|
|
975
|
+
const minimal = JSON.stringify("#" + digest);
|
|
976
|
+
if (minimal.length >= maxLength)
|
|
977
|
+
return minimal;
|
|
978
|
+
const chars = Array.from(value.replace(/\\/g, "/"));
|
|
979
|
+
let low = 0;
|
|
980
|
+
let high = chars.length;
|
|
981
|
+
let best = minimal;
|
|
982
|
+
while (low <= high) {
|
|
983
|
+
const length = Math.floor((low + high) / 2);
|
|
984
|
+
const candidate = JSON.stringify("\u2026/" + chars.slice(-length).join("") + "#" + digest);
|
|
985
|
+
if (candidate.length <= maxLength) {
|
|
986
|
+
best = candidate;
|
|
987
|
+
low = length + 1;
|
|
988
|
+
} else {
|
|
989
|
+
high = length - 1;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
return best;
|
|
993
|
+
}
|
|
994
|
+
function buildSummaryPathEvidence(paths, budgetTokens = PROFILES.balanced.summaryBudgetTokens) {
|
|
995
|
+
const unique = Array.from(new Set(paths.filter(Boolean)));
|
|
996
|
+
if (!unique.length)
|
|
997
|
+
return new Map;
|
|
998
|
+
const full = unique.map((path2) => [path2, summaryPathLine(path2)]);
|
|
999
|
+
const minimumPerLine = JSON.stringify("#" + "x".repeat(12)).length + 3;
|
|
1000
|
+
const budgetChars = Math.max(unique.length * minimumPerLine, Math.min(20000, Math.max(4000, Math.floor(budgetTokens * 2))));
|
|
1001
|
+
if (full.reduce((total, [, line]) => total + line.length + 3, 0) <= budgetChars) {
|
|
1002
|
+
return new Map(full);
|
|
1003
|
+
}
|
|
1004
|
+
const digests = new Map;
|
|
1005
|
+
const owners = new Map;
|
|
1006
|
+
for (const path2 of unique) {
|
|
1007
|
+
const fullDigest = createHash("sha256").update(path2).digest("base64url");
|
|
1008
|
+
let digest = fullDigest.slice(0, 12);
|
|
1009
|
+
const owner = owners.get(digest);
|
|
1010
|
+
if (owner && owner !== path2) {
|
|
1011
|
+
digest = fullDigest;
|
|
1012
|
+
digests.set(owner, createHash("sha256").update(owner).digest("base64url"));
|
|
1013
|
+
}
|
|
1014
|
+
owners.set(digest, path2);
|
|
1015
|
+
digests.set(path2, digest);
|
|
1016
|
+
}
|
|
1017
|
+
const perPath = Math.max(JSON.stringify("#" + "x".repeat(12)).length, Math.floor((budgetChars - unique.length * 3) / unique.length));
|
|
1018
|
+
return new Map(unique.map((path2) => [
|
|
1019
|
+
path2,
|
|
1020
|
+
compactPathLine(path2, perPath, digests.get(path2) ?? "")
|
|
1021
|
+
]));
|
|
1022
|
+
}
|
|
766
1023
|
function mergeBodies(first, second) {
|
|
767
1024
|
const seen = new Set;
|
|
768
1025
|
return [first, second].filter(Boolean).flatMap((body) => body.split(`
|
|
@@ -787,7 +1044,11 @@ function parseSummary(markdown) {
|
|
|
787
1044
|
if (existing)
|
|
788
1045
|
existing.body = mergeBodies(existing.body, body);
|
|
789
1046
|
else
|
|
790
|
-
sections.push({
|
|
1047
|
+
sections.push({
|
|
1048
|
+
kind: currentKind,
|
|
1049
|
+
heading: currentHeading.trim(),
|
|
1050
|
+
body
|
|
1051
|
+
});
|
|
791
1052
|
};
|
|
792
1053
|
for (const line of lines) {
|
|
793
1054
|
const fenceMatch = line.match(/^\s{0,3}(`{3,}|~{3,})(.*)$/);
|
|
@@ -878,7 +1139,11 @@ function buildToolCallIndex(msgs) {
|
|
|
878
1139
|
for (let t = 0;t < nested.length; t++) {
|
|
879
1140
|
const tool = nested[t];
|
|
880
1141
|
const id = nestedToolCallId(b.id, i, t, tool.id);
|
|
881
|
-
idx.set(id, {
|
|
1142
|
+
idx.set(id, {
|
|
1143
|
+
name: tool.name,
|
|
1144
|
+
arguments: tool.arguments,
|
|
1145
|
+
msgIndex: i
|
|
1146
|
+
});
|
|
882
1147
|
}
|
|
883
1148
|
}
|
|
884
1149
|
}
|
|
@@ -886,12 +1151,36 @@ function buildToolCallIndex(msgs) {
|
|
|
886
1151
|
return idx;
|
|
887
1152
|
}
|
|
888
1153
|
var CONSTRAINT_PATTERNS = [
|
|
889
|
-
{
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
{
|
|
1154
|
+
{
|
|
1155
|
+
re: /\b(?:must|need|require|has to|important)\b.*\b(?:be|use|have|include|support)\b/i,
|
|
1156
|
+
cat: "requirement",
|
|
1157
|
+
conf: TUNING.CONFIDENCE_HIGH
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
re: /\b(?:don't|never|avoid|shouldn't|must not|do not|no\s+(?:need|want))\b/i,
|
|
1161
|
+
cat: "prohibition",
|
|
1162
|
+
conf: TUNING.CONFIDENCE_MEDIUM
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
re: /\b(?:prefer|like|want|would rather|should)\b.*\b(?:use|be|have|with)\b/i,
|
|
1166
|
+
cat: "preference",
|
|
1167
|
+
conf: TUNING.CONFIDENCE_LOW
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
re: /(?<![A-Za-z0-9_])(?:yapma|kullanma|sak\u0131n|sak\u0131nha|asla(?:\s+(?:kullanma|yapma|getirme))?|bunu yapma)(?![A-Za-z0-9_])/iu,
|
|
1171
|
+
cat: "prohibition",
|
|
1172
|
+
conf: TUNING.CONFIDENCE_MEDIUM
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
re: /(?<![A-Za-z0-9_])(?:kritik|kritikal|\u00F6nemli|onemli|\u015Fart|sart|zorunlu|\u015Fart ko\u015Ful|\u00F6nemli \u015Fart|kesinlikle|kesinlikle \u015Fart|b\u00F6yle olsun|b\u00F6yle yap\u0131n|\u015F\u00F6yle olsun|\u015F\u00F6yle yap\u0131n)(?![A-Za-z0-9_])/iu,
|
|
1176
|
+
cat: "requirement",
|
|
1177
|
+
conf: TUNING.CONFIDENCE_MEDIUM
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
re: /(?<![A-Za-z0-9_])(?:tercih|isterim|olsun|kullanal\u0131m|yapal\u0131m|istiyorum)(?![A-Za-z0-9_])/iu,
|
|
1181
|
+
cat: "preference",
|
|
1182
|
+
conf: TUNING.CONFIDENCE_LOW
|
|
1183
|
+
}
|
|
895
1184
|
];
|
|
896
1185
|
function isDiagnosticConstraintText(text) {
|
|
897
1186
|
const candidate = text.replace(/^\s*[-*]\s+/, "").trim();
|
|
@@ -960,7 +1249,10 @@ function withCodexWireLimit(model, opts) {
|
|
|
960
1249
|
onPayload: async (payload, requestModel) => {
|
|
961
1250
|
const transformed = await previous?.(payload, requestModel);
|
|
962
1251
|
const body = transformed ?? payload;
|
|
963
|
-
return body && typeof body === "object" ? {
|
|
1252
|
+
return body && typeof body === "object" ? {
|
|
1253
|
+
...body,
|
|
1254
|
+
max_output_tokens: opts.maxTokens
|
|
1255
|
+
} : body;
|
|
964
1256
|
}
|
|
965
1257
|
};
|
|
966
1258
|
}
|
|
@@ -981,11 +1273,12 @@ function assertSuccessful(message) {
|
|
|
981
1273
|
}
|
|
982
1274
|
return message;
|
|
983
1275
|
}
|
|
984
|
-
async function withProviderDeadline(opts, invoke) {
|
|
1276
|
+
async function withProviderDeadline(opts, invoke, modelId) {
|
|
985
1277
|
if (opts.signal?.aborted)
|
|
986
1278
|
throw new Error("LLM request aborted before dispatch");
|
|
987
1279
|
const controller = new AbortController;
|
|
988
|
-
const
|
|
1280
|
+
const multiplier = modelId && !((opts.codexWatchdogMs ?? 0) > 0) ? getProviderCaps(modelId).timeoutMultiplier : 1;
|
|
1281
|
+
const watchdogMs = Math.round(resolveCodexWatchdogMs(opts.maxTokens, opts.codexWatchdogMs) * multiplier);
|
|
989
1282
|
const abort = Promise.withResolvers();
|
|
990
1283
|
const abortFromCaller = () => {
|
|
991
1284
|
controller.abort(opts.signal?.reason);
|
|
@@ -1058,7 +1351,7 @@ var rawLlmClient = {
|
|
|
1058
1351
|
return completeChatGptCodex(model, body, bounded);
|
|
1059
1352
|
const response = bounded.reasoning === undefined ? await (await resolveComplete())(model, body, bounded) : await (await resolveCompleteSimple())(model, body, bounded);
|
|
1060
1353
|
return assertSuccessful(response);
|
|
1061
|
-
});
|
|
1354
|
+
}, model.id);
|
|
1062
1355
|
}
|
|
1063
1356
|
};
|
|
1064
1357
|
var defaultLlmClient = rawLlmClient;
|
|
@@ -1072,7 +1365,10 @@ import crypto from "crypto";
|
|
|
1072
1365
|
|
|
1073
1366
|
// src/domain/scrub.ts
|
|
1074
1367
|
var SECRET_PATTERNS = [
|
|
1075
|
-
{
|
|
1368
|
+
{
|
|
1369
|
+
kind: "private-key",
|
|
1370
|
+
regex: /-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g
|
|
1371
|
+
},
|
|
1076
1372
|
{ kind: "aws-access-key", regex: /\bAKIA[0-9A-Z]{16}\b/g },
|
|
1077
1373
|
{ kind: "google-api-key", regex: /\bAIza[0-9A-Za-z_-]{30,}\b/g },
|
|
1078
1374
|
{ kind: "stripe-key", regex: /\b[rs]k_(?:live|test)_[0-9A-Za-z]{16,}\b/g },
|
|
@@ -1081,8 +1377,15 @@ var SECRET_PATTERNS = [
|
|
|
1081
1377
|
{ kind: "github-token", regex: /\bgh[pousr]_[A-Za-z0-9]{20,}\b/g },
|
|
1082
1378
|
{ kind: "api-key", regex: /\bsk-(?:ant-)?[A-Za-z0-9_-]{20,}\b/g },
|
|
1083
1379
|
{ kind: "slack-token", regex: /\bxox[baprs]-[A-Za-z0-9-]{10,}\b/g },
|
|
1084
|
-
{
|
|
1085
|
-
|
|
1380
|
+
{
|
|
1381
|
+
kind: "jwt",
|
|
1382
|
+
regex: /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
kind: "bearer-token",
|
|
1386
|
+
regex: /\bBearer\s+[A-Za-z0-9._~+/-]{12,}=*/gi,
|
|
1387
|
+
replacement: () => "Bearer [REDACTED:bearer-token]"
|
|
1388
|
+
},
|
|
1086
1389
|
{
|
|
1087
1390
|
kind: "connection-password",
|
|
1088
1391
|
regex: /\b([a-z][a-z0-9+.-]*:\/\/[^:\s/@]+:)[^@\s/]+(@)/gi,
|
|
@@ -1091,12 +1394,35 @@ var SECRET_PATTERNS = [
|
|
|
1091
1394
|
{
|
|
1092
1395
|
kind: "credential",
|
|
1093
1396
|
regex: /\b((?:[A-Za-z0-9]+[_-])*(?:api[_-]?key|access[_-]?token|auth[_-]?token|token|password|passwd|secret(?:[_-]?(?:access)?[_-]?key)?|client[_-]?secret)(?:[_-][A-Za-z0-9]+)*)\s*([:=])\s*["']?([^\s"']{16,})["']?/gi,
|
|
1094
|
-
replacement: (name, separator) => name + separator + "[REDACTED:credential]"
|
|
1397
|
+
replacement: (name, separator, value, match) => /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)+$/.test(value) ? match : name + separator + "[REDACTED:credential]"
|
|
1095
1398
|
}
|
|
1096
1399
|
];
|
|
1400
|
+
function passesLuhn(candidate) {
|
|
1401
|
+
const digits = candidate.replace(/\D/g, "");
|
|
1402
|
+
if (digits.length < 13 || digits.length > 19)
|
|
1403
|
+
return false;
|
|
1404
|
+
if (/^(\d)\1+$/.test(digits))
|
|
1405
|
+
return false;
|
|
1406
|
+
let sum = 0, double = false;
|
|
1407
|
+
for (let i = digits.length - 1;i >= 0; i--) {
|
|
1408
|
+
let d = digits.charCodeAt(i) - 48;
|
|
1409
|
+
if (double) {
|
|
1410
|
+
d *= 2;
|
|
1411
|
+
if (d > 9)
|
|
1412
|
+
d -= 9;
|
|
1413
|
+
}
|
|
1414
|
+
sum += d;
|
|
1415
|
+
double = !double;
|
|
1416
|
+
}
|
|
1417
|
+
return sum % 10 === 0;
|
|
1418
|
+
}
|
|
1097
1419
|
var PII_PATTERNS = [
|
|
1098
1420
|
{ kind: "email", regex: /\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b/gi },
|
|
1099
|
-
{
|
|
1421
|
+
{
|
|
1422
|
+
kind: "payment-card",
|
|
1423
|
+
regex: /\b(?:\d[ -]*?){13,19}\b/g,
|
|
1424
|
+
replacement: (candidate) => passesLuhn(candidate) ? "[REDACTED:payment-card]" : candidate
|
|
1425
|
+
},
|
|
1100
1426
|
{ kind: "phone", regex: /(?<![\w.])(?:\+?\d[\d ()-]{8,}\d)(?![\w.])/g }
|
|
1101
1427
|
];
|
|
1102
1428
|
function redact(text, patterns) {
|
|
@@ -1104,15 +1430,22 @@ function redact(text, patterns) {
|
|
|
1104
1430
|
let value = text;
|
|
1105
1431
|
for (const pattern of patterns) {
|
|
1106
1432
|
value = value.replace(pattern.regex, (...args) => {
|
|
1107
|
-
|
|
1433
|
+
const match = String(args[0]);
|
|
1434
|
+
let replacement = "[REDACTED:" + pattern.kind + "]";
|
|
1108
1435
|
if (pattern.replacement) {
|
|
1109
1436
|
const groups = args.slice(1, -2).map(String);
|
|
1110
|
-
|
|
1437
|
+
replacement = pattern.replacement(...groups, match);
|
|
1111
1438
|
}
|
|
1112
|
-
|
|
1439
|
+
if (replacement === match)
|
|
1440
|
+
return match;
|
|
1441
|
+
counts.set(pattern.kind, (counts.get(pattern.kind) ?? 0) + 1);
|
|
1442
|
+
return replacement;
|
|
1113
1443
|
});
|
|
1114
1444
|
}
|
|
1115
|
-
return {
|
|
1445
|
+
return {
|
|
1446
|
+
value,
|
|
1447
|
+
findings: [...counts].map(([kind, count]) => ({ kind, count }))
|
|
1448
|
+
};
|
|
1116
1449
|
}
|
|
1117
1450
|
function mergeFindings(target, findings) {
|
|
1118
1451
|
for (const finding of findings)
|
|
@@ -1142,7 +1475,6 @@ var SECRET_KEY_NAMES = {
|
|
|
1142
1475
|
set_cookie: true,
|
|
1143
1476
|
otp: true,
|
|
1144
1477
|
one_time_password: true,
|
|
1145
|
-
pin: true,
|
|
1146
1478
|
passcode: true
|
|
1147
1479
|
};
|
|
1148
1480
|
function normalizeObjectKey(key) {
|
|
@@ -1208,7 +1540,7 @@ class SecretScrubber {
|
|
|
1208
1540
|
const output = {};
|
|
1209
1541
|
seen.set(value2, output);
|
|
1210
1542
|
for (const [key, item] of Object.entries(value2)) {
|
|
1211
|
-
const carriesSecret = typeof item === "string"
|
|
1543
|
+
const carriesSecret = typeof item === "string" && item.length >= 8;
|
|
1212
1544
|
if (this.secretsEnabled && isSecretBearingKey(key) && carriesSecret) {
|
|
1213
1545
|
output[key] = "[REDACTED:credential]";
|
|
1214
1546
|
recordCredential();
|
|
@@ -1219,7 +1551,10 @@ class SecretScrubber {
|
|
|
1219
1551
|
return output;
|
|
1220
1552
|
};
|
|
1221
1553
|
const value = visit(input);
|
|
1222
|
-
return {
|
|
1554
|
+
return {
|
|
1555
|
+
value,
|
|
1556
|
+
findings: [...findings].map(([kind, count]) => ({ kind, count }))
|
|
1557
|
+
};
|
|
1223
1558
|
}
|
|
1224
1559
|
count() {
|
|
1225
1560
|
return this.total;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../src/utils/extraction.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"extraction.d.ts","sourceRoot":"","sources":["../../src/utils/extraction.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,QAAQ,EACR,eAAe,EAChB,MAAM,aAAa,CAAC;AA2BrB,iFAAiF;AACjF,eAAO,MAAM,WAAW,QAAW,CAAC;AAEpC,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAErD;AAED,oCAAoC;AACpC,MAAM,MAAM,aAAa,GAAG,GAAG,CAC7B,MAAM,EACN;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CACvE,CAAC;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AW,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"file-needles.d.ts","sourceRoot":"","sources":["../../src/utils/file-needles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAahD,CAAC;AAEH,6EAA6E;AAC7E,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAmB3D;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACrC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,SAAS,MAAM,EAAE,GACzB,MAAM,EAAE,CAUV;AAED,gFAAgF;AAChF,wBAAgB,oBAAoB,CACnC,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,SAAS,MAAM,EAAE,GAC3B,OAAO,CA+BT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-ref-detect.d.ts","sourceRoot":"","sources":["../../src/utils/file-ref-detect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;GAIG;AACH,eAAO,MAAM,WAAW,QACoI,CAAC;AAE7J;;;;GAIG;AACH,eAAO,MAAM,UAAU,QAAuC,CAAC;AAE/D,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,QAAsB,CAAC;AAEzD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAa1D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"file-ref-detect.d.ts","sourceRoot":"","sources":["../../src/utils/file-ref-detect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;GAIG;AACH,eAAO,MAAM,WAAW,QACoI,CAAC;AAE7J;;;;GAIG;AACH,eAAO,MAAM,UAAU,QAAuC,CAAC;AAE/D,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,QAAsB,CAAC;AAEzD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAa1D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAWzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-log.d.ts","sourceRoot":"","sources":["../../src/utils/session-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"session-log.d.ts","sourceRoot":"","sources":["../../src/utils/session-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AA6EnE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAwBD,kEAAkE;AAClE,wBAAgB,+BAA+B,IAAI,IAAI,CAGtD;AA2GD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAEhE;AAiFD,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,UAAU,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,mBAAmB,EAAE,EACvC,GAAG,CAAC,EAAE,MAAM,GACX,OAAO,CAAC,yBAAyB,EAAE,GAAG,IAAI,CAAC,CAoC7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/utils/state.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EACV,oBAAoB,
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/utils/state.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EACV,oBAAoB,EACpB,QAAQ,EACR,eAAe,EACf,iBAAiB,EAEjB,YAAY,EACZ,kBAAkB,EAClB,eAAe,EAChB,MAAM,aAAa,CAAC;AAgDrB,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,eAAe,GACrB,eAAe,CAqCjB;AAqDD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,eAAe,GACrB,OAAO,CAUT;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAG7E;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,WAAW,GAAG,WAAW,CAAC,GACrD,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC,EAChD,cAAc,GAAE,SAAS,MAAM,EAAO,GACrC,eAAe,GAAG,IAAI,CAmExB;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,QAAQ,EAAE,EACjB,SAAS,EAAE,YAAY,EAAE,GACxB,QAAQ,EAAE,CAwBZ;AAED,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,YAAY,EAAE,EACzB,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,YAAY,CAAC,CAAC,GACtD,YAAY,EAAE,CAehB;AAED,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,kBAA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gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,sDAAsD;IACtD,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,oBAAoB;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,+BAA+B;IAC/B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,eAAe,EACrB,OAAO,EAAE,eAAe,GACvB,eAAe,CA+FjB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAW/D;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,CAyEjE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,eAAe,GACrB,MAAM,CAsBR;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,MAAM,CAeR;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAU5D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAOhE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-smart-compact",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.1",
|
|
4
4
|
"description": "Verification-oriented smart compaction extension for Pi Coding Agent — deterministic extraction, exploration, synthesis, verification, metrics, and safety checks.",
|
|
5
5
|
"packageManager": "bun@1.3.14",
|
|
6
6
|
"engines": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"telemetry-report": "bun run dist/telemetry-report.js",
|
|
59
59
|
"compat:pi": "bun run scripts/check-pi-compat.ts",
|
|
60
60
|
"release:audit": "bun run scripts/release-audit.ts",
|
|
61
|
-
"release:check": "bun run typecheck && bun test && bun run gate && bun run bench && bun run build && bun run release:audit",
|
|
61
|
+
"release:check": "bun run typecheck && bun test && bun run gate && bun run bench && bun run build && bun run release:audit && bun run compat:pi latest",
|
|
62
62
|
"typecheck": "bun x tsc --noEmit && bun x tsc -p tsconfig.scripts.json",
|
|
63
63
|
"prepublishOnly": "bun run release:check"
|
|
64
64
|
},
|