nolo-cli 0.95.0-alpha.5 → 0.95.0
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 +1 -1
- package/{_executeModel-UXVEB3GO.js → _executeModel-4NTXSCYT.js} +67 -63
- package/{action-YVYQEAAV.js → action-GI44T4DR.js} +10 -10
- package/{addContentAction-O7R66HEX.js → addContentAction-B2DRF7P6.js} +9 -9
- package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-T3I7IXPK.js} +15 -17
- package/{agentDeleteCommand-QT7KPGJC.js → agentDeleteCommand-QYCCUQ35.js} +47 -43
- package/{agentEmailCommands-EGD3UOFY.js → agentEmailCommands-GJ7KXHA6.js} +89 -82
- package/{agentListCommands-PBY5LTDT.js → agentListCommands-JDU7V3M5.js} +77 -82
- package/{agentMachineCommands-WCCBD7CE.js → agentMachineCommands-PXJG3EDI.js} +42 -38
- package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-YK2BIIXZ.js} +1 -1
- package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-HF4A42D4.js} +1 -1
- package/agentRecordCommands-3ONMYU6P.js +135 -0
- package/{agentRunCommand-UQBDIINO.js → agentRunCommand-L6NJGDBA.js} +88 -80
- package/{agentRunControl-XLGD3UZ5.js → agentRunControl-5T64LM2M.js} +2 -2
- package/{agentRuntimeLocal-TT57XSVO.js → agentRuntimeLocal-SYLNOKCT.js} +44 -36
- package/{agentSlice-KTVOEUDX.js → agentSlice-X63VSE6R.js} +11 -11
- package/{appDeleteCommands-XMJJB6UT.js → appDeleteCommands-IP22BHZE.js} +42 -38
- package/{appDeployCommands-DORRXKWU.js → appDeployCommands-5ZTQL6UL.js} +42 -38
- package/{appDeployStatusCommands-BWEE72UH.js → appDeployStatusCommands-G6EMAT75.js} +42 -38
- package/{appGetCommands-WN6KKQHQ.js → appGetCommands-UXBDAYEM.js} +42 -38
- package/{appListCommands-W2WE5TD5.js → appListCommands-J274GTVP.js} +42 -38
- package/{authCommand-F4EFRRX6.js → authCommand-W6I6GD3F.js} +115 -23
- package/{authCommands-RGOGCPP6.js → authCommands-GBIFZWD3.js} +5 -5
- package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-ZMF6YGNO.js} +6 -5
- package/{chatQueueReduxAdapter-4YQF4NHY.js → chatQueueReduxAdapter-KN774OKJ.js} +30 -29
- package/{chromeCommands-FZYAU75D.js → chromeCommands-K27J4OVZ.js} +124 -28
- package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-IXRLN57H.js} +4 -3
- package/{chunk-6OZ36FXI.js → chunk-27ONFIEY.js} +22 -4
- package/{chunk-HMPEO3ZE.js → chunk-2JCOP36I.js} +100 -100
- package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
- package/{chunk-OIVSQH2O.js → chunk-3BXNTXYI.js} +299 -5
- package/{chunk-EYAQT56M.js → chunk-4DPP773Q.js} +2 -2
- package/chunk-4LCOCOR5.js +50 -0
- package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
- package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
- package/{chunk-IAO6JBYW.js → chunk-5B7XS6UO.js} +164 -14
- package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
- package/chunk-5J3PYNUP.js +255 -0
- package/chunk-5MMAK75Q.js +15 -0
- package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
- package/{chunk-EFVDQUCT.js → chunk-5T2W2ZZN.js} +15 -20
- package/{chunk-DWUCB2A3.js → chunk-62IL3KQV.js} +4 -34
- package/{chunk-YQTQQX2H.js → chunk-67HHBCFJ.js} +1 -1
- package/{chunk-SNPMM7H3.js → chunk-67T7O467.js} +13 -13
- package/{chunk-6YTOJY35.js → chunk-6D2JFXLY.js} +35 -0
- package/{chunk-4MY4GLIW.js → chunk-6IHBIRPK.js} +969 -1090
- package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
- package/{chunk-DHDMC6FO.js → chunk-6TPOEJMQ.js} +9 -4
- package/{chunk-LGCTKGQ3.js → chunk-6UPZ63YT.js} +24 -5
- package/{chunk-WADCY6G6.js → chunk-6ZWMH6TJ.js} +111 -41
- package/{chunk-ABQYVJBJ.js → chunk-7CHC4W22.js} +1 -1
- package/{chunk-GQBOR3G6.js → chunk-7KVZ5LDQ.js} +2 -2
- package/{chunk-4OZYL5FG.js → chunk-7VJHIB2S.js} +573 -476
- package/{chunk-OA6Q2A4I.js → chunk-A7RSPKU6.js} +98 -22
- package/{chunk-KQ4ONNQD.js → chunk-ALFH24P3.js} +56 -7
- package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
- package/{chunk-GPCZ7UXG.js → chunk-AZRHIN5B.js} +1 -1
- package/{chunk-JRQFUXY7.js → chunk-B2XUQXQX.js} +96 -19
- package/chunk-BMQ2MJUK.js +153 -0
- package/{chunk-3IIEFNGY.js → chunk-C53ZG23R.js} +2 -2
- package/chunk-CHOZJMJS.js +78 -0
- package/{chunk-3ZFOWBZF.js → chunk-CJXHT3S7.js} +13 -13
- package/{chunk-HJUYAD4A.js → chunk-CPUFH46E.js} +8 -8
- package/{chunk-2POGRYTM.js → chunk-CQMQXVFQ.js} +860 -142
- package/{chunk-LS2ZANRJ.js → chunk-CTUQJVQM.js} +1 -1
- package/{chunk-BP4XNZRM.js → chunk-CU3QB4HW.js} +3 -3
- package/{chunk-ACTMNVHM.js → chunk-CYSYR67N.js} +1 -1
- package/{chunk-SQZDZXP5.js → chunk-DA54MHPJ.js} +236 -36
- package/{chunk-VLTIYV3X.js → chunk-DCLMZ5TX.js} +4 -4
- package/{chunk-UKZDAFYT.js → chunk-DSSTTEKI.js} +6 -10
- package/{chunk-HVURBGF3.js → chunk-ESRMFY7G.js} +2 -2
- package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
- package/chunk-GMZLP5DV.js +82 -0
- package/{chunk-CJCJF5XB.js → chunk-H6A6X4EK.js} +36 -3
- package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
- package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
- package/{chunk-H3PIH2EO.js → chunk-HWRQVJGX.js} +7 -7
- package/{chunk-H62HCIUP.js → chunk-HYZIYH2H.js} +11 -10
- package/{chunk-NTW5GWDM.js → chunk-I3QNET24.js} +32 -17
- package/{chunk-WV42OMV7.js → chunk-IAESIMK7.js} +4 -4
- package/{chunk-QIAVMDHY.js → chunk-IUVCUGQR.js} +4 -4
- package/{chunk-GFD4ALW3.js → chunk-IX27RP45.js} +1 -1
- package/{chunk-IIVGDG4I.js → chunk-LNPYTNMG.js} +8 -4
- package/{chunk-BLJWCTRL.js → chunk-LVITW736.js} +1 -1
- package/{chunk-76WEAXJB.js → chunk-M3LRSBOX.js} +18 -15
- package/{chunk-LIIKM7DD.js → chunk-M73PVOVS.js} +23 -76
- package/{chunk-7S4YWN7P.js → chunk-MX574M24.js} +1 -1
- package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
- package/{chunk-53HEEOTT.js → chunk-O26PCYLS.js} +80 -13
- package/{chunk-3DII57IT.js → chunk-O2OWEFII.js} +1 -1
- package/chunk-OCZKATRC.js +129 -0
- package/chunk-P6GMCCAT.js +870 -0
- package/{chunk-CPH3W5A7.js → chunk-Q4GP72HX.js} +94 -3
- package/{chunk-Z77CRGTW.js → chunk-R4SQ3LGW.js} +1 -1
- package/chunk-RE3CDVRX.js +7600 -0
- package/{chunk-DEUUPHOO.js → chunk-RKGKDQGJ.js} +74 -17
- package/{chunk-V4MJDUSR.js → chunk-RSEEDUMS.js} +2 -2
- package/{chunk-D2P6UDPQ.js → chunk-S3VFZW75.js} +66 -38
- package/{chunk-UZGQNTVW.js → chunk-S5XGT6GB.js} +5 -3
- package/{chunk-AFUORTY4.js → chunk-SONWNI3L.js} +21 -21
- package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
- package/{chunk-OF7AQZUG.js → chunk-TU5NE4U3.js} +9 -84
- package/chunk-UNYJU5L6.js +780 -0
- package/{chunk-J4MOO56S.js → chunk-UQNS32WZ.js} +10 -2
- package/chunk-V2SAIXHE.js +13349 -0
- package/chunk-VIWDGTDA.js +8 -0
- package/chunk-VJVNU77E.js +83 -0
- package/{chunk-6D6VBVEW.js → chunk-VPFEPRME.js} +9 -9
- package/{chunk-JAXOVNM4.js → chunk-WILHZY7K.js} +45 -45
- package/{chunk-UKWGR5SS.js → chunk-WIWM4FE3.js} +187 -398
- package/{chunk-NKRYKK7T.js → chunk-XTDH3PGV.js} +6 -7
- package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
- package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
- package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
- package/{chunk-TOP2VXOR.js → chunk-Z4CSIXYP.js} +2 -2
- package/{chunk-2F7RJC6L.js → chunk-ZOVKKMF6.js} +1 -1
- package/chunk-ZRAU6T47.js +56 -0
- package/commandRegistry-NPS6IYBO.js +833 -0
- package/{contentThunks-2USKJBI4.js → contentThunks-EB4JFL4K.js} +32 -30
- package/{cooldownCommands-BSCH2W7P.js → cooldownCommands-ZLEPIB4A.js} +2 -2
- package/{createAgentAutomationAction-NTLU42X2.js → createAgentAutomationAction-NZS7N4AW.js} +32 -30
- package/{createDialogAction-UCYF4BUN.js → createDialogAction-4Q4J7P4T.js} +36 -33
- package/{createPageAction-QFGUGZ5M.js → createPageAction-FPKRGV7D.js} +38 -36
- package/{chunk-4LNCCQOB.js → cursorProvider-YGGNMVWX.js} +2560 -9879
- package/{dbSlice-XVWBAGYN.js → dbSlice-DQ32LYTJ.js} +8 -8
- package/{deleteFile-YG6QMJLU.js → deleteFile-NX6QHCWZ.js} +3 -3
- package/{dialogCommands-IIBAS4I2.js → dialogCommands-XXZH5K6U.js} +45 -41
- package/{dialogSlice-HQFQIQDZ.js → dialogSlice-DXEZ3PA3.js} +36 -29
- package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
- package/{docCreateCommands-RJBSWEY4.js → docCreateCommands-FLNUDWG6.js} +44 -40
- package/{docDeleteCommands-QSDETKEQ.js → docDeleteCommands-74OURFAB.js} +44 -40
- package/{docReadCommands-AJG2EFHB.js → docReadCommands-QENWDQVH.js} +43 -39
- package/{docStore-GVWEDN5E.js → docStore-2JTPJVFK.js} +11 -10
- package/{docUpdateCommands-KWG533GS.js → docUpdateCommands-J4HWJ5JO.js} +44 -40
- package/{fetchMessages-EIU7UFFK.js → fetchMessages-67MEFPZR.js} +2 -2
- package/{getPricing-LUSEABA6.js → getPricing-NMMFT3YI.js} +3 -3
- package/{handleSendMessageAction-TLB2SAU4.js → handleSendMessageAction-FGPHI364.js} +91 -83
- package/index.js +87 -884
- package/{localDialogRead-BTFJ4V2I.js → localDialogRead-EBRS242U.js} +2 -2
- package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-5W6IJRAD.js} +6 -6
- package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-3LRMNLCM.js} +1 -1
- package/{machineCommands-QZDDCLIW.js → machineCommands-26AZP4AS.js} +84 -77
- package/{machineWsRunDispatch-NYMX3H4L.js → machineWsRunDispatch-GQ5XJ2DL.js} +81 -74
- package/{memberThunks-QGFLFVCI.js → memberThunks-5ZXPR63F.js} +9 -9
- package/{models-T3SG6MJ5.js → models-ZPU5EDF4.js} +2 -2
- package/oauthTokenStore-ITEB663N.js +23 -0
- package/package.json +1 -1
- package/pdf-U6KSUEZZ.js +26435 -0
- package/processSpawn-SOAV3FEV.js +11 -0
- package/profileConfig-ZGOFORWV.js +43 -0
- package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-DD6NGWW6.js} +7 -7
- package/{providerRegistry-757OWH3O.js → providerRegistry-XDRLMYGJ.js} +7 -7
- package/{read-COE3ZYR6.js → read-EPTJRAEF.js} +5 -5
- package/{readDocTool-5USN4A6V.js → readDocTool-W4NDXNEX.js} +5 -3
- package/{readlineWorkspace-VETAJAPP.js → readlineWorkspace-B7NBQCX6.js} +2448 -2022
- package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-BVAWQKXE.js} +17 -19
- package/{runAgentClientLoop-26DG6ZEY.js → runAgentClientLoop-RVB5K6R2.js} +61 -58
- package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-3USD722U.js} +3 -3
- package/runtimeModeArgs-2Y7BALTO.js +31 -0
- package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-LYY45IAD.js} +12 -11
- package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-73IL7DLU.js} +18 -20
- package/{settingSlice-ZQZVUPKK.js → settingSlice-Q6EKL7EQ.js} +9 -9
- package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
- package/{spaceCommands-WIJTLELT.js → spaceCommands-BYDGOMW7.js} +44 -40
- package/{streamAgentChatTurn-BY7IPY5C.js → streamAgentChatTurn-HV3FSRHN.js} +183 -91
- package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-UUXDSQ6X.js} +15 -17
- package/{tableCommands-O6NWHFKV.js → tableCommands-G7RV3RU3.js} +4 -4
- package/{toolApiClient-QVJ6HDNN.js → toolApiClient-INIQCPGY.js} +3 -3
- package/{tools-4Y2EYH5D.js → tools-AZR26MXC.js} +54 -51
- package/{tuiSummaryLlmCaller-T2SHYMDZ.js → tuiSummaryLlmCaller-74NRRLVW.js} +18 -16
- package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
- package/{updateDialogTitleAction-2S4DCP35.js → updateDialogTitleAction-HEWCCXZZ.js} +81 -43
- package/agentRecordCommands-YQQKDLIA.js +0 -128
- package/chunk-LBEDNSMY.js +0 -18881
- package/chunk-M76ECQRD.js +0 -13658
- package/chunk-Q5FJJ6XI.js +0 -103
- package/chunk-S7Z2HMCN.js +0 -25
- package/{chunk-VMFTFOWF.js → chunk-3AH7LNUB.js} +7 -7
- package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
- package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// packages/cli/secretScan.ts
|
|
2
|
+
var ASSIGNMENT_KEYS = [
|
|
3
|
+
{ label: "password", keys: "password|passwd", min: 8 },
|
|
4
|
+
{ label: "psk", keys: "psk", min: 8 },
|
|
5
|
+
{ label: "api key", keys: "api[_-]?key|apikey", min: 12 },
|
|
6
|
+
{ label: "token", keys: "token|secret", min: 12 }
|
|
7
|
+
];
|
|
8
|
+
var ASSIGNMENT_PATTERNS = ASSIGNMENT_KEYS.map(
|
|
9
|
+
({ label, keys, min }) => ({
|
|
10
|
+
label,
|
|
11
|
+
// 反向引用 \1 让引号成对成为必要条件:半截引号不算。值里允许空格与逗号——
|
|
12
|
+
// 写成带空格的口令是常见形态,旧的字符类会把这种值截成半截从而整条漏掉。
|
|
13
|
+
quoted: new RegExp(
|
|
14
|
+
`\\b(?:${keys})\\s*[:=]\\s*(["'])([^"']{${min},})\\1`,
|
|
15
|
+
"i"
|
|
16
|
+
),
|
|
17
|
+
// 不带引号时只取到分隔符为止,是否算密钥交给 looksLikeBareSecret 判。
|
|
18
|
+
bare: new RegExp(
|
|
19
|
+
`\\b(?:${keys})\\s*[:=]\\s*([^\\s"',#]{${min},})`,
|
|
20
|
+
"i"
|
|
21
|
+
)
|
|
22
|
+
})
|
|
23
|
+
);
|
|
24
|
+
var PRIVATE_KEY_PATTERN = /-----BEGIN [A-Z ]*PRIVATE KEY-----/;
|
|
25
|
+
var EXPRESSION_CHARS = /[?(){};|&<>$]/;
|
|
26
|
+
var CONSTANT_CASE = /^[A-Z][A-Z0-9_]*$/;
|
|
27
|
+
var CAMEL_CASE = /^[a-z][a-z0-9]*(?:[A-Z][a-z0-9]+)+$/;
|
|
28
|
+
var PROPERTY_SEGMENT = /^[A-Za-z_$][\w$]*$/;
|
|
29
|
+
var NAME_FORM_MAX_CHARS = 48;
|
|
30
|
+
var PROPERTY_SEGMENT_MAX_CHARS = 24;
|
|
31
|
+
function looksLikeDottedName(value) {
|
|
32
|
+
const segments = value.split(".");
|
|
33
|
+
if (segments.length < 2) return false;
|
|
34
|
+
return segments.every(
|
|
35
|
+
(segment) => PROPERTY_SEGMENT.test(segment) && (segment.length <= PROPERTY_SEGMENT_MAX_CHARS || CONSTANT_CASE.test(segment) && segment.includes("_"))
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
function stripTrailingMarkdownFence(value) {
|
|
39
|
+
return value.replace(/`+$/, "");
|
|
40
|
+
}
|
|
41
|
+
function looksLikeBareSecret(rawValue) {
|
|
42
|
+
const value = stripTrailingMarkdownFence(rawValue);
|
|
43
|
+
if (EXPRESSION_CHARS.test(value)) return false;
|
|
44
|
+
if (CONSTANT_CASE.test(value) && value.includes("_")) return false;
|
|
45
|
+
if (looksLikeDottedName(value)) return false;
|
|
46
|
+
if (value.length > NAME_FORM_MAX_CHARS) {
|
|
47
|
+
return /\d/.test(value);
|
|
48
|
+
}
|
|
49
|
+
if (CAMEL_CASE.test(value)) return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
function toPreview(line) {
|
|
53
|
+
return line.length > 120 ? `${line.slice(0, 117)}...` : line;
|
|
54
|
+
}
|
|
55
|
+
function findPotentialSecrets(text) {
|
|
56
|
+
const findings = [];
|
|
57
|
+
text.split(/\r?\n/).forEach((line, index) => {
|
|
58
|
+
const lineNumber = index + 1;
|
|
59
|
+
const preview = toPreview(line);
|
|
60
|
+
for (const { label, quoted, bare } of ASSIGNMENT_PATTERNS) {
|
|
61
|
+
if (quoted.test(line)) {
|
|
62
|
+
findings.push({ label, line: lineNumber, preview });
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
const bareMatch = bare.exec(line);
|
|
66
|
+
if (bareMatch && looksLikeBareSecret(bareMatch[1])) {
|
|
67
|
+
findings.push({ label, line: lineNumber, preview });
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
if (PRIVATE_KEY_PATTERN.test(line)) {
|
|
71
|
+
findings.push({ label: "private key", line: lineNumber, preview });
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return findings;
|
|
75
|
+
}
|
|
76
|
+
function formatSecretFindings(findings) {
|
|
77
|
+
return findings.map((finding) => ` line ${finding.line} (${finding.label}): ${finding.preview}`).join("\n");
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export {
|
|
81
|
+
findPotentialSecrets,
|
|
82
|
+
formatSecretFindings
|
|
83
|
+
};
|
|
@@ -3,7 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-ESHYE7WU.js";
|
|
4
4
|
import {
|
|
5
5
|
getDefaultCliLocalRuntimeDb
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZOVKKMF6.js";
|
|
7
|
+
import {
|
|
8
|
+
resolveAuthTokenFromEnv
|
|
9
|
+
} from "./chunk-A7GB5UGH.js";
|
|
10
|
+
import {
|
|
11
|
+
DEFAULT_NOLO_SERVER_URL
|
|
12
|
+
} from "./chunk-OLZBQWZU.js";
|
|
7
13
|
import {
|
|
8
14
|
buildCliRuntimeEnv,
|
|
9
15
|
clearProfileAuthToken,
|
|
@@ -12,20 +18,14 @@ import {
|
|
|
12
18
|
getProfileTokens,
|
|
13
19
|
loadProfileConfig,
|
|
14
20
|
saveDefaultProfile
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
resolveAuthTokenFromEnv
|
|
18
|
-
} from "./chunk-A7GB5UGH.js";
|
|
19
|
-
import {
|
|
20
|
-
DEFAULT_NOLO_SERVER_URL
|
|
21
|
-
} from "./chunk-OLZBQWZU.js";
|
|
21
|
+
} from "./chunk-TNIX77YM.js";
|
|
22
22
|
import {
|
|
23
23
|
asTrimmedNonEmptyStringArray,
|
|
24
24
|
createMemoryKey,
|
|
25
25
|
createMemoryOwnerIndexKey,
|
|
26
26
|
createMemorySubjectKindIndexKey,
|
|
27
27
|
memoryOwnerRange
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-3AH7LNUB.js";
|
|
29
29
|
import {
|
|
30
30
|
asTrimmedString
|
|
31
31
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTimingMs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6ZWMH6TJ.js";
|
|
4
4
|
import {
|
|
5
5
|
MODEL_LOOKUP_MAP
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3BXNTXYI.js";
|
|
7
7
|
import {
|
|
8
8
|
ALL_MODELS
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CYSYR67N.js";
|
|
10
10
|
import {
|
|
11
11
|
asTrimmedNonEmptyStringArray
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3AH7LNUB.js";
|
|
13
13
|
import {
|
|
14
14
|
asOptionalFiniteNumber
|
|
15
15
|
} from "./chunk-WWC7I6TA.js";
|
|
@@ -20,6 +20,43 @@ import {
|
|
|
20
20
|
asOptionalTrimmedString
|
|
21
21
|
} from "./chunk-G3SUCT4W.js";
|
|
22
22
|
|
|
23
|
+
// packages/agent-runtime/autoExecutionProfiles.ts
|
|
24
|
+
var createProfile = (input) => ({
|
|
25
|
+
id: input.id,
|
|
26
|
+
tier: input.tier,
|
|
27
|
+
legacyAgentKey: input.legacyAgentKey,
|
|
28
|
+
key: input.legacyAgentKey,
|
|
29
|
+
name: input.name,
|
|
30
|
+
provider: "nolo",
|
|
31
|
+
model: input.model,
|
|
32
|
+
apiSource: "platform",
|
|
33
|
+
useServerProxy: true,
|
|
34
|
+
rawRecord: {
|
|
35
|
+
dbKey: input.legacyAgentKey,
|
|
36
|
+
isPublic: true,
|
|
37
|
+
provider: "nolo",
|
|
38
|
+
model: input.model,
|
|
39
|
+
apiSource: "platform",
|
|
40
|
+
useServerProxy: true
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
var FLASH_PROFILE = createProfile({
|
|
44
|
+
id: "builtin:auto:nolo",
|
|
45
|
+
tier: "flash",
|
|
46
|
+
legacyAgentKey: BUILTIN_NOLO_AGENT_KEY,
|
|
47
|
+
name: "nolo",
|
|
48
|
+
model: "deepseek-flash"
|
|
49
|
+
});
|
|
50
|
+
var AUTO_EXECUTION_PROFILES = {
|
|
51
|
+
flash: FLASH_PROFILE,
|
|
52
|
+
balanced: { ...FLASH_PROFILE, tier: "balanced" },
|
|
53
|
+
quality: { ...FLASH_PROFILE, tier: "quality" },
|
|
54
|
+
image: { ...FLASH_PROFILE, tier: "image" }
|
|
55
|
+
};
|
|
56
|
+
var DEFAULT_AUTO_EXECUTION_TIER = "flash";
|
|
57
|
+
var DEFAULT_AUTO_EXECUTION_PROFILE = AUTO_EXECUTION_PROFILES[DEFAULT_AUTO_EXECUTION_TIER];
|
|
58
|
+
var resolveAutoExecutionProfile = (tier) => AUTO_EXECUTION_PROFILES[tier ?? DEFAULT_AUTO_EXECUTION_TIER] ?? DEFAULT_AUTO_EXECUTION_PROFILE;
|
|
59
|
+
|
|
23
60
|
// packages/ai/token/cacheTokenFields.ts
|
|
24
61
|
var finiteTokenCount = (value) => {
|
|
25
62
|
if (typeof value !== "number" || !Number.isFinite(value)) return void 0;
|
|
@@ -279,7 +316,7 @@ var normalizeUsage = (usage) => {
|
|
|
279
316
|
// packages/agent-runtime/emptyAssistantRepair.ts
|
|
280
317
|
var EMPTY_ASSISTANT_REPAIR_PROMPT = "\u8BF7\u7ED9\u51FA\u660E\u786E\u7684\u6587\u5B57\u56DE\u7B54\u6216\u6267\u884C\u4E0B\u4E00\u6B65\uFF1A\u5982\u679C\u4EFB\u52A1\u5DF2\u5B8C\u6210\uFF0C\u8BF7\u76F4\u63A5\u603B\u7ED3\u7ED3\u679C\uFF1B\u5982\u679C\u9700\u8981\u8C03\u7528\u5DE5\u5177\uFF0C\u53EA\u80FD\u8C03\u7528\u672C\u6B21\u8BF7\u6C42\u4E2D\u5DF2\u58F0\u660E\u7684\u5DE5\u5177\u2014\u2014\u4F60\u60F3\u7528\u7684\u5DE5\u5177\u4E0D\u5728\u58F0\u660E\u5217\u8868\u4E2D\u65F6\uFF0C\u4E0D\u8981\u5C1D\u8BD5\u8C03\u7528\u5B83\uFF0C\u76F4\u63A5\u7528\u6587\u5B57\u8BF4\u660E\u8BE5\u80FD\u529B\u5F53\u524D\u4E0D\u53EF\u7528\u3002\u8BF7\u5207\u52FF\u8FD4\u56DE\u7A7A\u5185\u5BB9\u3002";
|
|
281
318
|
var EMPTY_ASSISTANT_FALLBACK_MESSAGE = "\u6A21\u578B\u8FDE\u7EED\u8FD4\u56DE\u7A7A\u6D88\u606F\uFF0C\u5F53\u524D\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u5F53\u524D\u6B65\u9AA4\uFF0C\u6216\u7ED9\u51FA\u66F4\u5177\u4F53\u7684\u4FEE\u6539\u8303\u56F4\u3002";
|
|
282
|
-
var LENGTH_TRUNCATED_FALLBACK_MESSAGE = "\u8F93\u51FA\u8FBE\u5230\u957F\u5EA6\u4E0A\u9650\u88AB\u622A\u65AD\uFF0C\u5EFA\u8BAE\u7F29\u77ED\u4EFB\u52A1\u6216\u63D0\u9AD8\u8F93\u51FA\u4E0A\u9650\u3002";
|
|
319
|
+
var LENGTH_TRUNCATED_FALLBACK_MESSAGE = "\u8F93\u51FA\u8FBE\u5230\u957F\u5EA6\u4E0A\u9650\u88AB\u622A\u65AD\uFF0C\u6216\u4E0A\u4E0B\u6587\u5DF2\u8D85\u51FA\u6A21\u578B\u7A97\u53E3\u3002\u5EFA\u8BAE\u7F29\u77ED\u4EFB\u52A1\u3001\u538B\u7F29\u6216\u65B0\u5F00\u5BF9\u8BDD\uFF0C\u6216\u63D0\u9AD8\u8F93\u51FA\u4E0A\u9650\u3002";
|
|
283
320
|
var STREAM_TRUNCATED_FALLBACK_MESSAGE = "\u4E0A\u6E38\u54CD\u5E94\u6D41\u5728\u6536\u5C3E\u524D\u88AB\u4E2D\u65AD\uFF08\u672A\u6536\u5230\u7ED3\u675F\u6807\u8BB0\uFF09\uFF0C\u672C\u8F6E\u8F93\u51FA\u4E0D\u5B8C\u6574\u3002\u8BF7\u91CD\u8BD5\u5F53\u524D\u6B65\u9AA4\u3002";
|
|
284
321
|
var REPETITION_LOOP_FALLBACK_MESSAGE = "\u68C0\u6D4B\u5230\u6A21\u578B\u9677\u5165\u91CD\u590D\u8F93\u51FA\u6B7B\u5FAA\u73AF\uFF0C\u5DF2\u81EA\u52A8\u7194\u65AD\u7EC8\u6B62\u5F53\u524D\u4EFB\u52A1\u3002";
|
|
285
322
|
var STAGNANT_TOOL_CALLS_FALLBACK_MESSAGE = "\u68C0\u6D4B\u5230\u8FDE\u7EED\u591A\u6B21\u76F8\u540C\u5DE5\u5177\u8C03\u7528\u4E14\u65E0\u5B9E\u8D28\u8FDB\u5C55\uFF0C\u5DF2\u81EA\u52A8\u7194\u65AD\u7EC8\u6B62\u5F53\u524D\u4EFB\u52A1\u3002";
|
|
@@ -346,44 +383,9 @@ function resolveTruncatedReasoningTailLog(reason, reasoning_content) {
|
|
|
346
383
|
return null;
|
|
347
384
|
}
|
|
348
385
|
|
|
349
|
-
// packages/agent-runtime/autoExecutionProfiles.ts
|
|
350
|
-
var createProfile = (input) => ({
|
|
351
|
-
id: input.id,
|
|
352
|
-
tier: input.tier,
|
|
353
|
-
legacyAgentKey: input.legacyAgentKey,
|
|
354
|
-
key: input.legacyAgentKey,
|
|
355
|
-
name: input.name,
|
|
356
|
-
provider: "nolo",
|
|
357
|
-
model: input.model,
|
|
358
|
-
apiSource: "platform",
|
|
359
|
-
useServerProxy: true,
|
|
360
|
-
rawRecord: {
|
|
361
|
-
dbKey: input.legacyAgentKey,
|
|
362
|
-
isPublic: true,
|
|
363
|
-
provider: "nolo",
|
|
364
|
-
model: input.model,
|
|
365
|
-
apiSource: "platform",
|
|
366
|
-
useServerProxy: true
|
|
367
|
-
}
|
|
368
|
-
});
|
|
369
|
-
var FLASH_PROFILE = createProfile({
|
|
370
|
-
id: "builtin:auto:nolo",
|
|
371
|
-
tier: "flash",
|
|
372
|
-
legacyAgentKey: BUILTIN_NOLO_AGENT_KEY,
|
|
373
|
-
name: "nolo",
|
|
374
|
-
model: "deepseek-flash"
|
|
375
|
-
});
|
|
376
|
-
var AUTO_EXECUTION_PROFILES = {
|
|
377
|
-
flash: FLASH_PROFILE,
|
|
378
|
-
balanced: { ...FLASH_PROFILE, tier: "balanced" },
|
|
379
|
-
quality: { ...FLASH_PROFILE, tier: "quality" },
|
|
380
|
-
image: { ...FLASH_PROFILE, tier: "image" }
|
|
381
|
-
};
|
|
382
|
-
var DEFAULT_AUTO_EXECUTION_TIER = "flash";
|
|
383
|
-
var DEFAULT_AUTO_EXECUTION_PROFILE = AUTO_EXECUTION_PROFILES[DEFAULT_AUTO_EXECUTION_TIER];
|
|
384
|
-
var resolveAutoExecutionProfile = (tier) => AUTO_EXECUTION_PROFILES[tier ?? DEFAULT_AUTO_EXECUTION_TIER] ?? DEFAULT_AUTO_EXECUTION_PROFILE;
|
|
385
|
-
|
|
386
386
|
export {
|
|
387
|
+
DEFAULT_AUTO_EXECUTION_PROFILE,
|
|
388
|
+
resolveAutoExecutionProfile,
|
|
387
389
|
readCacheReadInputTokens,
|
|
388
390
|
readCacheCreationInputTokens,
|
|
389
391
|
DEFAULT_CONTEXT_WINDOW,
|
|
@@ -399,7 +401,5 @@ export {
|
|
|
399
401
|
resolveEmptyAssistantOutcome,
|
|
400
402
|
resolveEmptyAssistantFallbackMessage,
|
|
401
403
|
hasAssistantVisibleOutput,
|
|
402
|
-
resolveTruncatedReasoningTailLog
|
|
403
|
-
DEFAULT_AUTO_EXECUTION_PROFILE,
|
|
404
|
-
resolveAutoExecutionProfile
|
|
404
|
+
resolveTruncatedReasoningTailLog
|
|
405
405
|
};
|