nolo-cli 0.227.0-alpha.1 → 0.228.0-alpha.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/{_executeModel-JKQGZ3HU.js → _executeModel-WZKT6XEU.js} +76 -77
- package/{action-CK64LS6S.js → action-GDZDXPMB.js} +9 -9
- package/{addContentAction-CARFID6E.js → addContentAction-7RO4AMRI.js} +14 -14
- package/{addDialogAgentAction-APLZLFW5.js → addDialogAgentAction-EVYBGTXB.js} +16 -16
- package/{agentDeleteCommand-NVR2V2HH.js → agentDeleteCommand-PZWRHNXY.js} +113 -114
- package/{agentEmailCommands-UCVOWD3S.js → agentEmailCommands-QTKMEICX.js} +116 -117
- package/{agentFavoriteCommands-4PDOP3GW.js → agentFavoriteCommands-7LOP3HUD.js} +6 -6
- package/{agentGrantCommands-FLCEXLUH.js → agentGrantCommands-L6O2HVJI.js} +7 -7
- package/{agentListCommands-C65UESYM.js → agentListCommands-GUGMORTK.js} +72 -71
- package/{agentMachineCommands-V3DGEJU4.js → agentMachineCommands-7QGICJLM.js} +57 -56
- package/{agentProviderCommands-7QBFRFRK.js → agentProviderCommands-STI3DQ6A.js} +7 -7
- package/{agentPullCommand-E6JBGBVG.js → agentPullCommand-KHV4EELF.js} +6 -6
- package/{agentRecordCommands-6RCJS2EY.js → agentRecordCommands-SLLADS5C.js} +104 -105
- package/{agentRunCommand-P3GRKXKS.js → agentRunCommand-OFQLOF5Y.js} +110 -111
- package/{agentRunControl-SNZZ5XP4.js → agentRunControl-MBG4U6SL.js} +23 -17
- package/{agentRuntimeLocal-GOX2DIY7.js → agentRuntimeLocal-TU4LA353.js} +44 -44
- package/{agentSlice-N7H2FRJA.js → agentSlice-L4SBGWTB.js} +17 -17
- package/{appDeleteCommands-LZDN26FU.js → appDeleteCommands-JWP3XPUA.js} +52 -51
- package/{appDeployCommands-6IO6TTZH.js → appDeployCommands-6E4TQCWI.js} +52 -51
- package/{appDeployStatusCommands-FG3LX24J.js → appDeployStatusCommands-ALU4SADG.js} +52 -51
- package/{appGetCommands-NAKVDVD4.js → appGetCommands-JEY4L6L4.js} +52 -51
- package/{appListCommands-KL56RN73.js → appListCommands-PCAVHU7M.js} +52 -51
- package/{authCommand-AUN5MXV2.js → authCommand-CGRIIOOV.js} +30 -31
- package/{authCommands-D2IPS6ES.js → authCommands-55OGQGCR.js} +12 -13
- package/{builtinSkillRegistry-UQGLKRYP.js → builtinSkillRegistry-BAE2LDXF.js} +4 -4
- package/{chromeOpsCommands-UJWN5HWH.js → chromeOpsCommands-WAA45NCS.js} +8 -8
- package/{chunk-OB6DVWPF.js → chunk-262R3XNN.js} +16 -2
- package/{chunk-KMRKZNGT.js → chunk-2MCB7CD7.js} +13 -12
- package/{chunk-YPPKC6FL.js → chunk-2NPD3FTX.js} +3 -3
- package/{chunk-UN7HIYMH.js → chunk-2X7WFDT6.js} +1 -1
- package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
- package/{chunk-JWXITTQB.js → chunk-3P54D2E4.js} +1 -1
- package/{chunk-RU6DULV4.js → chunk-3U44JB3O.js} +1 -1
- package/{chunk-EUCFKKDM.js → chunk-4I2MXV5Q.js} +38 -10
- package/{chunk-PLPLH2XZ.js → chunk-4ZGPHFLE.js} +2 -2
- package/{chunk-NO3VBWTL.js → chunk-547ENH5T.js} +1 -1
- package/chunk-5ZUOVCKT.js +32 -0
- package/{chunk-XZODOEKU.js → chunk-6QHKRARD.js} +2 -2
- package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
- package/{chunk-VPAZ6BEN.js → chunk-7JGMNKKG.js} +18 -14
- package/{chunk-3VFYQH3I.js → chunk-AGYPUBFW.js} +14 -39
- package/{chunk-5HL4KC4A.js → chunk-ALAES342.js} +57 -86
- package/{chunk-VREDDN25.js → chunk-ATEKLSLR.js} +1 -1
- package/{chunk-CQVGR3MX.js → chunk-AUAJTAFM.js} +8 -8
- package/chunk-BIDSIRTS.js +307 -0
- package/chunk-BIWI5M4E.js +62 -0
- package/{chunk-L5I543VB.js → chunk-BNMPUQW6.js} +1 -1
- package/{chunk-UCFPVYP7.js → chunk-BP5ZJ6B4.js} +1 -1
- package/{chunk-2G3YSVO6.js → chunk-CBUZ6DKA.js} +3 -3
- package/{chunk-KYH7XW3K.js → chunk-CD3RU7XL.js} +16 -1
- package/{chunk-SFTTXGPM.js → chunk-CMMI3DAT.js} +16 -16
- package/{chunk-VZW34YUL.js → chunk-CYWNWA77.js} +5 -5
- package/{chunk-5LQDHFBN.js → chunk-D6YNCNM6.js} +14 -11
- package/{chunk-UVUVQVZ6.js → chunk-DBUR22G5.js} +2 -2
- package/{chunk-7Z3WUZ4Q.js → chunk-DDC6P6EH.js} +24 -24
- package/{chunk-G6HJUMST.js → chunk-DEA37IUY.js} +2 -2
- package/{chunk-5RKRXQ2H.js → chunk-DGYCDA6W.js} +2 -2
- package/{chunk-3HTP4WZQ.js → chunk-DUUDXSLX.js} +21 -7
- package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
- package/{chunk-TOKPHZ55.js → chunk-EEOOBRA7.js} +5 -5
- package/{chunk-UAPNPNSG.js → chunk-EXJK7TQO.js} +1040 -582
- package/{chunk-OXA5GWHU.js → chunk-F6Z6ZCUV.js} +2 -2
- package/{chunk-X2KRQP7V.js → chunk-FJSNBZXR.js} +1 -1
- package/{chunk-KRRE4A7D.js → chunk-G7IUT2V3.js} +3 -2
- package/{chunk-VIHDJ3FK.js → chunk-GACR7H6T.js} +14 -14
- package/{chunk-GOLPOTG5.js → chunk-GOCSSER3.js} +3 -3
- package/{chunk-NAOO4PVX.js → chunk-GPOV42YM.js} +16 -16
- package/{chunk-C2B7M567.js → chunk-GUXZK7SE.js} +5 -5
- package/{chunk-TINJKQSO.js → chunk-GYS5FUYR.js} +20 -20
- package/{chunk-IAJJYHIB.js → chunk-H6L2NFHY.js} +7 -7
- package/{chunk-45LZIYXB.js → chunk-HBRDSQ3M.js} +1 -1
- package/{chunk-T5N6NHAT.js → chunk-HHFGE2WF.js} +3 -3
- package/{chunk-IX2BXN2K.js → chunk-HSSBDZLD.js} +3 -3
- package/{chunk-MWHOH4RJ.js → chunk-HYLRQDEE.js} +4 -4
- package/{chunk-ZYA2YDB6.js → chunk-IAAIUH64.js} +16 -16
- package/{chunk-LXTC53TN.js → chunk-IXG6YXQM.js} +143 -123
- package/{chunk-CVERLOJM.js → chunk-JUSHVFNF.js} +236 -182
- package/{chunk-ABGULE7H.js → chunk-K67C2JUC.js} +12 -12
- package/{chunk-T2BEPTAG.js → chunk-L32W3PRP.js} +47 -17
- package/{chunk-M3Y4IBIR.js → chunk-M4SFKP5L.js} +4 -4
- package/{chunk-ZI5SZ3MV.js → chunk-MDZWUD3R.js} +20 -20
- package/{chunk-F5AY2UZL.js → chunk-NHY322ZU.js} +8 -8
- package/{chunk-KJAAPGBE.js → chunk-OBIC6EG7.js} +6 -6
- package/{chunk-4OKTPFNX.js → chunk-OG6MQOQG.js} +105 -37
- package/{chunk-AXYH4734.js → chunk-OOJNQK6V.js} +13 -13
- package/{chunk-XIEYGCN6.js → chunk-OWKNSIXL.js} +149 -48
- package/{chunk-JHF6VLVL.js → chunk-OYU2MA5S.js} +29 -29
- package/{chunk-6XIE5ZGI.js → chunk-PDCV7P5W.js} +1 -1
- package/{chunk-CKT6QUE2.js → chunk-Q3IVPFVO.js} +1 -1
- package/{chunk-PHOSZT3E.js → chunk-QBZCGP34.js} +1 -1
- package/{chunk-CLCXHIBS.js → chunk-QCB42576.js} +1 -1
- package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
- package/{chunk-YQETUZ5V.js → chunk-QRGDJA4B.js} +11 -11
- package/{chunk-ULAQPRHX.js → chunk-QYB23WUH.js} +1 -1
- package/{chunk-PVAWNHP5.js → chunk-R3NEQZ53.js} +295 -102
- package/{chunk-CSW7IPVD.js → chunk-R6Z5S5GA.js} +11 -11
- package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
- package/{chunk-GUVXQSFZ.js → chunk-RBPUNSG5.js} +1 -1
- package/{chunk-GOQ6ZVTN.js → chunk-RG2DGNL6.js} +3 -3
- package/{chunk-6EDAMVG6.js → chunk-RTHFJZ6M.js} +10 -10
- package/{chunk-YOT437BH.js → chunk-RYOLWYBK.js} +122 -118
- package/{chunk-WJP4TH6U.js → chunk-S6FDXXZV.js} +1 -1
- package/{chunk-SW6OD4KE.js → chunk-SMJEXX2S.js} +123 -12
- package/{chunk-LJSNEV7M.js → chunk-SRCCSTIM.js} +7 -7
- package/{chunk-FKEZOMIF.js → chunk-STJ6LSQE.js} +453 -193
- package/{chunk-L42CBKBZ.js → chunk-TGNIKIHR.js} +3 -3
- package/{chunk-AK5O76CC.js → chunk-TI2EPRHE.js} +2 -2
- package/{chunk-SRG5CNLC.js → chunk-TSPMLCWI.js} +6 -6
- package/{chunk-YGILMZ7N.js → chunk-TUSTONB3.js} +1 -1
- package/{chunk-2SKTCNWO.js → chunk-UE2EVEYS.js} +2 -2
- package/{chunk-ZADGPNTV.js → chunk-UWAIJOF2.js} +29 -29
- package/{chunk-HVUDBOQG.js → chunk-VMJVAJ6W.js} +9 -6
- package/{chunk-LA7JYAKF.js → chunk-VSYTM22R.js} +3 -3
- package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
- package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
- package/{chunk-GRXSJR2Z.js → chunk-XJPLSAPJ.js} +21 -21
- package/{chunk-HYKGIXNO.js → chunk-XSW4EXQV.js} +85 -21
- package/{chunk-T43K75CK.js → chunk-YKY4OVOX.js} +15 -15
- package/{chunk-5RKUPJYL.js → chunk-ZH3KXFHS.js} +11 -3
- package/chunk-ZOHO6MOF.js +376 -0
- package/{chunk-PXKF5CV4.js → chunk-ZXF6D3I6.js} +10 -8
- package/{cliAgentConfigHelpers-QVSQYTKC.js → cliAgentConfigHelpers-BTRHMPW2.js} +14 -14
- package/{cliEnvHelpers-D6HMC46Z.js → cliEnvHelpers-CNMP3RDX.js} +2 -2
- package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
- package/{cliLocalAgentRecordReader-SPKAJYME.js → cliLocalAgentRecordReader-M3F76NIP.js} +46 -46
- package/{commandRegistry-TKR6OWXP.js → commandRegistry-ZLWHQVAI.js} +93 -93
- package/{contentThunks-BQWRPCTM.js → contentThunks-4ZX2TO7C.js} +36 -35
- package/{cooldownCommands-FZYQOWI5.js → cooldownCommands-YB5H5BBK.js} +3 -3
- package/{createAgentAutomationAction-GFI6SJZV.js → createAgentAutomationAction-L4CYUZJG.js} +36 -35
- package/{createDialogAction-MMBIHFFU.js → createDialogAction-QTU2R2Q3.js} +37 -37
- package/{createPageAction-EEYUE5FB.js → createPageAction-F3GJTHW2.js} +39 -38
- package/{db-CS4ZJQKV.js → db-M7FU2GNK.js} +9 -6
- package/{dbSlice-X4Z4E4QU.js → dbSlice-XRUZOGSU.js} +13 -13
- package/{deleteFile-QOOP2UK7.js → deleteFile-6URDHYRB.js} +9 -9
- package/{dialogCommands-OXBQ73DD.js → dialogCommands-NRLCOPJR.js} +56 -56
- package/{dialogNotifyCommand-VWS5G4OO.js → dialogNotifyCommand-SHGPCU22.js} +17 -17
- package/{dialogSlice-KGYIABDY.js → dialogSlice-P2S4LXQD.js} +34 -33
- package/{dialogUsageCommand-FEWCN7IA.js → dialogUsageCommand-W2WCSGKF.js} +6 -6
- package/{docCreateCommands-LS32VKY3.js → docCreateCommands-YJRDA3RX.js} +51 -50
- package/{docDeleteCommands-JTYR5RPH.js → docDeleteCommands-A5QIHZNF.js} +53 -52
- package/{docReadCommands-E5LTVKWN.js → docReadCommands-CF2LTMYH.js} +51 -50
- package/{docStore-TVS2FNER.js → docStore-6O7NYL6A.js} +15 -15
- package/{docUpdateCommands-I3J3JDZ2.js → docUpdateCommands-QRKV4ZXE.js} +51 -50
- package/{fetchMessages-Q3INLN5F.js → fetchMessages-TQEUZD7H.js} +3 -3
- package/{getPricing-VNGFM4PN.js → getPricing-LF5C4XSI.js} +6 -6
- package/{handleSendMessageAction-SSON36TJ.js → handleSendMessageAction-7IHLR37A.js} +66 -66
- package/{hostCredentialCreate-WTW4THJF.js → hostCredentialCreate-VNCQUAFT.js} +104 -105
- package/index.js +54 -16
- package/keys-RWF7UCB4.js +1 -1
- package/{localDialogRead-V36DX2Q2.js → localDialogRead-CCOCVGAP.js} +2 -2
- package/{localRuntimeAdapter-MI2JGXSF.js → localRuntimeAdapter-FOWVNMIK.js} +111 -112
- package/{machineCommands-3LROJZDK.js → machineCommands-ZGC3J4JB.js} +115 -116
- package/{machineWsRunDispatch-BUUJRUUB.js → machineWsRunDispatch-KK5U4M3G.js} +102 -103
- package/{memberThunks-CFEPHAND.js → memberThunks-7Y3OYSJQ.js} +17 -17
- package/{memoryCommands-JQMEJO7J.js → memoryCommands-BC6REPQB.js} +6 -6
- package/{overlay-THLKYIWY.js → overlay-BBQZXGYI.js} +5 -3
- package/package.json +1 -1
- package/{projectArchive-3X54XFVN.js → projectArchive-7ZDYBXAX.js} +44 -43
- package/{providerPresetApply-FO36N5TX.js → providerPresetApply-WHAMP2D5.js} +9 -9
- package/{providerRegistry-U2BSFE6K.js → providerRegistry-ZI2KORJ7.js} +9 -9
- package/{read-KA3L2V7O.js → read-TYMBGEXO.js} +9 -9
- package/{readDocTool-AMAZAPAW.js → readDocTool-SKQVHBLO.js} +1 -1
- package/{readlineWorkspace-Z3YUH4SX.js → readlineWorkspace-YHT4SX2C.js} +4391 -4161
- package/{removeDialogAgentAction-JQOJSUM7.js → removeDialogAgentAction-F5QE2O2B.js} +19 -19
- package/{runAgentClientLoop-4FCFLMDJ.js → runAgentClientLoop-H4ED5V3K.js} +70 -71
- package/{runtimeDoctorCommands-CXOCVDPU.js → runtimeDoctorCommands-RRKPBGVO.js} +16 -16
- package/{secretCommands-GGUAWAE7.js → secretCommands-KZWBZIYS.js} +2 -2
- package/{setDialogExtraReferencesAction-YXQTGXIN.js → setDialogExtraReferencesAction-72L27ERM.js} +15 -15
- package/{setPrimaryDialogAgentAction-YNLB66WE.js → setPrimaryDialogAgentAction-GJJDUSGJ.js} +19 -19
- package/{settingThunks-E6N7RSSS.js → settingThunks-ZRGWVGZD.js} +18 -18
- package/{skillDiscovery-B5V23AXP.js → skillDiscovery-I37M5KJC.js} +3 -3
- package/{spaceCommands-DB5DKC2J.js → spaceCommands-MEH3HJBC.js} +53 -52
- package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
- package/{streamAgentChatTurn-FCBGMD4D.js → streamAgentChatTurn-ZXPOXU33.js} +91 -92
- package/{switchDialogAgentAction-LAHLUECU.js → switchDialogAgentAction-IIJBPND3.js} +16 -16
- package/{tableCommands-VNSXHAMG.js → tableCommands-FTAOCBTX.js} +12 -12
- package/{tools-6JD36D6K.js → tools-2MRWA2PP.js} +59 -60
- package/tuiRestart-2IL37YIB.js +41 -0
- package/{tuiSummaryLlmCaller-UHZIPGAX.js → tuiSummaryLlmCaller-W2QN4VAC.js} +21 -21
- package/{updateCommands-KZ54HCU5.js → updateCommands-CPATDG6J.js} +8 -6
- package/{updateDialogTitleAction-RV3EUEN3.js → updateDialogTitleAction-RZ3KZSGQ.js} +36 -35
- package/{usageCommand-KFVV6UL3.js → usageCommand-2BF74MKF.js} +2 -2
- package/{usageRebuildCommand-HHFSNK46.js → usageRebuildCommand-UHB55BQM.js} +3 -3
- package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-ZFD6J5HF.js} +2 -2
- package/chunk-BJF2MHJ3.js +0 -118
- package/chunk-KEPOVMF4.js +0 -91
- package/chunk-PMDVQBGA.js +0 -100
- package/chunk-WACI5I6V.js +0 -147
- package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +4 -4
- package/{chunk-AGP3YSEC.js → chunk-4N6G2CKP.js} +3 -3
- package/{chunk-VXL2FZTP.js → chunk-HXER7YJF.js} +3 -3
- package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
- package/{chunk-SSGTV4FC.js → chunk-USGHJSGO.js} +5 -5
- package/{chunk-IC2I373Q.js → chunk-VS276URX.js} +3 -3
- package/{chunk-AETZ7AD6.js → chunk-W6RFEDN4.js} +3 -3
- package/{offlineMarxistsAgentCommand-AGA2X5E4.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +5 -5
- package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-HFJIN5IZ.js} +8 -8
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
upsertSSREntity,
|
|
3
3
|
write
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CMMI3DAT.js";
|
|
5
5
|
import {
|
|
6
6
|
getRuntimeServerContext,
|
|
7
7
|
resolveRecordAuthority
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-R6Z5S5GA.js";
|
|
9
9
|
import {
|
|
10
10
|
TIMEOUT,
|
|
11
11
|
asyncThunkCreator,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
applyAgentSecretMigrationUpdates,
|
|
17
17
|
migrateAgentSecrets,
|
|
18
18
|
normalizeAgentRuntimeToolPolicy
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-USGHJSGO.js";
|
|
20
20
|
import {
|
|
21
21
|
asRecordOrEmpty
|
|
22
22
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -26,20 +26,20 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
isLevelNotFoundError
|
|
28
28
|
} from "./chunk-OW765XBU.js";
|
|
29
|
-
import {
|
|
30
|
-
isRecord
|
|
31
|
-
} from "./chunk-KUG52IAP.js";
|
|
32
|
-
import {
|
|
33
|
-
API_ENDPOINTS
|
|
34
|
-
} from "./chunk-LCBAMY2M.js";
|
|
35
29
|
import {
|
|
36
30
|
createAgentKey,
|
|
37
31
|
createUserKey,
|
|
38
32
|
toTrimmedString
|
|
39
33
|
} from "./chunk-SYTHYBMI.js";
|
|
34
|
+
import {
|
|
35
|
+
API_ENDPOINTS
|
|
36
|
+
} from "./chunk-LCBAMY2M.js";
|
|
40
37
|
import {
|
|
41
38
|
asTrimmedString
|
|
42
39
|
} from "./chunk-3EUW3WEO.js";
|
|
40
|
+
import {
|
|
41
|
+
isRecord
|
|
42
|
+
} from "./chunk-KUG52IAP.js";
|
|
43
43
|
import {
|
|
44
44
|
asOptionalTrimmedString
|
|
45
45
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -458,7 +458,7 @@ var slice = createSliceWithThunks({
|
|
|
458
458
|
const overrides = {};
|
|
459
459
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
460
460
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
461
|
-
const { _executeModel } = await import("./_executeModel-
|
|
461
|
+
const { _executeModel } = await import("./_executeModel-WZKT6XEU.js");
|
|
462
462
|
return _executeModel(
|
|
463
463
|
{
|
|
464
464
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -479,7 +479,7 @@ var slice = createSliceWithThunks({
|
|
|
479
479
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
480
480
|
*/
|
|
481
481
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
482
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
482
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-H4ED5V3K.js");
|
|
483
483
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
484
484
|
{
|
|
485
485
|
agentKey: args.agentKey,
|
|
@@ -495,7 +495,7 @@ var slice = createSliceWithThunks({
|
|
|
495
495
|
* 聊天轮次流式 Agent 调用
|
|
496
496
|
*/
|
|
497
497
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
498
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
498
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-ZXPOXU33.js");
|
|
499
499
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
500
500
|
}),
|
|
501
501
|
/**
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTimingMs
|
|
3
3
|
} from "./chunk-H57T64RA.js";
|
|
4
|
+
import {
|
|
5
|
+
isAbortError
|
|
6
|
+
} from "./chunk-7DPNBQSV.js";
|
|
4
7
|
import {
|
|
5
8
|
estimateTokenCount
|
|
6
9
|
} from "./chunk-PSCNXBYA.js";
|
|
7
10
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./chunk-
|
|
11
|
+
asTrimmedNonEmptyStringArray
|
|
12
|
+
} from "./chunk-I42VC5KR.js";
|
|
10
13
|
import {
|
|
11
14
|
ALL_MODELS
|
|
12
15
|
} from "./chunk-62HXNQVV.js";
|
|
13
16
|
import {
|
|
14
17
|
MODEL_LOOKUP_MAP
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
|
|
18
|
-
isPlatformManagedProvider,
|
|
19
|
-
resolvePlatformEffectiveModel
|
|
20
|
-
} from "./chunk-OBSEKCVK.js";
|
|
21
|
-
import {
|
|
22
|
-
asTrimmedNonEmptyStringArray
|
|
23
|
-
} from "./chunk-I42VC5KR.js";
|
|
18
|
+
} from "./chunk-CD3RU7XL.js";
|
|
24
19
|
import {
|
|
25
20
|
asOptionalFiniteNumber
|
|
26
21
|
} from "./chunk-WWC7I6TA.js";
|
|
27
22
|
import {
|
|
28
23
|
asOptionalTrimmedString
|
|
29
24
|
} from "./chunk-G3SUCT4W.js";
|
|
25
|
+
import {
|
|
26
|
+
PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
|
|
27
|
+
isPlatformManagedProvider,
|
|
28
|
+
resolvePlatformEffectiveModel
|
|
29
|
+
} from "./chunk-OBSEKCVK.js";
|
|
30
30
|
|
|
31
31
|
// packages/core/chat/messageContentSerialize.ts
|
|
32
32
|
var serializeMessageContent = (content, imagePlaceholder = "[\u56FE\u7247]") => {
|
|
@@ -1145,6 +1145,35 @@ function computeSummarySourceMetadata(messagesWithIds, summarizedBeforeId) {
|
|
|
1145
1145
|
schemaVersion: COMPACTION_SUMMARY_SCHEMA_VERSION
|
|
1146
1146
|
};
|
|
1147
1147
|
}
|
|
1148
|
+
function buildSummarySourceDiagnostics(messages, anchor) {
|
|
1149
|
+
const end = anchor ? messages.findIndex((message) => message.id === anchor) : -1;
|
|
1150
|
+
if (end < 0) return [];
|
|
1151
|
+
const width = Math.max(1, Math.ceil((end + 1) / 64));
|
|
1152
|
+
const sorted = (value) => {
|
|
1153
|
+
if (Array.isArray(value)) return value.map(sorted);
|
|
1154
|
+
if (value && typeof value === "object") return Object.fromEntries(
|
|
1155
|
+
Object.entries(value).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, child]) => [key, sorted(child)])
|
|
1156
|
+
);
|
|
1157
|
+
return value;
|
|
1158
|
+
};
|
|
1159
|
+
const rows = [];
|
|
1160
|
+
for (let start = 0; start <= end; start += width) {
|
|
1161
|
+
const group = messages.slice(start, Math.min(end + 1, start + width));
|
|
1162
|
+
const content = group.map((message) => ({
|
|
1163
|
+
role: message.role,
|
|
1164
|
+
content: message.content ?? "",
|
|
1165
|
+
...Array.isArray(message.tool_calls) ? { tool_calls: message.tool_calls } : {}
|
|
1166
|
+
}));
|
|
1167
|
+
rows.push({
|
|
1168
|
+
start,
|
|
1169
|
+
count: group.length,
|
|
1170
|
+
idHash: sha256Hex(JSON.stringify(group.map((message) => message.id ?? null))).slice(0, 16),
|
|
1171
|
+
messageHash: sha256Hex(JSON.stringify(content)).slice(0, 16),
|
|
1172
|
+
canonicalHash: sha256Hex(JSON.stringify(sorted(content))).slice(0, 16)
|
|
1173
|
+
});
|
|
1174
|
+
}
|
|
1175
|
+
return rows;
|
|
1176
|
+
}
|
|
1148
1177
|
|
|
1149
1178
|
// packages/ai/llm/getModelContextWindow.ts
|
|
1150
1179
|
var DEFAULT_CONTEXT_WINDOW = 256e3;
|
|
@@ -1351,6 +1380,11 @@ var getModelInfo = (modelName) => {
|
|
|
1351
1380
|
};
|
|
1352
1381
|
|
|
1353
1382
|
export {
|
|
1383
|
+
DEFAULT_CONTEXT_WINDOW,
|
|
1384
|
+
findCodexOAuthPinnedContextWindow,
|
|
1385
|
+
findModelContextWindow,
|
|
1386
|
+
getModelContextWindow,
|
|
1387
|
+
getModelInfo,
|
|
1354
1388
|
readCacheReadInputTokens,
|
|
1355
1389
|
readCacheReadInputTokensOrNull,
|
|
1356
1390
|
readCacheCreationInputTokens,
|
|
@@ -1361,11 +1395,6 @@ export {
|
|
|
1361
1395
|
getMessageTokenCount,
|
|
1362
1396
|
resolveEffectiveCompactionBudgets,
|
|
1363
1397
|
planCompression,
|
|
1364
|
-
DEFAULT_CONTEXT_WINDOW,
|
|
1365
|
-
findCodexOAuthPinnedContextWindow,
|
|
1366
|
-
findModelContextWindow,
|
|
1367
|
-
getModelContextWindow,
|
|
1368
|
-
getModelInfo,
|
|
1369
1398
|
createSummaryBudget,
|
|
1370
1399
|
classifySummaryError,
|
|
1371
1400
|
isTruncatedCompletion,
|
|
@@ -1378,5 +1407,6 @@ export {
|
|
|
1378
1407
|
buildBoundedCompactionRequest,
|
|
1379
1408
|
buildCompactionMetricsFromPlan,
|
|
1380
1409
|
formatCompactionMetricsLog,
|
|
1381
|
-
computeSummarySourceMetadata
|
|
1410
|
+
computeSummarySourceMetadata,
|
|
1411
|
+
buildSummarySourceDiagnostics
|
|
1382
1412
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveLocalUserId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HHFGE2WF.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveNoloHome
|
|
6
6
|
} from "./chunk-GLKOYSRU.js";
|
|
7
|
-
import {
|
|
8
|
-
toErrorMessage
|
|
9
|
-
} from "./chunk-HNMXYYJR.js";
|
|
10
7
|
import {
|
|
11
8
|
isSupportedDialogId,
|
|
12
9
|
splitDialogKeyIdentity
|
|
13
10
|
} from "./chunk-YZMNK53S.js";
|
|
11
|
+
import {
|
|
12
|
+
toErrorMessage
|
|
13
|
+
} from "./chunk-HNMXYYJR.js";
|
|
14
14
|
|
|
15
15
|
// packages/cli/dialogNotifyCommand.ts
|
|
16
16
|
import { lstatSync as lstatSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
@@ -2,58 +2,58 @@ import {
|
|
|
2
2
|
clipMultilineText,
|
|
3
3
|
fetchAndSerializeTable,
|
|
4
4
|
waitForAbortableDelay
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XJPLSAPJ.js";
|
|
6
6
|
import {
|
|
7
7
|
isGatewayHttpStatus
|
|
8
8
|
} from "./chunk-NF64D32W.js";
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
parseRetryAfterHeaderMs
|
|
14
|
-
} from "./chunk-3L2WKC3W.js";
|
|
10
|
+
resolvePageReadMarkdown,
|
|
11
|
+
slateToSimplifiedMarkdown
|
|
12
|
+
} from "./chunk-BP5ZJ6B4.js";
|
|
15
13
|
import {
|
|
16
14
|
extractCategorizedMentions
|
|
17
15
|
} from "./chunk-AGIM7IMJ.js";
|
|
18
|
-
import {
|
|
19
|
-
resolvePageReadMarkdown,
|
|
20
|
-
slateToSimplifiedMarkdown
|
|
21
|
-
} from "./chunk-UCFPVYP7.js";
|
|
22
16
|
import {
|
|
23
17
|
fetchAndCacheMessages
|
|
24
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-R3NEQZ53.js";
|
|
19
|
+
import {
|
|
20
|
+
createDrainExhaustedResponse,
|
|
21
|
+
isCoreDrainingBody,
|
|
22
|
+
normalizeNonNegativeMs,
|
|
23
|
+
parseRetryAfterHeaderMs
|
|
24
|
+
} from "./chunk-3L2WKC3W.js";
|
|
25
25
|
import {
|
|
26
26
|
createSpaceKey
|
|
27
27
|
} from "./chunk-UAD2WT54.js";
|
|
28
28
|
import {
|
|
29
29
|
read
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CMMI3DAT.js";
|
|
31
31
|
import {
|
|
32
32
|
getRuntimeServerContext
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-R6Z5S5GA.js";
|
|
34
34
|
import {
|
|
35
35
|
classifyGenerationError
|
|
36
36
|
} from "./chunk-TLE77UJ5.js";
|
|
37
|
-
import {
|
|
38
|
-
estimateTokenCount
|
|
39
|
-
} from "./chunk-PSCNXBYA.js";
|
|
40
37
|
import {
|
|
41
38
|
isAbortError
|
|
42
39
|
} from "./chunk-7DPNBQSV.js";
|
|
40
|
+
import {
|
|
41
|
+
estimateTokenCount
|
|
42
|
+
} from "./chunk-PSCNXBYA.js";
|
|
43
43
|
import {
|
|
44
44
|
extractRuntimePageCapabilities,
|
|
45
45
|
resolveBuiltinSkillPage,
|
|
46
46
|
resolveSkillGraphFromRoots
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-G7IUT2V3.js";
|
|
48
48
|
import {
|
|
49
49
|
extractCustomId
|
|
50
50
|
} from "./chunk-M2EJHDJP.js";
|
|
51
|
-
import {
|
|
52
|
-
wrapHistoricalSummaryWithReplayGuard
|
|
53
|
-
} from "./chunk-L5I543VB.js";
|
|
54
51
|
import {
|
|
55
52
|
isDialogRecordKey
|
|
56
53
|
} from "./chunk-OJKUU3LP.js";
|
|
54
|
+
import {
|
|
55
|
+
wrapHistoricalSummaryWithReplayGuard
|
|
56
|
+
} from "./chunk-BNMPUQW6.js";
|
|
57
57
|
import {
|
|
58
58
|
asTrimmedString
|
|
59
59
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -4,15 +4,20 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
compareAgentSelection,
|
|
6
6
|
resolveModelTier
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RYOLWYBK.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_PROVIDER_RETRY_MS,
|
|
10
10
|
isAgentUnavailableNow,
|
|
11
11
|
resolveAgentAvailability
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QJTZ76CP.js";
|
|
13
13
|
import {
|
|
14
14
|
isOAuthApiKeyRef
|
|
15
15
|
} from "./chunk-UKZX3NHN.js";
|
|
16
|
+
import {
|
|
17
|
+
isOwnedAgentKey,
|
|
18
|
+
ownedAgentKey,
|
|
19
|
+
publicAgentKey
|
|
20
|
+
} from "./chunk-M2EJHDJP.js";
|
|
16
21
|
import {
|
|
17
22
|
getModelAbility
|
|
18
23
|
} from "./chunk-62HXNQVV.js";
|
|
@@ -20,12 +25,7 @@ import {
|
|
|
20
25
|
isAntigravityOAuthAgent,
|
|
21
26
|
isSubscriptionEndpoint,
|
|
22
27
|
isSubscriptionOAuthCredential
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
isOwnedAgentKey,
|
|
26
|
-
ownedAgentKey,
|
|
27
|
-
publicAgentKey
|
|
28
|
-
} from "./chunk-M2EJHDJP.js";
|
|
28
|
+
} from "./chunk-7JGMNKKG.js";
|
|
29
29
|
import {
|
|
30
30
|
asTrimmedLowercaseString
|
|
31
31
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -5,21 +5,21 @@ import {
|
|
|
5
5
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
6
6
|
isAntigravityCloudCodeBaseUrl,
|
|
7
7
|
isAntigravityOAuthAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-7JGMNKKG.js";
|
|
9
9
|
import {
|
|
10
10
|
isOpenAiResponsesModel,
|
|
11
11
|
resolvePlatformChatCompletionsEndpoint,
|
|
12
12
|
resolvePlatformResponsesEndpoint
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-HBRDSQ3M.js";
|
|
14
14
|
import {
|
|
15
15
|
findModelConfig
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
asTrimmedLowercaseString
|
|
19
|
-
} from "./chunk-QSJ3HFEF.js";
|
|
16
|
+
} from "./chunk-CD3RU7XL.js";
|
|
20
17
|
import {
|
|
21
18
|
asOptionalTrimmedString
|
|
22
19
|
} from "./chunk-G3SUCT4W.js";
|
|
20
|
+
import {
|
|
21
|
+
asTrimmedLowercaseString
|
|
22
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
23
23
|
|
|
24
24
|
// packages/agent-runtime/agentCallPlan.ts
|
|
25
25
|
var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
|
|
@@ -7,24 +7,22 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QBZCGP34.js";
|
|
11
11
|
import {
|
|
12
12
|
parsePositiveFiniteNumberOrFallback
|
|
13
13
|
} from "./chunk-Y5GCAMGP.js";
|
|
14
14
|
import {
|
|
15
|
+
buildDialogAttachmentPlan,
|
|
16
|
+
extractFileContentIds,
|
|
15
17
|
fetchWithTransientRetry
|
|
16
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-DXWGFL2Z.js";
|
|
17
19
|
import {
|
|
18
20
|
DRAIN_EXHAUSTED_USER_MESSAGE,
|
|
19
21
|
isDrainExhaustedResponse
|
|
20
22
|
} from "./chunk-3L2WKC3W.js";
|
|
21
23
|
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} from "./chunk-KEPOVMF4.js";
|
|
25
|
-
import {
|
|
26
|
-
resolveRunsDir
|
|
27
|
-
} from "./chunk-XIEYGCN6.js";
|
|
24
|
+
createClientLogger
|
|
25
|
+
} from "./chunk-QQ56R7KS.js";
|
|
28
26
|
import {
|
|
29
27
|
getDefaultCliLocalRuntimeDb
|
|
30
28
|
} from "./chunk-P2ZLUIW2.js";
|
|
@@ -37,13 +35,13 @@ import {
|
|
|
37
35
|
resolveServerDbPath
|
|
38
36
|
} from "./chunk-GLKOYSRU.js";
|
|
39
37
|
import {
|
|
40
|
-
|
|
41
|
-
} from "./chunk-
|
|
38
|
+
resolveRunsDir
|
|
39
|
+
} from "./chunk-OWKNSIXL.js";
|
|
42
40
|
import {
|
|
43
41
|
boundSummaryText,
|
|
44
42
|
buildDialogReadEnvelope,
|
|
45
43
|
projectDialogReadForAgent
|
|
46
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-RYOLWYBK.js";
|
|
47
45
|
import {
|
|
48
46
|
asRecordOrEmpty
|
|
49
47
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -51,11 +49,15 @@ import {
|
|
|
51
49
|
isLevelNotFoundError
|
|
52
50
|
} from "./chunk-OW765XBU.js";
|
|
53
51
|
import {
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
dialogIdFromKey,
|
|
53
|
+
isSupportedDialogId,
|
|
54
|
+
parseDialogPathIdentity,
|
|
55
|
+
splitDialogKeyIdentity
|
|
56
|
+
} from "./chunk-YZMNK53S.js";
|
|
56
57
|
import {
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
asNonEmptyStringArray,
|
|
59
|
+
asTrimmedNonEmptyStringArray
|
|
60
|
+
} from "./chunk-I42VC5KR.js";
|
|
59
61
|
import {
|
|
60
62
|
parseUserIdFromAuthToken,
|
|
61
63
|
readOption,
|
|
@@ -63,29 +65,29 @@ import {
|
|
|
63
65
|
resolveDeleteServerCandidates,
|
|
64
66
|
resolveServerCandidates,
|
|
65
67
|
resolveServerUrl
|
|
66
|
-
} from "./chunk-
|
|
67
|
-
import {
|
|
68
|
-
DEFAULT_LOCAL_API_ORIGIN
|
|
69
|
-
} from "./chunk-4SN6J65J.js";
|
|
68
|
+
} from "./chunk-BIDSIRTS.js";
|
|
70
69
|
import {
|
|
71
70
|
t
|
|
72
|
-
} from "./chunk-
|
|
73
|
-
import {
|
|
74
|
-
dialogIdFromKey,
|
|
75
|
-
isSupportedDialogId,
|
|
76
|
-
parseDialogPathIdentity,
|
|
77
|
-
splitDialogKeyIdentity
|
|
78
|
-
} from "./chunk-YZMNK53S.js";
|
|
71
|
+
} from "./chunk-262R3XNN.js";
|
|
79
72
|
import {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
} from "./chunk-I42VC5KR.js";
|
|
73
|
+
toErrorMessage
|
|
74
|
+
} from "./chunk-HNMXYYJR.js";
|
|
83
75
|
import {
|
|
84
76
|
asTrimmedString
|
|
85
77
|
} from "./chunk-3EUW3WEO.js";
|
|
78
|
+
import {
|
|
79
|
+
isRecord
|
|
80
|
+
} from "./chunk-KUG52IAP.js";
|
|
86
81
|
import {
|
|
87
82
|
asOptionalTrimmedString
|
|
88
83
|
} from "./chunk-G3SUCT4W.js";
|
|
84
|
+
import {
|
|
85
|
+
DEFAULT_LOCAL_API_ORIGIN
|
|
86
|
+
} from "./chunk-4SN6J65J.js";
|
|
87
|
+
|
|
88
|
+
// packages/cli/dialogCommands.ts
|
|
89
|
+
import { write as writeFd } from "node:fs";
|
|
90
|
+
import { Writable } from "node:stream";
|
|
89
91
|
|
|
90
92
|
// packages/cli/dialogAttachmentCleanup.ts
|
|
91
93
|
function asText(value) {
|
|
@@ -344,6 +346,73 @@ ${indented}`);
|
|
|
344
346
|
output.write(`${JSON.stringify(value, null, 2)}
|
|
345
347
|
`);
|
|
346
348
|
}
|
|
349
|
+
async function writeDialogReadJson(output, json) {
|
|
350
|
+
const text = `${json}
|
|
351
|
+
`;
|
|
352
|
+
if (output === process.stdout) {
|
|
353
|
+
const bytes = Buffer.from(text, "utf8");
|
|
354
|
+
let offset = 0;
|
|
355
|
+
while (offset < bytes.length) {
|
|
356
|
+
const written = await new Promise((resolve, reject) => {
|
|
357
|
+
const attempt = () => writeFd(1, bytes, offset, Math.min(16384, bytes.length - offset), null, (error, count) => {
|
|
358
|
+
if (error?.code === "EAGAIN" || error?.code === "EWOULDBLOCK") {
|
|
359
|
+
setTimeout(attempt, 1);
|
|
360
|
+
} else if (error) reject(error);
|
|
361
|
+
else resolve(count);
|
|
362
|
+
});
|
|
363
|
+
attempt();
|
|
364
|
+
});
|
|
365
|
+
if (written <= 0) throw new Error("stdout write made no progress");
|
|
366
|
+
offset += written;
|
|
367
|
+
}
|
|
368
|
+
} else if (output instanceof Writable) {
|
|
369
|
+
await new Promise((resolve, reject) => {
|
|
370
|
+
let settled = false;
|
|
371
|
+
let writeStarted = false;
|
|
372
|
+
let stateCheck;
|
|
373
|
+
const cleanup = () => {
|
|
374
|
+
clearInterval(stateCheck);
|
|
375
|
+
output.off("error", onError);
|
|
376
|
+
output.off("close", checkState);
|
|
377
|
+
output.off("finish", checkState);
|
|
378
|
+
};
|
|
379
|
+
const settle = (error) => {
|
|
380
|
+
if (settled) return;
|
|
381
|
+
settled = true;
|
|
382
|
+
if (error) setTimeout(() => {
|
|
383
|
+
cleanup();
|
|
384
|
+
reject(error);
|
|
385
|
+
}, 0);
|
|
386
|
+
else {
|
|
387
|
+
cleanup();
|
|
388
|
+
resolve();
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
const onError = (error) => settle(error);
|
|
392
|
+
const checkState = () => {
|
|
393
|
+
if (output.errored) settle(output.errored);
|
|
394
|
+
else if (output.destroyed || output.closed || output.writableFinished || !writeStarted && output.writableEnded) {
|
|
395
|
+
settle(new Error("stdout Writable closed before write completion"));
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
output.on("error", onError);
|
|
399
|
+
output.on("close", checkState);
|
|
400
|
+
output.on("finish", checkState);
|
|
401
|
+
checkState();
|
|
402
|
+
if (settled) return;
|
|
403
|
+
stateCheck = setInterval(checkState, 10);
|
|
404
|
+
try {
|
|
405
|
+
writeStarted = true;
|
|
406
|
+
output.write(text, (error) => settle(error));
|
|
407
|
+
checkState();
|
|
408
|
+
} catch (error) {
|
|
409
|
+
settle(error instanceof Error ? error : new Error(String(error)));
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
} else {
|
|
413
|
+
output.write(text);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
347
416
|
function writeJsonlStream(output, items) {
|
|
348
417
|
for (const item of items) {
|
|
349
418
|
output.write(`${JSON.stringify(item)}
|
|
@@ -782,7 +851,7 @@ function isExplicitDialogIdMismatch(meta, dialogId) {
|
|
|
782
851
|
return meta && typeof meta === "object" && "id" in meta && meta.id != null && String(meta.id) !== dialogId;
|
|
783
852
|
}
|
|
784
853
|
async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog) {
|
|
785
|
-
const reader = readLocalDialog ?? (await import("./localDialogRead-
|
|
854
|
+
const reader = readLocalDialog ?? (await import("./localDialogRead-CCOCVGAP.js")).readDialogFromLocalDb;
|
|
786
855
|
const result = await reader({ dialogKey, dialogId, limit });
|
|
787
856
|
return {
|
|
788
857
|
...result,
|
|
@@ -797,7 +866,7 @@ async function readLocalDialogAtDbPathDefault(args) {
|
|
|
797
866
|
);
|
|
798
867
|
}
|
|
799
868
|
const db = await getDefaultCliLocalRuntimeDb();
|
|
800
|
-
const { readDialogFromLocalDb: reader } = await import("./localDialogRead-
|
|
869
|
+
const { readDialogFromLocalDb: reader } = await import("./localDialogRead-CCOCVGAP.js");
|
|
801
870
|
return reader({ ...args, db });
|
|
802
871
|
}
|
|
803
872
|
async function readDialogFromLocalDbWithFallback(args) {
|
|
@@ -1355,11 +1424,10 @@ async function runDialogReadCommand(args, deps = {}) {
|
|
|
1355
1424
|
},
|
|
1356
1425
|
options: { maxResponseChars: agentMaxResponseChars }
|
|
1357
1426
|
});
|
|
1358
|
-
output
|
|
1359
|
-
output.write("\n");
|
|
1427
|
+
await writeDialogReadJson(output, built.serialized);
|
|
1360
1428
|
return 0;
|
|
1361
1429
|
}
|
|
1362
|
-
output
|
|
1430
|
+
await writeDialogReadJson(output, JSON.stringify({
|
|
1363
1431
|
source: read.source,
|
|
1364
1432
|
base: read.resolvedBase,
|
|
1365
1433
|
triedBases: read.candidateBases,
|
|
@@ -1408,11 +1476,11 @@ async function runDialogReadCommand(args, deps = {}) {
|
|
|
1408
1476
|
lastAssistantMessage,
|
|
1409
1477
|
messages: outputMsgs
|
|
1410
1478
|
}, null, 2));
|
|
1411
|
-
output.write("\n");
|
|
1412
1479
|
return 0;
|
|
1413
1480
|
} catch (error) {
|
|
1414
|
-
|
|
1415
|
-
|
|
1481
|
+
const diagnostic = `${formatDialogReadFailure(error, target.dialogId)}
|
|
1482
|
+
`;
|
|
1483
|
+
(deps.error ?? (output instanceof Writable ? process.stderr : output)).write(diagnostic);
|
|
1416
1484
|
return 1;
|
|
1417
1485
|
}
|
|
1418
1486
|
}
|
|
@@ -354,7 +354,7 @@ function formatAgentListCard(agents, maxDisplay = 8, now = /* @__PURE__ */ new D
|
|
|
354
354
|
const model = agent.model || "\u2014";
|
|
355
355
|
const source = agent.apiSource || agent.provider || agent.cliProvider || "\u2014";
|
|
356
356
|
const key = agent.agentKey || "(agentKey unavailable)";
|
|
357
|
-
lines.push(`${star}${own} ${name} ${model} ${source}${includeKeys ? ` ${key}` : ""}`);
|
|
357
|
+
lines.push(`${star} ${own} ${name} ${model} ${source}${includeKeys ? ` ${key}` : ""}`);
|
|
358
358
|
if (agent.availabilityStatus === "rate_limited" || agent.availabilityStatus === "quota_exhausted") {
|
|
359
359
|
const until = typeof agent.nextAvailableAt === "number" ? formatLocalClockUntil(agent.nextAvailableAt, now) : void 0;
|
|
360
360
|
lines.push(
|
|
@@ -376,15 +376,6 @@ function formatLocalClockUntil(atMs, now) {
|
|
|
376
376
|
return sameDay ? time : `${pad(at.getMonth() + 1)}-${pad(at.getDate())} ${time}`;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
-
// packages/ai/tools/agent/runTitle.ts
|
|
380
|
-
var RUN_TITLE_MAX = 60;
|
|
381
|
-
function normalizeRunTitle(value) {
|
|
382
|
-
if (typeof value !== "string") return void 0;
|
|
383
|
-
const cleaned = value.replace(/[\u0000-\u001f\u007f-\u009f]+/g, " ").replace(/\s+/g, " ").trim();
|
|
384
|
-
if (!cleaned) return void 0;
|
|
385
|
-
return cleaned.length > RUN_TITLE_MAX ? `${cleaned.slice(0, RUN_TITLE_MAX - 1)}\u2026` : cleaned;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
379
|
// packages/ai/tools/agent/agentRunName.ts
|
|
389
380
|
async function resolveAgentRunName(agentKey, candidates, readAgent) {
|
|
390
381
|
for (const candidate of candidates) {
|
|
@@ -403,6 +394,15 @@ function shortAgentKey(agentKey) {
|
|
|
403
394
|
return agentKey.trim().slice(-24) || "unknown-agent";
|
|
404
395
|
}
|
|
405
396
|
|
|
397
|
+
// packages/ai/tools/agent/runTitle.ts
|
|
398
|
+
var RUN_TITLE_MAX = 60;
|
|
399
|
+
function normalizeRunTitle(value) {
|
|
400
|
+
if (typeof value !== "string") return void 0;
|
|
401
|
+
const cleaned = value.replace(/[\u0000-\u001f\u007f-\u009f]+/g, " ").replace(/\s+/g, " ").trim();
|
|
402
|
+
if (!cleaned) return void 0;
|
|
403
|
+
return cleaned.length > RUN_TITLE_MAX ? `${cleaned.slice(0, RUN_TITLE_MAX - 1)}\u2026` : cleaned;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
406
|
export {
|
|
407
407
|
buildDelegatedTaskContent,
|
|
408
408
|
calculateDelegatedPayloadMetrics,
|
|
@@ -424,8 +424,8 @@ export {
|
|
|
424
424
|
formatNotFoundRunCard,
|
|
425
425
|
isAgentRunTerminalStatus,
|
|
426
426
|
formatAgentListCard,
|
|
427
|
-
RUN_TITLE_MAX,
|
|
428
|
-
normalizeRunTitle,
|
|
429
427
|
resolveAgentRunName,
|
|
430
|
-
shortAgentKey
|
|
428
|
+
shortAgentKey,
|
|
429
|
+
RUN_TITLE_MAX,
|
|
430
|
+
normalizeRunTitle
|
|
431
431
|
};
|