nolo-cli 0.152.0-alpha.1 → 0.153.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/{_executeModel-4KHFMQT4.js → _executeModel-YAHIA3TR.js} +44 -45
- package/{accountResolver-7RYB4D2P.js → accountResolver-55EDKEIK.js} +1 -1
- package/{action-SXJD5N5R.js → action-GPPJC5TI.js} +4 -4
- package/{addContentAction-ZV774PHH.js → addContentAction-BI6RDRTQ.js} +8 -8
- package/{addDialogAgentAction-A6SMKAGH.js → addDialogAgentAction-4RJYUSIK.js} +7 -7
- package/{agentDeleteCommand-EKFV5FC7.js → agentDeleteCommand-6W2VQADC.js} +57 -57
- package/{agentEmailCommands-MNV3MUH5.js → agentEmailCommands-ZTS5JSP5.js} +59 -59
- package/{agentListCommands-E6FYKXC3.js → agentListCommands-MM5OLPBY.js} +23 -23
- package/{agentMachineCommands-2GFUU7GF.js → agentMachineCommands-WPFV4TSD.js} +22 -21
- package/{agentProviderCommands-HL6MBLCL.js → agentProviderCommands-MKG2OOEY.js} +2 -2
- package/{agentRecordCommands-LPHHTEPM.js → agentRecordCommands-YW7XO5CX.js} +57 -57
- package/{agentRunCommand-JSPW7W32.js → agentRunCommand-R2JTIRPZ.js} +59 -58
- package/{agentRunControl-IFM7IGMG.js → agentRunControl-2C5GM3BW.js} +5 -5
- package/{agentRuntimeLocal-ARS4TV77.js → agentRuntimeLocal-RJKTDWNN.js} +16 -16
- package/{agentSlice-IP4DZNNV.js → agentSlice-7FNTOPHE.js} +8 -8
- package/{appDeleteCommands-JHTLKQSX.js → appDeleteCommands-7EOM274T.js} +21 -21
- package/{appDeployCommands-5V26M2KA.js → appDeployCommands-2I3QYJ5G.js} +21 -21
- package/{appDeployStatusCommands-SBSPS627.js → appDeployStatusCommands-LEML7FPR.js} +21 -21
- package/{appGetCommands-NKPD2L45.js → appGetCommands-ZQSVHGQM.js} +21 -21
- package/{appListCommands-ZOGRZFYY.js → appListCommands-BVA7XKQO.js} +21 -21
- package/{authCommand-QYN47CQD.js → authCommand-NIV3DKPF.js} +13 -293
- package/{authCommands-77CHYBGF.js → authCommands-AMNIAKEG.js} +2 -2
- package/{builtinSkillRegistry-TDQ6JB2E.js → builtinSkillRegistry-H3AY27TR.js} +3 -3
- package/{chromeCommands-OBBNJCLS.js → chromeCommands-IY4NVSXZ.js} +17 -10
- package/{chunk-SW4S4XYB.js → chunk-2AB2HA4M.js} +84 -34
- package/{chunk-VNP54NZL.js → chunk-2EROINJB.js} +14 -14
- package/{chunk-4PXHOOFA.js → chunk-2MTE2PEH.js} +3 -3
- package/{chunk-4YRTZIVN.js → chunk-2SGAI64X.js} +2 -2
- package/{chunk-QFEW2ULV.js → chunk-32ZKZET7.js} +1 -1
- package/{chunk-GQV5KHJU.js → chunk-3C2QLERX.js} +1 -1
- package/{chunk-XPWGOTBQ.js → chunk-3L2WKC3W.js} +1 -8
- package/{chunk-WD4XYDYC.js → chunk-3WIXU4XO.js} +224 -1
- package/{chunk-MZHOLWW5.js → chunk-4J4RVSHE.js} +3 -3
- package/{chunk-YBNHPX4S.js → chunk-4RJJDA57.js} +1 -1
- package/{chunk-OFVFQYIE.js → chunk-6COBMDV4.js} +19 -13
- package/{chunk-HL3O3PCQ.js → chunk-6TF64IF2.js} +2 -2
- package/{chunk-BNDETALN.js → chunk-7NSQJKGA.js} +45 -13
- package/{chunk-UUPR3TD7.js → chunk-7RF4O6AT.js} +1 -3
- package/{chunk-LC23WBCU.js → chunk-ACTR4SH2.js} +6 -6
- package/{chunk-HSJPKBLC.js → chunk-ANJTRG52.js} +2 -2
- package/{chunk-2GGXHQIW.js → chunk-BLVSFYQ3.js} +4 -2
- package/{chunk-ISQL4V7C.js → chunk-C3OK72G3.js} +1 -1
- package/{chunk-CHCS6XPJ.js → chunk-CGFNDIKK.js} +65 -0
- package/{chunk-F32Z66T4.js → chunk-CON6SI7N.js} +1 -1
- package/{chunk-HIQ4GF53.js → chunk-DC3SZCRR.js} +7 -3
- package/{chunk-RQ6E3G5L.js → chunk-DRPDGHQB.js} +18 -2
- package/{chunk-RVWMAFIT.js → chunk-FYYSDHVQ.js} +1 -1
- package/{chunk-XTWDF6RU.js → chunk-GLUL4C5S.js} +21 -17
- package/{chunk-TYYRSFBG.js → chunk-HB4XPBC7.js} +3 -35
- package/{chunk-6MJNEXUU.js → chunk-HGDKT2D6.js} +4 -0
- package/{chunk-UBUH2TCC.js → chunk-I2RMFLLH.js} +2 -2
- package/{chunk-VJXHL6MH.js → chunk-ICRRXBRN.js} +3 -3
- package/{chunk-XS47QOFV.js → chunk-IE5PXKVU.js} +2 -264
- package/{chunk-KMM2X7LP.js → chunk-ILVOUUMR.js} +3 -3
- package/{chunk-KFHQQ3NO.js → chunk-INFHX73M.js} +1 -1
- package/{chunk-XRUSXPCQ.js → chunk-IPAW7XLD.js} +57 -4
- package/{chunk-PLSVXHSA.js → chunk-IRTOYSA2.js} +3 -3
- package/{chunk-GCKHQECX.js → chunk-IYBIRCQV.js} +1 -1
- package/{chunk-ILU2NPWY.js → chunk-J2ATF74A.js} +2 -2
- package/{chunk-XZNCX52W.js → chunk-JGRPBIZZ.js} +1 -1
- package/{chunk-E2AKSW7L.js → chunk-JPJGMOIM.js} +2 -2
- package/{chunk-6LIKQYG4.js → chunk-JZYIISJB.js} +21 -23
- package/{chunk-44WXLHFI.js → chunk-K43ZF2C3.js} +1 -1
- package/{chunk-I2ZMGXXF.js → chunk-KFHREHUQ.js} +1 -1
- package/{chunk-JKMLSTZK.js → chunk-KLA62VVE.js} +3 -3
- package/{chunk-AHYBQP3M.js → chunk-L57R6PFF.js} +3 -3
- package/{chunk-DYYMIUN4.js → chunk-L6EQV5OC.js} +4 -4
- package/{chunk-EZVK3N5L.js → chunk-LOEO7LRC.js} +56 -0
- package/{chunk-EDX5XSJM.js → chunk-M2P3OGXZ.js} +3 -3
- package/{chunk-YVLQXTUB.js → chunk-MM3662RS.js} +1 -1
- package/{chunk-CBHGZRCE.js → chunk-MYOH447Z.js} +1 -1
- package/{chunk-A4MW3YZL.js → chunk-NDZOXXIM.js} +18 -4
- package/{chunk-EHFS4XZO.js → chunk-NKBMD4TC.js} +12 -8
- package/{chunk-64PFYIAY.js → chunk-OJ2PQXBV.js} +674 -637
- package/{chunk-36OMEXXR.js → chunk-OON4OBWI.js} +1 -1
- package/{chunk-SEJ5OS6F.js → chunk-PXYBUFDB.js} +4 -0
- package/{chunk-XCA6HQGS.js → chunk-QEONMOV7.js} +5 -5
- package/{chunk-USHQX6VT.js → chunk-QPY264HO.js} +1 -1
- package/{chunk-PFBIXTFB.js → chunk-QSKN3E7Q.js} +52 -26
- package/{chunk-TNIX77YM.js → chunk-R5GO3YZP.js} +34 -1
- package/{chunk-I5V3V2H4.js → chunk-RL2OOQUM.js} +37 -25
- package/{chunk-AIZE5TDM.js → chunk-SPKLALBU.js} +2 -2
- package/{chunk-K2AER7RX.js → chunk-SUKSWFLP.js} +2 -2
- package/{chunk-I4SN4NUQ.js → chunk-TRW43TSC.js} +1 -1
- package/{chunk-D2QN6CTI.js → chunk-UCLSOLX4.js} +8 -6
- package/{chunk-TYJ5XFEA.js → chunk-UFYBYB26.js} +1 -1
- package/{chunk-SCMHQUMK.js → chunk-US6MKPE7.js} +1 -1
- package/{chunk-ZIWPQEFU.js → chunk-VYNMQ6HW.js} +1 -28
- package/{chunk-PPU323UE.js → chunk-W2NNEHHW.js} +183 -66
- package/{chunk-IJERIUXS.js → chunk-WRCZXJ4N.js} +6 -3
- package/chunk-Y5GCAMGP.js +9 -0
- package/{chunk-GKXCHNTE.js → chunk-Y6ORVLSS.js} +1 -1
- package/{chunk-RSHPU4PD.js → chunk-YANF2RR4.js} +2 -2
- package/{chunk-EYWJT7A2.js → chunk-YPG7TUQD.js} +3 -3
- package/{chunk-PMYAE4OZ.js → chunk-YPY2S3DV.js} +3 -3
- package/{chunk-ZF6526IQ.js → chunk-ZEY4NJRE.js} +2 -2
- package/{chunk-JWTSWUPS.js → chunk-ZGG7BBVE.js} +7 -6
- package/{chunk-T5BHHWA5.js → chunk-ZGSW3HWM.js} +7 -7
- package/{chunk-74RAWNQN.js → chunk-ZVQHBIWV.js} +6 -6
- package/{chunk-DTODXBHK.js → chunk-ZWG3C7VI.js} +2 -2
- package/{commandRegistry-VBALU4Q4.js → commandRegistry-ZPK4AUWM.js} +79 -87
- package/{contentThunks-HPY2QNWZ.js → contentThunks-SXEQLAFP.js} +20 -20
- package/{createAgentAutomationAction-6ADGPGY6.js → createAgentAutomationAction-INVACTI3.js} +20 -20
- package/{createDialogAction-6ABMSEW2.js → createDialogAction-FDO3DYW4.js} +21 -21
- package/{createPageAction-OC4NNRPC.js → createPageAction-Q5CQPEQH.js} +20 -20
- package/{dbSlice-J37OGIXH.js → dbSlice-DC2J53RC.js} +7 -7
- package/{deleteFile-6JWDDRVP.js → deleteFile-KYWEMNFX.js} +4 -4
- package/{dialogCommands-EIGBRSQP.js → dialogCommands-MUFYPVMP.js} +24 -23
- package/{dialogSlice-SI45KJOH.js → dialogSlice-DS22VO6X.js} +19 -19
- package/{docCreateCommands-3JDBBMU5.js → docCreateCommands-OPWOKG62.js} +19 -19
- package/{docDeleteCommands-5M6C7UUB.js → docDeleteCommands-IBV3WMKI.js} +20 -20
- package/{docReadCommands-DUB57F6V.js → docReadCommands-LVALHMLZ.js} +19 -19
- package/{docStore-L43MDEK4.js → docStore-UFEWRQ5W.js} +8 -8
- package/{docUpdateCommands-WF7MAMPK.js → docUpdateCommands-Z5OUEAK7.js} +19 -19
- package/{getPricing-FKK3F5EJ.js → getPricing-TX35D7PI.js} +3 -3
- package/{handleSendMessageAction-BSMU7SVS.js → handleSendMessageAction-AOPC2RYQ.js} +33 -33
- package/index.js +7 -7
- package/{localRuntimeAdapter-N5PDR26F.js → localRuntimeAdapter-OK722XHN.js} +57 -55
- package/{machineCommands-TMXJKZCE.js → machineCommands-NW3KT5RE.js} +61 -59
- package/{machineWsRunDispatch-25H63KEH.js → machineWsRunDispatch-EWQDI6TL.js} +56 -56
- package/{memberThunks-66DH6ABQ.js → memberThunks-2DWKLE6W.js} +8 -8
- package/{models-LAS4B2B5.js → models-PZQC7VV4.js} +2 -2
- package/package.json +1 -1
- package/{profileConfig-ZGOFORWV.js → profileConfig-KN3N2BLF.js} +7 -1
- package/{providerPresetApply-MY66I6NT.js → providerPresetApply-GSJI4JBJ.js} +6 -6
- package/{providerRegistry-QOE2FT57.js → providerRegistry-TSSTPGWF.js} +6 -6
- package/{read-DC4NUGN6.js → read-L7QEJETH.js} +5 -5
- package/{readDocTool-NCJ5NT25.js → readDocTool-QELXV2GW.js} +1 -1
- package/{readlineWorkspace-BS7WVCL2.js → readlineWorkspace-ZTNEFMTX.js} +330 -118
- package/{removeDialogAgentAction-E2H3OZU6.js → removeDialogAgentAction-376XSUP2.js} +9 -9
- package/{runAgentClientLoop-BVKRI4SY.js → runAgentClientLoop-PQTFXXFA.js} +48 -44
- package/{runtimeDoctorCommands-GIOGC5SC.js → runtimeDoctorCommands-56NWKNON.js} +5 -5
- package/{secretCommands-ZXZRLR3R.js → secretCommands-DNY56NSU.js} +11 -1
- package/{setDialogExtraReferencesAction-SITRPMYU.js → setDialogExtraReferencesAction-QBDSH63D.js} +8 -8
- package/{setPrimaryDialogAgentAction-U7N45TGC.js → setPrimaryDialogAgentAction-537QFGW3.js} +9 -9
- package/settingThunks-4Z43ZSAT.js +923 -0
- package/{spaceCommands-5EWREUWS.js → spaceCommands-AWIIP7J5.js} +19 -19
- package/{streamAgentChatTurn-B4VFUV52.js → streamAgentChatTurn-I4M3CUBF.js} +53 -103
- package/{switchDialogAgentAction-OMGBD3N2.js → switchDialogAgentAction-CSO6AKRL.js} +7 -7
- package/{tableCommands-U3QDY4L6.js → tableCommands-LBH3QPPO.js} +1 -1
- package/{toolApiClient-7WSJJJBV.js → toolApiClient-HGNO53TC.js} +2 -2
- package/{tools-5WYAUKMK.js → tools-TOSN72UD.js} +37 -37
- package/{tuiSummaryLlmCaller-PPU7YDBG.js → tuiSummaryLlmCaller-KLK6K3Q3.js} +8 -8
- package/{updateCommands-NQXAGFM7.js → updateCommands-LXZLG44Y.js} +2 -2
- package/{updateDialogTitleAction-YJHDKHFX.js → updateDialogTitleAction-TJWFUJX4.js} +20 -20
- package/{workloadLifecycle-36DXRZKU.js → workloadLifecycle-6O6PMISX.js} +2 -2
- package/chunk-W4S6OTSC.js +0 -35
- package/settingThunks-Y7SVJOMZ.js +0 -1371
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getAntigravityUserAgent,
|
|
12
12
|
normalizeAntigravityTokenPayload,
|
|
13
13
|
refreshAntigravityToken
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JGRPBIZZ.js";
|
|
15
15
|
import {
|
|
16
16
|
asOptionalFiniteNumber
|
|
17
17
|
} from "./chunk-WWC7I6TA.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import {
|
|
28
28
|
buildEnvFromProfile,
|
|
29
29
|
loadProfileConfig
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-R5GO3YZP.js";
|
|
31
31
|
import {
|
|
32
32
|
writeOAuthCredential
|
|
33
33
|
} from "./chunk-ZWQUWF6W.js";
|
|
@@ -868,257 +868,6 @@ function resolveServerSyncConfig() {
|
|
|
868
868
|
return null;
|
|
869
869
|
}
|
|
870
870
|
|
|
871
|
-
// packages/agent-runtime/workbuddyOAuth.ts
|
|
872
|
-
var WORKBUDDY_APP_VERSION = "2.0.0";
|
|
873
|
-
var WORKBUDDY_UA_VERSION = "5.5.6";
|
|
874
|
-
var WORKBUDDY_POLL_INTERVAL_MS = 1e3;
|
|
875
|
-
var WORKBUDDY_SIGN_IN_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
876
|
-
var WORKBUDDY_EARLY_REFRESH_SKEW_MS = 60 * 1e3;
|
|
877
|
-
var WORKBUDDY_KEEP_RENEWED_MS = 60 * 1e3;
|
|
878
|
-
var WORKBUDDY_REQUEST_TIMEOUT_MS = 3e4;
|
|
879
|
-
var WORKBUDDY_SITES = {
|
|
880
|
-
workbuddy: {
|
|
881
|
-
id: "workbuddy",
|
|
882
|
-
name: "WorkBuddy",
|
|
883
|
-
endpoint: "https://copilot.tencent.com",
|
|
884
|
-
authId: "workbuddy-desktop",
|
|
885
|
-
platform: "workbuddy",
|
|
886
|
-
ai: false
|
|
887
|
-
},
|
|
888
|
-
"workbuddy-ai": {
|
|
889
|
-
id: "workbuddy-ai",
|
|
890
|
-
name: "WorkBuddy AI",
|
|
891
|
-
endpoint: "https://www.workbuddy.ai",
|
|
892
|
-
authId: "workbuddy-desktop-ai",
|
|
893
|
-
platform: "workbuddy-ai",
|
|
894
|
-
ai: true
|
|
895
|
-
}
|
|
896
|
-
};
|
|
897
|
-
function getWorkBuddySite(site) {
|
|
898
|
-
if (site === "workbuddy" || site === "workbuddy-ai") {
|
|
899
|
-
return WORKBUDDY_SITES[site];
|
|
900
|
-
}
|
|
901
|
-
throw new Error(`Unknown WorkBuddy site: "${String(site)}". Expected "workbuddy" or "workbuddy-ai".`);
|
|
902
|
-
}
|
|
903
|
-
function sanitizeWorkBuddyError(message) {
|
|
904
|
-
return message.replace(/Bearer\s+[A-Za-z0-9._~+/-]+=*/gi, "Bearer [REDACTED]").replace(/([?&]|\b)(state|token|accessToken|refreshToken)=[^&\s]+/gi, "$1$2=[REDACTED]").replace(/(["']?(?:accessToken|refreshToken|state|token)["']?\s*:\s*["'])[^"']+["']/gi, '$1[REDACTED]"');
|
|
905
|
-
}
|
|
906
|
-
function sanitizeWorkBuddyDomain(rawDomain, defaultHost) {
|
|
907
|
-
if (typeof rawDomain !== "string" || !rawDomain.trim()) {
|
|
908
|
-
return defaultHost;
|
|
909
|
-
}
|
|
910
|
-
let domain = rawDomain.trim();
|
|
911
|
-
if (domain.startsWith("https://") || domain.startsWith("http://")) {
|
|
912
|
-
try {
|
|
913
|
-
domain = new URL(domain).host;
|
|
914
|
-
} catch {
|
|
915
|
-
return defaultHost;
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
const slashIdx = domain.indexOf("/");
|
|
919
|
-
if (slashIdx !== -1) domain = domain.slice(0, slashIdx);
|
|
920
|
-
const qIdx = domain.indexOf("?");
|
|
921
|
-
if (qIdx !== -1) domain = domain.slice(0, qIdx);
|
|
922
|
-
if (!/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/.test(domain)) {
|
|
923
|
-
return defaultHost;
|
|
924
|
-
}
|
|
925
|
-
return domain;
|
|
926
|
-
}
|
|
927
|
-
function normalizeWorkBuddyTokenPayload(siteOrArgs, payloadArg, baseCredentialArg, nowArg) {
|
|
928
|
-
let site;
|
|
929
|
-
let payload;
|
|
930
|
-
let baseCredential;
|
|
931
|
-
let now;
|
|
932
|
-
if (typeof siteOrArgs === "object" && siteOrArgs !== null && "site" in siteOrArgs) {
|
|
933
|
-
site = siteOrArgs.site;
|
|
934
|
-
payload = siteOrArgs.payload ?? {};
|
|
935
|
-
baseCredential = siteOrArgs.baseCredential;
|
|
936
|
-
now = siteOrArgs.now ?? Date.now();
|
|
937
|
-
} else {
|
|
938
|
-
site = siteOrArgs;
|
|
939
|
-
payload = payloadArg ?? {};
|
|
940
|
-
baseCredential = baseCredentialArg;
|
|
941
|
-
now = nowArg ?? Date.now();
|
|
942
|
-
}
|
|
943
|
-
const siteConfig = getWorkBuddySite(site);
|
|
944
|
-
if (typeof payload.accessToken !== "string" || !payload.accessToken.trim()) {
|
|
945
|
-
throw new Error("WorkBuddy token response missing accessToken");
|
|
946
|
-
}
|
|
947
|
-
const accessToken = payload.accessToken.trim();
|
|
948
|
-
let expiresAt;
|
|
949
|
-
const rawExpiresAt = Number(payload.expiresAt);
|
|
950
|
-
const rawExpiresIn = Number(payload.expiresIn);
|
|
951
|
-
if (Number.isFinite(rawExpiresAt) && rawExpiresAt > 0) {
|
|
952
|
-
expiresAt = rawExpiresAt;
|
|
953
|
-
} else if (Number.isFinite(rawExpiresIn) && rawExpiresIn > 0) {
|
|
954
|
-
expiresAt = now + rawExpiresIn * 1e3;
|
|
955
|
-
} else if (typeof baseCredential?.expiresAt === "number") {
|
|
956
|
-
expiresAt = baseCredential.expiresAt;
|
|
957
|
-
} else {
|
|
958
|
-
expiresAt = now + 3600 * 1e3;
|
|
959
|
-
}
|
|
960
|
-
let refreshExpiresAt;
|
|
961
|
-
const rawRefExpAt = Number(payload.refreshExpiresAt);
|
|
962
|
-
const rawRefExpIn = Number(payload.refreshExpiresIn);
|
|
963
|
-
if (Number.isFinite(rawRefExpAt) && rawRefExpAt > 0) {
|
|
964
|
-
refreshExpiresAt = rawRefExpAt;
|
|
965
|
-
} else if (Number.isFinite(rawRefExpIn) && rawRefExpIn > 0) {
|
|
966
|
-
refreshExpiresAt = now + rawRefExpIn * 1e3;
|
|
967
|
-
} else if (typeof baseCredential?.metadata?.refreshExpiresAt === "number") {
|
|
968
|
-
refreshExpiresAt = baseCredential.metadata.refreshExpiresAt;
|
|
969
|
-
}
|
|
970
|
-
const refreshToken = typeof payload.refreshToken === "string" && payload.refreshToken.trim() ? payload.refreshToken.trim() : baseCredential?.refreshToken;
|
|
971
|
-
const uid = typeof payload.uid === "string" && payload.uid.trim() ? payload.uid.trim() : typeof baseCredential?.metadata?.uid === "string" && baseCredential.metadata.uid.trim() ? baseCredential.metadata.uid.trim() : baseCredential?.accountId ?? "";
|
|
972
|
-
const defaultHost = new URL(siteConfig.endpoint).host;
|
|
973
|
-
const domain = sanitizeWorkBuddyDomain(
|
|
974
|
-
payload.domain ?? baseCredential?.metadata?.domain,
|
|
975
|
-
defaultHost
|
|
976
|
-
);
|
|
977
|
-
const rawEnterpriseId = typeof payload.enterpriseId === "string" ? payload.enterpriseId : typeof baseCredential?.metadata?.enterpriseId === "string" ? baseCredential.metadata.enterpriseId : "";
|
|
978
|
-
const enterpriseId = rawEnterpriseId.trim();
|
|
979
|
-
const nickname = typeof payload.nickname === "string" && payload.nickname.trim() ? payload.nickname.trim() : typeof payload.phoneNumber === "string" && payload.phoneNumber.trim() ? payload.phoneNumber.trim() : typeof baseCredential?.metadata?.nickname === "string" ? baseCredential.metadata.nickname : void 0;
|
|
980
|
-
return {
|
|
981
|
-
...baseCredential ?? {},
|
|
982
|
-
provider: site,
|
|
983
|
-
accessToken,
|
|
984
|
-
...refreshToken ? { refreshToken } : {},
|
|
985
|
-
expiresAt,
|
|
986
|
-
obtainedAt: now,
|
|
987
|
-
accountId: uid || nickname || siteConfig.name,
|
|
988
|
-
metadata: {
|
|
989
|
-
site,
|
|
990
|
-
uid,
|
|
991
|
-
domain,
|
|
992
|
-
...enterpriseId ? { enterpriseId } : {},
|
|
993
|
-
...refreshExpiresAt ? { refreshExpiresAt } : {},
|
|
994
|
-
...nickname ? { nickname } : {}
|
|
995
|
-
}
|
|
996
|
-
};
|
|
997
|
-
}
|
|
998
|
-
var renewing = /* @__PURE__ */ new Map();
|
|
999
|
-
var renewed = /* @__PURE__ */ new Map();
|
|
1000
|
-
function getWorkBuddyRefreshKey(site, credential) {
|
|
1001
|
-
const accountOrUid = credential.accountId || credential.metadata?.uid || "";
|
|
1002
|
-
const token = credential.refreshToken || "";
|
|
1003
|
-
return `${site}
|
|
1004
|
-
${accountOrUid}
|
|
1005
|
-
${token}`;
|
|
1006
|
-
}
|
|
1007
|
-
async function refreshWorkBuddyToken(credential, deps = {}) {
|
|
1008
|
-
if (!credential.refreshToken) {
|
|
1009
|
-
throw new Error("WorkBuddy credential has no refresh_token");
|
|
1010
|
-
}
|
|
1011
|
-
const now = deps.now?.() ?? Date.now();
|
|
1012
|
-
const refreshExpiresAt = credential.metadata?.refreshExpiresAt;
|
|
1013
|
-
if (typeof refreshExpiresAt === "number" && now >= refreshExpiresAt) {
|
|
1014
|
-
throw new Error("this WorkBuddy account is signed out; sign in again");
|
|
1015
|
-
}
|
|
1016
|
-
const site = credential.metadata?.site === "workbuddy-ai" || credential.provider === "workbuddy-ai" ? "workbuddy-ai" : "workbuddy";
|
|
1017
|
-
const siteConfig = getWorkBuddySite(site);
|
|
1018
|
-
const key = getWorkBuddyRefreshKey(site, credential);
|
|
1019
|
-
const cached = renewed.get(key);
|
|
1020
|
-
if (cached && now - cached.at < WORKBUDDY_KEEP_RENEWED_MS) {
|
|
1021
|
-
return cached.credential;
|
|
1022
|
-
}
|
|
1023
|
-
const inflight = renewing.get(key);
|
|
1024
|
-
if (inflight) {
|
|
1025
|
-
return inflight;
|
|
1026
|
-
}
|
|
1027
|
-
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
1028
|
-
const refreshPromise = (async () => {
|
|
1029
|
-
const defaultHost = new URL(siteConfig.endpoint).host;
|
|
1030
|
-
const domain = sanitizeWorkBuddyDomain(credential.metadata?.domain, defaultHost);
|
|
1031
|
-
const enterpriseId = typeof credential.metadata?.enterpriseId === "string" ? credential.metadata.enterpriseId.trim() : "";
|
|
1032
|
-
const headers = {
|
|
1033
|
-
"Content-Type": "application/json",
|
|
1034
|
-
Accept: "application/json",
|
|
1035
|
-
"User-Agent": `WorkBuddy/${WORKBUDDY_UA_VERSION}`,
|
|
1036
|
-
"X-Refresh-Token": credential.refreshToken,
|
|
1037
|
-
"X-Auth-Refresh-Source": "plugin",
|
|
1038
|
-
"X-Domain": domain,
|
|
1039
|
-
...enterpriseId ? { "X-Enterprise-Id": enterpriseId, "X-Tenant-Id": enterpriseId } : {}
|
|
1040
|
-
};
|
|
1041
|
-
let response;
|
|
1042
|
-
try {
|
|
1043
|
-
response = await fetchImpl(`${siteConfig.endpoint}/v2/plugin/auth/token/refresh`, {
|
|
1044
|
-
method: "POST",
|
|
1045
|
-
headers,
|
|
1046
|
-
body: "{}",
|
|
1047
|
-
signal: AbortSignal.timeout(WORKBUDDY_REQUEST_TIMEOUT_MS)
|
|
1048
|
-
});
|
|
1049
|
-
} catch (error) {
|
|
1050
|
-
throw new Error(sanitizeWorkBuddyError(`WorkBuddy token refresh failed: ${toErrorMessage(error)}`));
|
|
1051
|
-
}
|
|
1052
|
-
let text = "";
|
|
1053
|
-
try {
|
|
1054
|
-
text = await response.text();
|
|
1055
|
-
} catch {
|
|
1056
|
-
}
|
|
1057
|
-
let env = {};
|
|
1058
|
-
try {
|
|
1059
|
-
env = JSON.parse(text);
|
|
1060
|
-
} catch {
|
|
1061
|
-
}
|
|
1062
|
-
const code = typeof env.code === "number" ? env.code : Number.parseInt(String(env.code ?? ""), 10) || 0;
|
|
1063
|
-
if (!response.ok) {
|
|
1064
|
-
const why = String(env.msg || env.message || text.slice(0, 200) || response.statusText);
|
|
1065
|
-
throw new Error(
|
|
1066
|
-
sanitizeWorkBuddyError(
|
|
1067
|
-
`${siteConfig.name} token refresh failed: ${why} (HTTP ${response.status}${code ? `, code ${code}` : ""})`
|
|
1068
|
-
)
|
|
1069
|
-
);
|
|
1070
|
-
}
|
|
1071
|
-
if (code !== 0) {
|
|
1072
|
-
const why = String(env.msg || env.message || "error");
|
|
1073
|
-
throw new Error(
|
|
1074
|
-
sanitizeWorkBuddyError(`${siteConfig.name} token refresh failed: ${why} (${code})`)
|
|
1075
|
-
);
|
|
1076
|
-
}
|
|
1077
|
-
const data = env.data && typeof env.data === "object" ? env.data : env;
|
|
1078
|
-
if (typeof data.accessToken !== "string" || !data.accessToken.trim()) {
|
|
1079
|
-
throw new Error("WorkBuddy gave no refreshed token");
|
|
1080
|
-
}
|
|
1081
|
-
const nextCredential = normalizeWorkBuddyTokenPayload(site, data, credential, now);
|
|
1082
|
-
renewed.set(key, { credential: nextCredential, at: now });
|
|
1083
|
-
return nextCredential;
|
|
1084
|
-
})().finally(() => {
|
|
1085
|
-
renewing.delete(key);
|
|
1086
|
-
});
|
|
1087
|
-
renewing.set(key, refreshPromise);
|
|
1088
|
-
return refreshPromise;
|
|
1089
|
-
}
|
|
1090
|
-
var workbuddyRefresh = refreshWorkBuddyToken;
|
|
1091
|
-
function getWorkBuddyHeaders(credential) {
|
|
1092
|
-
const site = credential.metadata?.site === "workbuddy-ai" || credential.provider === "workbuddy-ai" ? "workbuddy-ai" : "workbuddy";
|
|
1093
|
-
const siteConfig = getWorkBuddySite(site);
|
|
1094
|
-
const defaultHost = new URL(siteConfig.endpoint).host;
|
|
1095
|
-
const domain = sanitizeWorkBuddyDomain(credential.metadata?.domain, defaultHost);
|
|
1096
|
-
const uid = typeof credential.metadata?.uid === "string" ? credential.metadata.uid.trim() : credential.accountId ?? "";
|
|
1097
|
-
const rawEnterpriseId = typeof credential.metadata?.enterpriseId === "string" ? credential.metadata.enterpriseId.trim() : "";
|
|
1098
|
-
const headers = {
|
|
1099
|
-
Authorization: `Bearer ${credential.accessToken}`,
|
|
1100
|
-
"X-User-Id": uid,
|
|
1101
|
-
"X-Domain": domain,
|
|
1102
|
-
"X-Product": "SaaS",
|
|
1103
|
-
"X-IDE-Type": "WorkBuddy",
|
|
1104
|
-
"User-Agent": `WorkBuddy/${WORKBUDDY_UA_VERSION}`,
|
|
1105
|
-
"X-Requested-With": "XMLHttpRequest",
|
|
1106
|
-
"X-Agent-Intent": "craft",
|
|
1107
|
-
"X-Agent-Purpose": "conversation",
|
|
1108
|
-
"X-IDE-Name": "WorkBuddy",
|
|
1109
|
-
"X-IDE-Version": WORKBUDDY_UA_VERSION
|
|
1110
|
-
};
|
|
1111
|
-
if (rawEnterpriseId) {
|
|
1112
|
-
const cleanEnterpriseId = rawEnterpriseId.replace(/[\r\n]/g, "");
|
|
1113
|
-
headers["X-Enterprise-Id"] = cleanEnterpriseId;
|
|
1114
|
-
headers["X-Tenant-Id"] = cleanEnterpriseId;
|
|
1115
|
-
}
|
|
1116
|
-
if (siteConfig.ai) {
|
|
1117
|
-
headers["X-Agent-Type"] = "main";
|
|
1118
|
-
}
|
|
1119
|
-
return headers;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
871
|
// packages/agent-runtime/xaiOAuth.ts
|
|
1123
872
|
var XAI_OAUTH_ISSUER = "https://auth.x.ai";
|
|
1124
873
|
var XAI_OAUTH_DISCOVERY_URL = `${XAI_OAUTH_ISSUER}/.well-known/openid-configuration`;
|
|
@@ -1497,17 +1246,6 @@ async function refreshCursorToken(credential, deps = {}) {
|
|
|
1497
1246
|
var cursorRefresh = refreshCursorToken;
|
|
1498
1247
|
|
|
1499
1248
|
export {
|
|
1500
|
-
WORKBUDDY_APP_VERSION,
|
|
1501
|
-
WORKBUDDY_UA_VERSION,
|
|
1502
|
-
WORKBUDDY_POLL_INTERVAL_MS,
|
|
1503
|
-
WORKBUDDY_SIGN_IN_TIMEOUT_MS,
|
|
1504
|
-
WORKBUDDY_REQUEST_TIMEOUT_MS,
|
|
1505
|
-
getWorkBuddySite,
|
|
1506
|
-
sanitizeWorkBuddyError,
|
|
1507
|
-
sanitizeWorkBuddyDomain,
|
|
1508
|
-
normalizeWorkBuddyTokenPayload,
|
|
1509
|
-
workbuddyRefresh,
|
|
1510
|
-
getWorkBuddyHeaders,
|
|
1511
1249
|
startCallbackServer,
|
|
1512
1250
|
runAntigravityOAuthLogin,
|
|
1513
1251
|
refreshAntigravityOAuthToken,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
patch,
|
|
9
9
|
readAndWait
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZVQHBIWV.js";
|
|
11
11
|
import {
|
|
12
12
|
toErrorMessage
|
|
13
13
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -333,7 +333,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
333
333
|
).unwrap();
|
|
334
334
|
if (dbSpaceId) {
|
|
335
335
|
try {
|
|
336
|
-
const { updateContentTitle } = await import("./contentThunks-
|
|
336
|
+
const { updateContentTitle } = await import("./contentThunks-SXEQLAFP.js");
|
|
337
337
|
await dispatch(
|
|
338
338
|
updateContentTitle({
|
|
339
339
|
spaceId: dbSpaceId,
|
|
@@ -372,7 +372,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
async function createDocState(args, thunkApi) {
|
|
375
|
-
const { createPageAction } = await import("./createPageAction-
|
|
375
|
+
const { createPageAction } = await import("./createPageAction-Q5CQPEQH.js");
|
|
376
376
|
return createPageAction(args, thunkApi);
|
|
377
377
|
}
|
|
378
378
|
function subscribe(listener) {
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getModelPricing
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YANF2RR4.js";
|
|
4
4
|
import {
|
|
5
5
|
PUBLIC_DEEPSEEK_V4_FLASH_AGENT_ID,
|
|
6
6
|
PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID,
|
|
7
7
|
PUBLIC_GLM_53_FLASH_AGENT_ID,
|
|
8
|
+
PUBLIC_GPT_61_SOL_AGENT_ID,
|
|
9
|
+
PUBLIC_GPT_6_ASTRA_AGENT_ID,
|
|
8
10
|
PUBLIC_GPT_IMAGE_2_CONTINUOUS_AGENT_ID,
|
|
9
11
|
PUBLIC_GPT_IMAGE_2_EDITOR_AGENT_ID,
|
|
10
12
|
PUBLIC_GPT_IMAGE_2_GENERATOR_AGENT_ID,
|
|
13
|
+
PUBLIC_KIMI_K3_AGENT_ID,
|
|
11
14
|
PUBLIC_NANO_BANANA_2_LITE_AGENT_ID,
|
|
12
15
|
builtinAgentCatalogEntryById,
|
|
13
16
|
catalogReleasedAtMs,
|
|
14
17
|
isRetiredCatalogEntry
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LOEO7LRC.js";
|
|
16
19
|
import {
|
|
17
20
|
parsePublicAgentId,
|
|
18
21
|
parseSystemAgentId,
|
|
@@ -20,14 +23,14 @@ import {
|
|
|
20
23
|
} from "./chunk-M2EJHDJP.js";
|
|
21
24
|
import {
|
|
22
25
|
getModelConfig
|
|
23
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TRW43TSC.js";
|
|
24
27
|
import {
|
|
25
28
|
isRecord
|
|
26
29
|
} from "./chunk-KUG52IAP.js";
|
|
27
30
|
import {
|
|
28
31
|
isNoloHostedProvider,
|
|
29
32
|
isPlatformHostedImageModel
|
|
30
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-CGFNDIKK.js";
|
|
31
34
|
|
|
32
35
|
// packages/core/publicAgentSeeds.ts
|
|
33
36
|
var AGENT_SEED_DEFAULTS = {
|
|
@@ -230,6 +233,52 @@ var CLAUDE_SONNET_5_5_DEF = defineAgentSeed({
|
|
|
230
233
|
tools: [],
|
|
231
234
|
tags: ["anthropic", "claude", "sonnet"]
|
|
232
235
|
});
|
|
236
|
+
var GPT_6_ASTRA_DEF = defineAgentSeed({
|
|
237
|
+
id: PUBLIC_GPT_6_ASTRA_AGENT_ID,
|
|
238
|
+
presetKey: "gpt-6-astra",
|
|
239
|
+
name: "GPT-6 Astra",
|
|
240
|
+
provider: "nolo",
|
|
241
|
+
model: "gpt-6-astra",
|
|
242
|
+
isPublic: true,
|
|
243
|
+
// 出自平台模型目录:gpt-6-astra hasVision: true、supportsTool: true。
|
|
244
|
+
hasVision: true,
|
|
245
|
+
introduction: "GPT-6 Astra \u516C\u5F00\u52A9\u624B\uFF0COpenAI \u91CD\u7B97\u529B\u65D7\u8230\u6863\uFF0C\u9002\u5408\u6700\u96BE\u7684\u63A8\u7406\u3001\u957F\u94FE\u8DEF\u5206\u6790\u3001\u4EE3\u7801\u653B\u5173\u548C\u56FE\u7247\u7406\u89E3\u3002\u5355\u4EF7\u9AD8\u4E8E\u5E38\u89C4\u6863\uFF0C\u9002\u5408\u771F\u6B63\u5361\u4F4F\u7684\u95EE\u9898\u3002\u9700\u5F00\u901A 199 \u79EF\u5206\u6863\u4F4D\u6216\u8D26\u6237\u4FDD\u6301\u6709\u6548\u4F59\u989D\uFF08\u2265 19 \u79EF\u5206\uFF09\u3002",
|
|
246
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F GPT-6 Astra\u3002\u9002\u5408\u6700\u96BE\u7684\u63A8\u7406\u3001\u590D\u6742\u4EE3\u7801\u548C\u591A\u6A21\u6001\u5206\u6790\uFF1B\u6211\u4F1A\u5148\u786E\u8BA4\u76EE\u6807\u4E0E\u7EA6\u675F\uFF0C\u518D\u7ED9\u7ED3\u8BBA\u548C\u4F9D\u636E\u3002\u9700\u5F00\u901A 199 \u79EF\u5206\u6863\u4F4D\u6216\u8D26\u6237\u4FDD\u6301\u6709\u6548\u4F59\u989D\uFF08\u2265 19 \u79EF\u5206\uFF09\u3002",
|
|
247
|
+
prompt: "\u5B9A\u4F4D\uFF1A\u91CD\u7B97\u529B\u65D7\u8230\u6863\uFF0C\u7528\u6765\u89E3\u51B3\u975E\u5E38\u89C4\u96BE\u5EA6\u7684\u4EFB\u52A1\u3002\n\u4F7F\u7528\u524D\u63D0\uFF1A\u9700\u5F00\u901A 199 \u79EF\u5206\u6863\u4F4D\u6216\u8D26\u6237\u4FDD\u6301\u6709\u6548\u4F59\u989D\uFF08\u2265 19 \u79EF\u5206\uFF09\u3002\n\u5DE5\u4F5C\u65B9\u5F0F\uFF1A\n- \u5148\u660E\u786E\u76EE\u6807\u3001\u7EA6\u675F\u548C\u5DF2\u77E5\u4E8B\u5B9E\uFF0C\u518D\u62C6\u89E3\u51FA\u53EF\u9A8C\u8BC1\u7684\u4E2D\u95F4\u7ED3\u8BBA\u3002\n- \u8BC1\u636E\u4E0D\u8DB3\u65F6\u8BF4\u660E\u7F3A\u4EC0\u4E48\u3001\u600E\u6837\u8865\u9F50\uFF0C\u4E0D\u7F16\u9020\u4E8B\u5B9E\u6216 API\u3002\n- \u6D89\u53CA\u4EE3\u7801\u65F6\u7ED9\u51FA\u6539\u52A8\u70B9\u3001\u8FB9\u754C\u6761\u4EF6\u548C\u9A8C\u8BC1\u65B9\u5F0F\u3002\n\u56DE\u590D\u65B9\u5F0F\uFF1A\u7ED3\u8BBA\u5148\u884C\uFF0C\u5173\u952E\u63A8\u65AD\u9644\u4F9D\u636E\uFF1B\u98CE\u9669\u4E0E\u4E0D\u786E\u5B9A\u9879\u5355\u72EC\u6807\u6CE8\u3002",
|
|
248
|
+
tools: [],
|
|
249
|
+
tags: ["openai", "gpt", "astra"]
|
|
250
|
+
});
|
|
251
|
+
var GPT_61_SOL_DEF = defineAgentSeed({
|
|
252
|
+
id: PUBLIC_GPT_61_SOL_AGENT_ID,
|
|
253
|
+
presetKey: "gpt-6-1-sol",
|
|
254
|
+
name: "GPT-6.1 Sol",
|
|
255
|
+
provider: "nolo",
|
|
256
|
+
model: "gpt-6.1-sol",
|
|
257
|
+
isPublic: true,
|
|
258
|
+
// 出自平台模型目录:gpt-6.1-sol 显式 hasVision: false(官方页无图像输入声明),
|
|
259
|
+
// 且未声明 supportsTool —— 不要在这里把它写成会看图/能动手的模型。
|
|
260
|
+
hasVision: false,
|
|
261
|
+
introduction: "GPT-6.1 Sol \u516C\u5F00\u52A9\u624B\uFF0C\u5F3A\u63A8\u7406\u5FEB\u6863\uFF0C\u9002\u5408\u590D\u6742\u5206\u6790\u3001\u4EE3\u7801\u4E0E\u957F\u6587\u6863\u4EFB\u52A1\u3002\u9700\u5F00\u901A 199 \u79EF\u5206\u6863\u4F4D\u6216\u8D26\u6237\u4FDD\u6301\u6709\u6548\u4F59\u989D\uFF08\u2265 19 \u79EF\u5206\uFF09\u3002",
|
|
262
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F GPT-6.1 Sol\u3002\u9002\u5408\u590D\u6742\u63A8\u7406\u3001\u4EE3\u7801\u5206\u6790\u548C\u957F\u6587\u6863\u5904\u7406\uFF1B\u4F7F\u7528\u524D\u8BF7\u786E\u4FDD\u8D26\u6237\u5F00\u901A\u9AD8\u9636\u6863\u4F4D\u6216\u6709\u5145\u8DB3\u53EF\u7528\u4F59\u989D\u3002",
|
|
263
|
+
prompt: "\u5148\u786E\u8BA4\u7528\u6237\u8981\u89E3\u51B3\u7684\u5177\u4F53\u95EE\u9898\u4E0E\u7EA6\u675F\uFF0C\u518D\u7ED9\u51FA\u53EF\u9760\u3001\u53EF\u6267\u884C\u7684\u7ED3\u679C\u3002\n\u6D89\u53CA\u4EE3\u7801\u65F6\u8BF4\u660E\u6539\u52A8\u70B9\u3001\u8FB9\u754C\u6761\u4EF6\u4E0E\u9A8C\u8BC1\u65B9\u5F0F\uFF1B\u6D89\u53CA\u957F\u6587\u6863\u65F6\u5148\u5B9A\u4F4D\u5173\u952E\u6BB5\u843D\u518D\u4E0B\u7ED3\u8BBA\u3002\n\u4E0D\u786E\u5B9A\u7684\u5185\u5BB9\u660E\u786E\u8BF4\u660E\uFF0C\u4E0D\u7F16\u9020\u3002",
|
|
264
|
+
tools: [],
|
|
265
|
+
tags: ["openai", "gpt", "sol"]
|
|
266
|
+
});
|
|
267
|
+
var KIMI_K3_DEF = defineAgentSeed({
|
|
268
|
+
id: PUBLIC_KIMI_K3_AGENT_ID,
|
|
269
|
+
presetKey: "kimi-k3",
|
|
270
|
+
name: "Kimi K3",
|
|
271
|
+
provider: "nolo",
|
|
272
|
+
model: "kimi-k3",
|
|
273
|
+
isPublic: true,
|
|
274
|
+
// 出自平台模型目录:kimi-k3 hasVision: true、supportsTool: true、1M 上下文。
|
|
275
|
+
hasVision: true,
|
|
276
|
+
introduction: "Kimi K3 \u516C\u5F00\u52A9\u624B\uFF0C\u8D85\u957F\u4E0A\u4E0B\u6587\u5F3A\u63A8\u7406\u6863\uFF0C\u9002\u5408\u6574\u4EFD\u6587\u6863/\u4EE3\u7801\u5E93\u5206\u6790\u3001\u591A\u6B65\u4EFB\u52A1\u548C\u56FE\u7247\u7406\u89E3\u3002\u9700\u5F00\u901A 199 \u79EF\u5206\u6863\u4F4D\u6216\u8D26\u6237\u4FDD\u6301\u6709\u6548\u4F59\u989D\uFF08\u2265 19 \u79EF\u5206\uFF09\u3002",
|
|
277
|
+
greeting: "\u4F60\u597D\uFF0C\u6211\u662F Kimi K3\u3002\u9002\u5408\u8D85\u957F\u6587\u6863\u3001\u4EE3\u7801\u5E93\u5206\u6790\u548C\u591A\u6B65\u63A8\u7406\uFF1B\u4F7F\u7528\u524D\u8BF7\u786E\u4FDD\u8D26\u6237\u5F00\u901A\u9AD8\u9636\u6863\u4F4D\u6216\u6709\u5145\u8DB3\u53EF\u7528\u4F59\u989D\u3002",
|
|
278
|
+
prompt: "\u5B9A\u4F4D\uFF1A\u8D85\u957F\u4E0A\u4E0B\u6587\u5F3A\u63A8\u7406\u6863\u3002\n\u5DE5\u4F5C\u65B9\u5F0F\uFF1A\u5148\u5728\u6D77\u91CF\u6750\u6599\u91CC\u5B9A\u4F4D\u4E0E\u95EE\u9898\u76F8\u5173\u7684\u90E8\u5206\uFF0C\u518D\u9010\u6B65\u6536\u7A84\u7ED3\u8BBA\uFF1B\u5F15\u7528\u6750\u6599\u65F6\u8BF4\u660E\u51FA\u81EA\u54EA\u4E00\u6BB5\uFF0C\u4E0D\u81C6\u6D4B\u672A\u8BFB\u5230\u7684\u5185\u5BB9\u3002\n\u6D89\u53CA\u4EE3\u7801\u65F6\u7ED9\u51FA\u6539\u52A8\u70B9\u4E0E\u9A8C\u8BC1\u65B9\u5F0F\u3002\n\u56DE\u590D\u65B9\u5F0F\uFF1A\u7ED3\u8BBA\u5148\u884C\uFF0C\u5FC5\u8981\u65F6\u5206\u5C42\u7ED9\u8981\u70B9\u3002",
|
|
279
|
+
tools: [],
|
|
280
|
+
tags: ["moonshot", "kimi", "long-context"]
|
|
281
|
+
});
|
|
233
282
|
var GROK_4_6_DEF = defineAgentSeed({
|
|
234
283
|
id: deterministicId("01GROK46PLAZ", "shared-space-xai-grok-4-6"),
|
|
235
284
|
presetKey: "grok-4.6",
|
|
@@ -411,6 +460,10 @@ var PUBLIC_AGENT_DEFS = [
|
|
|
411
460
|
CLAUDE_FABLE_5_1_DEF,
|
|
412
461
|
CLAUDE_OPUS_5_5_DEF,
|
|
413
462
|
CLAUDE_SONNET_5_5_DEF,
|
|
463
|
+
// 顾问档(求助模式升级目标,2026-10-20)
|
|
464
|
+
GPT_6_ASTRA_DEF,
|
|
465
|
+
GPT_61_SOL_DEF,
|
|
466
|
+
KIMI_K3_DEF,
|
|
414
467
|
GROK_4_6_DEF,
|
|
415
468
|
GEMINI_3_8_FLASH_DEF,
|
|
416
469
|
GEMINI_4_ARGON_DEF,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectCurrentServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-32ZKZET7.js";
|
|
4
4
|
import {
|
|
5
5
|
patch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZVQHBIWV.js";
|
|
7
7
|
import {
|
|
8
8
|
getIsDesktopApp
|
|
9
9
|
} from "./chunk-6Q7UTJKR.js";
|
|
10
10
|
import {
|
|
11
11
|
selectIdentityToken
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PXYBUFDB.js";
|
|
13
13
|
|
|
14
14
|
// packages/ai/agent/cliChatClient.ts
|
|
15
15
|
function getCliChatRequestConfig(thunkApi) {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-UAD2WT54.js";
|
|
8
8
|
import {
|
|
9
9
|
toTimestampMs
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZVQHBIWV.js";
|
|
11
11
|
import {
|
|
12
12
|
fetchFromServer,
|
|
13
13
|
getAllServers
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
selectIdentityToken,
|
|
17
17
|
selectIdentityUserId
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-PXYBUFDB.js";
|
|
19
19
|
import {
|
|
20
20
|
isTombstoneRecord
|
|
21
21
|
} from "./chunk-D2MDMY2M.js";
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buildResponseGuidelines
|
|
3
|
-
} from "./chunk-W4S6OTSC.js";
|
|
4
1
|
import {
|
|
5
2
|
getLocalProviderSecret
|
|
6
3
|
} from "./chunk-HS7MLR74.js";
|
|
7
4
|
import {
|
|
8
5
|
performServerProxyFetchWithRetry
|
|
9
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZGSW3HWM.js";
|
|
10
7
|
import {
|
|
11
8
|
shouldUseServerProxy
|
|
12
9
|
} from "./chunk-UKZX3NHN.js";
|
|
13
10
|
import {
|
|
14
11
|
fetchServerSyncedCredential
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ACTR4SH2.js";
|
|
16
13
|
import {
|
|
17
14
|
buildSkillGuidancePromptBlock
|
|
18
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DC3SZCRR.js";
|
|
19
16
|
import {
|
|
17
|
+
CREDENTIAL_HYGIENE_RULE,
|
|
20
18
|
DELETE_SAFETY_RED_LINE,
|
|
21
19
|
PARALLEL_DISPATCH_DEFAULT_RULE,
|
|
22
20
|
PLATFORM_RISK_CONTROL_RULE,
|
|
21
|
+
buildConsultationModeBlock,
|
|
23
22
|
buildIdentityBlock,
|
|
23
|
+
buildResponseGuidelines,
|
|
24
24
|
buildRuntimeGuidanceBlocks,
|
|
25
25
|
compileContextLayers,
|
|
26
26
|
detectDispatchIntentFromMessages,
|
|
27
27
|
resolveToolGuidedSections
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-3WIXU4XO.js";
|
|
29
29
|
import {
|
|
30
30
|
convertMessagesToResponsesInput,
|
|
31
31
|
getUsageRequestOptions,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
resolveReasoningReplayOptions,
|
|
35
35
|
shouldStripReasoningContentForOutbound,
|
|
36
36
|
stablePromptCacheKey
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-6TF64IF2.js";
|
|
38
38
|
import {
|
|
39
39
|
createFileCredentialBroker
|
|
40
40
|
} from "./chunk-UHTDNB5Y.js";
|
|
@@ -45,21 +45,21 @@ import {
|
|
|
45
45
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
46
46
|
isAntigravityCloudCodeBaseUrl,
|
|
47
47
|
isAntigravityOAuthAgent
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-JGRPBIZZ.js";
|
|
49
49
|
import {
|
|
50
50
|
buildProviderAuthHeaders
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-SUKSWFLP.js";
|
|
52
52
|
import {
|
|
53
53
|
isOpenAiResponsesModel,
|
|
54
54
|
resolvePlatformChatCompletionsEndpoint,
|
|
55
55
|
resolvePlatformResponsesEndpoint
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-I2RMFLLH.js";
|
|
57
57
|
import {
|
|
58
58
|
clampReasoningEffort,
|
|
59
59
|
findModelConfig,
|
|
60
60
|
getModelConfig,
|
|
61
61
|
isModelSupportReasoningEffort
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-TRW43TSC.js";
|
|
63
63
|
import {
|
|
64
64
|
isRecord
|
|
65
65
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
isFireworksKimiModel,
|
|
84
84
|
isPlatformMimoProviderModel,
|
|
85
85
|
resolveFireworksKimiModel
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-CGFNDIKK.js";
|
|
87
87
|
import {
|
|
88
88
|
asTrimmedLowercaseString
|
|
89
89
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -215,16 +215,6 @@ function resolveAgentCallPlan(agentConfig, _env) {
|
|
|
215
215
|
vendor: provider || "anthropic"
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
-
if (oauthApiKeyRef === "workbuddy" || oauthApiKeyRef === "workbuddy-ai") {
|
|
219
|
-
return {
|
|
220
|
-
authMethod: { kind: "oauth", ref: oauthApiKeyRef },
|
|
221
|
-
transport: "server-proxy",
|
|
222
|
-
upstreamWire: "chat.completions",
|
|
223
|
-
endpoint: oauthApiKeyRef === "workbuddy" ? "https://copilot.tencent.com/v2/chat/completions" : "https://www.workbuddy.ai/v2/chat/completions",
|
|
224
|
-
requiredHeaders: [],
|
|
225
|
-
vendor: oauthApiKeyRef
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
218
|
if (oauthApiKeyRef === "xai") {
|
|
229
219
|
return {
|
|
230
220
|
authMethod: { kind: "oauth", ref: "xai" },
|
|
@@ -454,6 +444,13 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
|
|
|
454
444
|
cacheScope: "static",
|
|
455
445
|
content: DELETE_SAFETY_RED_LINE
|
|
456
446
|
},
|
|
447
|
+
// 凭据纪律:与红线同为无条件系统层块,四条装配线同源。
|
|
448
|
+
{
|
|
449
|
+
id: "credential-hygiene",
|
|
450
|
+
owner: "platform",
|
|
451
|
+
cacheScope: "static",
|
|
452
|
+
content: CREDENTIAL_HYGIENE_RULE
|
|
453
|
+
},
|
|
457
454
|
// 并行是默认:系统层固定块,紧随红线(同为无条件前缀,不随工具/轮次变化)。
|
|
458
455
|
{
|
|
459
456
|
id: "parallel-dispatch-default",
|
|
@@ -468,6 +465,7 @@ ${wrapHistoricalSummaryWithReplayGuard(contexts.dialogSummary)}` : "";
|
|
|
468
465
|
cacheScope: "static",
|
|
469
466
|
content: PLATFORM_RISK_CONTROL_RULE
|
|
470
467
|
},
|
|
468
|
+
{ id: "consultation-mode", owner: "platform", cacheScope: "static", content: buildConsultationModeBlock() },
|
|
471
469
|
{ id: "identity", owner: "platform", cacheScope: "session", content: identitySection },
|
|
472
470
|
{ id: "user-response-language", owner: "platform", cacheScope: "session", content: buildUserResponseLanguageContext({ language: safeLanguage }) },
|
|
473
471
|
{ id: "startup-protocol", owner: "platform", cacheScope: "static", content: startupProtocol },
|
|
@@ -18,13 +18,13 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
isSubscriptionEndpoint,
|
|
20
20
|
isSubscriptionOAuthCredential
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HB4XPBC7.js";
|
|
22
22
|
import {
|
|
23
23
|
isAntigravityOAuthAgent
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JGRPBIZZ.js";
|
|
25
25
|
import {
|
|
26
26
|
getModelAbility
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-FYYSDHVQ.js";
|
|
28
28
|
|
|
29
29
|
// packages/ai/agent/agentBilling.ts
|
|
30
30
|
function resolveBillingSource(candidate) {
|