nolo-cli 0.240.0-alpha.2 → 0.241.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-5NA4USGG.js → _executeModel-UCWDB72C.js} +50 -50
- package/{action-X75O3XPH.js → action-24MZYW2B.js} +6 -6
- package/{addContentAction-GVC77QSN.js → addContentAction-HEMCSSHT.js} +9 -9
- package/{addDialogAgentAction-KKDVAMW3.js → addDialogAgentAction-SQYDOXHA.js} +8 -8
- package/{agentDeleteCommand-2RFGKFAB.js → agentDeleteCommand-P7O3ACNJ.js} +76 -77
- package/{agentEmailCommands-GQCQKKOR.js → agentEmailCommands-A5BRSYWK.js} +80 -81
- package/{agentListCommands-HSGLDPDQ.js → agentListCommands-LDRCOOMO.js} +37 -36
- package/{agentMachineCommands-BISF6PVV.js → agentMachineCommands-AYL53KJV.js} +31 -30
- package/{agentProviderCommands-O3Q25PKU.js → agentProviderCommands-N5EA3ED2.js} +2 -2
- package/{agentPullCommand-G6U2LHMW.js → agentPullCommand-QQQZSC6S.js} +1 -1
- package/{agentRecordCommands-AOXPGYAJ.js → agentRecordCommands-FICBZ57C.js} +75 -76
- package/{agentRunCommand-YTZJCRAL.js → agentRunCommand-CTXQGDUM.js} +81 -80
- package/{agentRunControl-VBL7UFSG.js → agentRunControl-CO6BASZF.js} +7 -7
- package/{agentRuntimeLocal-T7BX2WGL.js → agentRuntimeLocal-5YN4D5WT.js} +26 -25
- package/{agentSlice-XJNKE3PG.js → agentSlice-DJ5D4DU4.js} +9 -9
- package/{appDeleteCommands-LURUSPY7.js → appDeleteCommands-B4E7N7M2.js} +32 -31
- package/{appDeployCommands-SMEW4AK2.js → appDeployCommands-E4DTXRRM.js} +32 -31
- package/{appDeployStatusCommands-VYPJTBJK.js → appDeployStatusCommands-FCNHYHZM.js} +32 -31
- package/{appGetCommands-N4NI5GGJ.js → appGetCommands-4DXSQHUZ.js} +32 -31
- package/{appListCommands-5C6ONN3Z.js → appListCommands-2NN5E4F6.js} +32 -31
- package/{authCommand-4CVBDADE.js → authCommand-47DR6GZT.js} +22 -18
- package/{authCommands-EHU2BHOX.js → authCommands-ZZ3L5IFM.js} +10 -6
- package/builtinSkillRegistry-AYWYQVA4.js +1 -1
- package/{chromeOpsCommands-CSDG2HYN.js → chromeOpsCommands-VZWAY2KR.js} +1 -1
- package/{chunk-UFC4J7OY.js → chunk-24GVXSWK.js} +3 -3
- package/{chunk-4IQVE43Z.js → chunk-25OCZXSX.js} +15 -15
- package/{chunk-4X5AVCM7.js → chunk-2BSLGODA.js} +258 -23
- package/{chunk-U3G7RRXJ.js → chunk-2XMKW2OY.js} +4 -4
- package/{chunk-MYOSN6BT.js → chunk-3NFWMSTA.js} +31 -10
- package/{chunk-E5KY7RAY.js → chunk-3V6JT6WN.js} +344 -137
- package/{chunk-2X7WFDT6.js → chunk-4FE3IWRE.js} +1 -1
- package/{chunk-XS5A3EKX.js → chunk-4YFC3DWW.js} +75 -1
- package/chunk-53W5BXLN.js +340 -0
- package/{chunk-H7ZYKHAZ.js → chunk-5TJE4QCL.js} +102 -31
- package/{chunk-FZKA3XFA.js → chunk-6BGJHJRN.js} +9 -9
- package/{chunk-6WOLPIPY.js → chunk-6RSNVJGO.js} +2 -102
- package/{chunk-L32W3PRP.js → chunk-6X3CS6NJ.js} +161 -12
- package/{chunk-3FBAVU2Y.js → chunk-6XBOPKUH.js} +11 -76
- package/{chunk-62HXNQVV.js → chunk-776CXKMX.js} +1 -1
- package/{chunk-7TTMMOKH.js → chunk-7OTNBI77.js} +1 -1
- package/{chunk-BGGV6B5O.js → chunk-7Q7MKJZN.js} +83 -50
- package/{chunk-2574ANSV.js → chunk-7U2TFUWW.js} +1 -1
- package/{chunk-A3LUWRQK.js → chunk-B72AFRR2.js} +4 -4
- package/{chunk-P3IZUMIC.js → chunk-BDERPCJW.js} +4 -4
- package/{chunk-MYPKBJJO.js → chunk-BIJTI5SX.js} +2 -2
- package/{chunk-ZEKUFJLW.js → chunk-BWW6WRX6.js} +3 -3
- package/chunk-C5A54QS7.js +108 -0
- package/{chunk-IUTUWIKE.js → chunk-C646JEUV.js} +1 -1
- package/{chunk-FFYE5ATM.js → chunk-CT6GT2BG.js} +7 -7
- package/{chunk-T6VROBY7.js → chunk-CZLSTOVM.js} +2 -2
- package/{chunk-SRCCSTIM.js → chunk-DGUUOHBF.js} +2 -2
- package/{chunk-A5EVA6HU.js → chunk-DIBQXNGW.js} +2 -2
- package/{chunk-AVJDELEA.js → chunk-DLT2DN4M.js} +1 -1
- package/{chunk-IJTXNLQE.js → chunk-DLTMAXLF.js} +6 -6
- package/{chunk-5QZSEQSK.js → chunk-DWWUVRB5.js} +1 -1
- package/{chunk-TRHJ4NJB.js → chunk-EIFSCI4C.js} +381 -155
- package/{chunk-DXW5WDHZ.js → chunk-EW37CXCQ.js} +3 -3
- package/{chunk-GXXY2NL3.js → chunk-F3FQPVHE.js} +37 -2
- package/{chunk-7AJRJGSQ.js → chunk-FCAMGBLY.js} +378 -146
- package/{chunk-YGCOJNFZ.js → chunk-FPMPWNVQ.js} +3 -3
- package/{chunk-MECDGHLK.js → chunk-FSIEHQNH.js} +2 -2
- package/{chunk-B7DE5XJW.js → chunk-FXX6VFMV.js} +208 -25
- package/{chunk-Z2WZAE4P.js → chunk-G6OPRPXH.js} +11 -11
- package/{chunk-VSRISJXZ.js → chunk-GAHJLSDO.js} +1 -1
- package/{chunk-PGKA77TZ.js → chunk-GCVFX6ZL.js} +169 -106
- package/{chunk-E5KJOZWY.js → chunk-H6CHPU6M.js} +3 -3
- package/{chunk-RETQOQ4D.js → chunk-HNWZJI4N.js} +1 -1
- package/{chunk-BGGAY6OK.js → chunk-IPRPYKBP.js} +3 -3
- package/{chunk-G22P367E.js → chunk-IUXBKS5L.js} +57 -13
- package/{chunk-PRMEU7BT.js → chunk-KGIIZXPL.js} +4 -4
- package/chunk-KK3FCYZM.js +647 -0
- package/{chunk-4Q6HQORG.js → chunk-KOIDLCAQ.js} +1 -1
- package/{chunk-PROOOQZ3.js → chunk-LCQJH7KN.js} +1 -1
- package/{chunk-Y2MF4DCJ.js → chunk-LELADM5Q.js} +1 -1
- package/{chunk-RTHFJZ6M.js → chunk-LMFMV5UC.js} +2 -2
- package/{chunk-ANJRDS6U.js → chunk-LMZRXDWG.js} +3 -3
- package/{chunk-6CKUO32A.js → chunk-LN4ZVSO7.js} +6 -3
- package/{chunk-N2JROHD3.js → chunk-LT3DMEIB.js} +3 -3
- package/{chunk-F6YWDVIB.js → chunk-MDVP5TLI.js} +1 -1
- package/chunk-MVOZ22RZ.js +26 -0
- package/{chunk-CBUZ6DKA.js → chunk-N6EN3HK3.js} +1 -1
- package/{chunk-3EMIEC27.js → chunk-NBB2EBQD.js} +1 -1
- package/{chunk-TWTJV35S.js → chunk-NL7J2J5Z.js} +3 -3
- package/{chunk-EEOOBRA7.js → chunk-NQQL2DKF.js} +2 -2
- package/{chunk-AEQMKYZN.js → chunk-NWWQY2J5.js} +4 -4
- package/{chunk-AH5R7BYW.js → chunk-OATIWAKN.js} +5 -5
- package/{chunk-CD3RU7XL.js → chunk-OJRTTERA.js} +62 -2
- package/{chunk-HOM6LTEW.js → chunk-OYHJ4TW7.js} +6 -6
- package/{chunk-BXSMFPTG.js → chunk-QES2NCVM.js} +3 -3
- package/{chunk-Y5OWZQMJ.js → chunk-QGMIUVBT.js} +5 -5
- package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
- package/chunk-SR4FE5VD.js +9 -0
- package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
- package/{chunk-CKZPMJNU.js → chunk-T444ENEC.js} +3 -3
- package/{chunk-TEMLHVGX.js → chunk-TE2XH4KH.js} +1 -1
- package/{chunk-4FIO2S7Z.js → chunk-TFGGNRT6.js} +1 -1
- package/{chunk-HCNOO374.js → chunk-TTEBPPUV.js} +1 -1
- package/{chunk-RM4UMFY4.js → chunk-TXFYIWAW.js} +7 -7
- package/{chunk-6WZVM33D.js → chunk-TXQVH72L.js} +2 -2
- package/{chunk-OBSEKCVK.js → chunk-U4VSBDO5.js} +88 -0
- package/{chunk-OX6GNNVT.js → chunk-U5LOKQ2R.js} +24 -13
- package/{chunk-VM72HKW2.js → chunk-UAHUJ4HH.js} +11 -11
- package/{chunk-BIABIPGW.js → chunk-UAOFSUG7.js} +1 -1
- package/{chunk-D374I563.js → chunk-UKSKCDBG.js} +1 -1
- package/{chunk-IUMS6F53.js → chunk-WHO3LYDW.js} +9 -5
- package/{chunk-F3XI6WQP.js → chunk-X37RQEA3.js} +2 -2
- package/{chunk-B5SV4H3J.js → chunk-XAFOLWLU.js} +1 -1
- package/{chunk-HBRDSQ3M.js → chunk-XNEDFWT4.js} +2 -2
- package/{chunk-VREG6ANQ.js → chunk-Y5RN44VH.js} +8 -8
- package/{chunk-S2MHR4PU.js → chunk-YFRJAE3R.js} +178 -114
- package/{chunk-GDUC4VS2.js → chunk-YMCSR7PA.js} +7 -7
- package/{chunk-5ZUOVCKT.js → chunk-YUZ2DAIH.js} +3 -1
- package/{chunk-CVJRVBJL.js → chunk-ZBQ5UGYY.js} +3 -3
- package/{chunk-O6IPRAVV.js → chunk-ZQUCJBS4.js} +2 -2
- package/{chunk-KZPEGO6D.js → chunk-ZT3DYK5T.js} +3 -3
- package/{chunk-DNZ4JJ7C.js → chunk-ZTLTDUV6.js} +16 -3
- package/{cliAgentConfigHelpers-U5OAVAKQ.js → cliAgentConfigHelpers-RFR7ZCSK.js} +6 -6
- package/{cliAuthorityBrokerClient-S42VMGB6.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
- package/{cliLocalAgentRecordReader-HVZAQCUD.js → cliLocalAgentRecordReader-AJ4UKHKT.js} +30 -29
- package/{commandRegistry-FIXBZJHE.js → commandRegistry-IHWZVV4G.js} +86 -86
- package/{contentThunks-U6OC4R2N.js → contentThunks-YQRCBDKF.js} +22 -21
- package/{cooldownCommands-U7XSRVJP.js → cooldownCommands-W67DE765.js} +1 -1
- package/{createAgentAutomationAction-IP4LFN3W.js → createAgentAutomationAction-ERSDNR4R.js} +22 -21
- package/{createDialogAction-IAGQJ3LH.js → createDialogAction-QXC7JZPE.js} +23 -22
- package/{createPageAction-AZ3UIFKA.js → createPageAction-RLZ7776F.js} +24 -23
- package/{db-M7FU2GNK.js → db-6NRZLEW2.js} +1 -1
- package/{dbSlice-DKKMJJYY.js → dbSlice-7M2ESEUO.js} +8 -8
- package/{deleteFile-TQSONMVU.js → deleteFile-WO6WSSNK.js} +5 -5
- package/{dialogCommands-PCDRMBWG.js → dialogCommands-UIRO4QNN.js} +37 -36
- package/{dialogNotifyCommand-O35MWMOS.js → dialogNotifyCommand-VDUFYBZV.js} +8 -8
- package/{dialogSlice-QAKYN4DE.js → dialogSlice-A4U3C76D.js} +20 -19
- package/{dialogUsageCommand-2SSLTXKO.js → dialogUsageCommand-SEC6UZWM.js} +2 -2
- package/{docCreateCommands-CFQFZOAD.js → docCreateCommands-MHPYTJWR.js} +31 -30
- package/{docDeleteCommands-5CPNTIIS.js → docDeleteCommands-VYULMBAQ.js} +32 -31
- package/{docReadCommands-XQILYSAJ.js → docReadCommands-FV3GGZ7V.js} +31 -30
- package/{docStore-GIVRT7TQ.js → docStore-AWWI72FA.js} +9 -9
- package/{docUpdateCommands-VETKSUDD.js → docUpdateCommands-JNS3HX7F.js} +31 -30
- package/fetchMessages-TQEUZD7H.js +1 -1
- package/{getPricing-LF5C4XSI.js → getPricing-U5AR7ZHS.js} +3 -3
- package/{handleSendMessageAction-HKIW4ZNO.js → handleSendMessageAction-WDJOUDNV.js} +41 -40
- package/{hostCredentialCreate-6VDJFNDO.js → hostCredentialCreate-H3FF2SAO.js} +75 -76
- package/index.js +8 -8
- package/keys-RWF7UCB4.js +1 -1
- package/{localDialogRead-AV2VKKPG.js → localDialogRead-3T2KMCRC.js} +1 -1
- package/{localRuntimeAdapter-BQ4F5PZV.js → localRuntimeAdapter-JAQQXZJP.js} +74 -73
- package/{localRuntimeAuthority-WCNA4A3G.js → localRuntimeAuthority-7DKIT7UH.js} +2 -2
- package/{localRuntimeDb-CRNIBOOM.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
- package/{machineCommands-K6XIGOAD.js → machineCommands-WYOFNB5I.js} +73 -74
- package/{machineWsRunDispatch-4OO7Z6UM.js → machineWsRunDispatch-Y7UIAZNM.js} +73 -74
- package/markdownToSlate-KIYM7B3P.js +8 -0
- package/{mcpLocalAuthorizeCommand-ZP6ESAGE.js → mcpLocalAuthorizeCommand-SCYEFLRK.js} +9 -9
- package/{memberThunks-PBJPZ2JU.js → memberThunks-DIITWU4M.js} +10 -10
- package/{models-H5NNZRLH.js → models-CINY5UZR.js} +2 -2
- package/package.json +1 -1
- package/{projectArchive-G7AOQPRW.js → projectArchive-IZJXBW5N.js} +26 -25
- package/{providerPresetApply-OPBCAONX.js → providerPresetApply-2QWXPJXZ.js} +5 -5
- package/{providerRegistry-J2HCVTHE.js → providerRegistry-W4LCKK6V.js} +5 -5
- package/{read-JEGPITEW.js → read-OBLJNMA2.js} +5 -5
- package/{readDocTool-TE3XIU4Y.js → readDocTool-QQZ4DAER.js} +1 -1
- package/{readlineWorkspace-XMPGXR77.js → readlineWorkspace-WF3SWZGR.js} +2914 -1240
- package/rememberExplicit-CPAPONSI.js +15 -0
- package/{removeDialogAgentAction-CX3OAH4Y.js → removeDialogAgentAction-HC3SOY3G.js} +10 -10
- package/{runAgentClientLoop-HQJPDFGQ.js → runAgentClientLoop-Z7V6TA3O.js} +48 -48
- package/{runtimeDoctorCommands-GUH2YGMH.js → runtimeDoctorCommands-KX6YLPWV.js} +8 -8
- package/{secretCommands-NJXFVHZU.js → secretCommands-STRAX275.js} +2 -2
- package/{setDialogExtraReferencesAction-CGM67EEQ.js → setDialogExtraReferencesAction-DDZUQPY6.js} +9 -9
- package/{setPrimaryDialogAgentAction-3ABWPPXR.js → setPrimaryDialogAgentAction-EB67OMAJ.js} +10 -10
- package/{settingThunks-AY76OHYX.js → settingThunks-TN6GFASU.js} +8 -8
- package/{spaceCommands-G63QGYQO.js → spaceCommands-HBYQUVJI.js} +30 -29
- package/{streamAgentChatTurn-E3XH2KFD.js → streamAgentChatTurn-CM7QQXOS.js} +78 -78
- package/{switchDialogAgentAction-G6EZRKCQ.js → switchDialogAgentAction-XY5TKQQE.js} +8 -8
- package/{tableCommands-JI75ZHDI.js → tableCommands-MXFL3JIT.js} +2 -2
- package/{toolApiClient-62UUPDUA.js → toolApiClient-53YMJ2G6.js} +7 -3
- package/{tools-7RSX22FT.js → tools-AT6H73LD.js} +39 -40
- package/{tuiRestart-KAAA7TND.js → tuiRestart-272SAYSK.js} +8 -8
- package/{tuiSummaryLlmCaller-BVNHMWLR.js → tuiSummaryLlmCaller-K2OVRVHG.js} +13 -12
- package/{updateCommands-ASK5XYPH.js → updateCommands-O3BOVVVN.js} +3 -3
- package/{updateDialogTitleAction-SEWV252V.js → updateDialogTitleAction-PGY4UPLH.js} +22 -21
- package/{usageCommand-JVT5J3DC.js → usageCommand-SCF3ROV2.js} +3 -3
- package/{usageRebuildCommand-IZYYUTEW.js → usageRebuildCommand-K5WPIBA5.js} +4 -4
- package/{windowsSelfUpdate-BSDIS2J5.js → windowsSelfUpdate-WJDUZLEO.js} +2 -2
- package/{workContext-MM3P5GP5.js → workContext-Y3ADAPZU.js} +2 -1
- package/chunk-XBAEM4RI.js +0 -272
- package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +3 -3
- package/{chunk-ULLHVDTZ.js → chunk-C3GOEQJF.js} +3 -3
- package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
- package/{workloadLifecycle-YIZ7KLUP.js → workloadLifecycle-HFJIN5IZ.js} +5 -5
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BROWSER_SHELL_BRIDGE_ENV
|
|
3
|
-
} from "./chunk-2YGBI2XB.js";
|
|
4
1
|
import {
|
|
5
2
|
confirmMcpOnHost,
|
|
6
3
|
createConnectorApprovalPort,
|
|
@@ -10,19 +7,10 @@ import {
|
|
|
10
7
|
parsePendingApprovalResult,
|
|
11
8
|
runConnectorToolWithHostApproval,
|
|
12
9
|
withHostApprovalRequest
|
|
13
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HNWZJI4N.js";
|
|
14
11
|
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
readCredentialEntry
|
|
18
|
-
} from "./chunk-WWTSEBDF.js";
|
|
19
|
-
import {
|
|
20
|
-
customNativeAuthHeaders,
|
|
21
|
-
detectDeclaredCustomNativeWire,
|
|
22
|
-
isCallerCancellation,
|
|
23
|
-
resolveCustomNativeApiKeyHeader,
|
|
24
|
-
resolveCustomNativeEndpoint
|
|
25
|
-
} from "./chunk-WOAZVUSN.js";
|
|
12
|
+
BROWSER_SHELL_BRIDGE_ENV
|
|
13
|
+
} from "./chunk-2YGBI2XB.js";
|
|
26
14
|
import {
|
|
27
15
|
adoptRequiredClaudeCodeVersion,
|
|
28
16
|
anthropicRefresh,
|
|
@@ -34,12 +22,12 @@ import {
|
|
|
34
22
|
resolveClaudeCodeVersion,
|
|
35
23
|
resolveServerSyncConfig,
|
|
36
24
|
xaiRefresh
|
|
37
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-3NFWMSTA.js";
|
|
38
26
|
import {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} from "./chunk-
|
|
27
|
+
clearCredentialAvailability,
|
|
28
|
+
markCredentialUnavailable,
|
|
29
|
+
readCredentialEntry
|
|
30
|
+
} from "./chunk-WWTSEBDF.js";
|
|
43
31
|
import {
|
|
44
32
|
SANDBOX_HELPER_PATH,
|
|
45
33
|
SANDBOX_OUTPUT_LIMITS,
|
|
@@ -55,15 +43,27 @@ import {
|
|
|
55
43
|
executeChromeConnectorTool,
|
|
56
44
|
validateChromeConnectorPayload
|
|
57
45
|
} from "./chunk-UAIHKQIA.js";
|
|
46
|
+
import {
|
|
47
|
+
customNativeAuthHeaders,
|
|
48
|
+
detectDeclaredCustomNativeWire,
|
|
49
|
+
isCallerCancellation,
|
|
50
|
+
resolveCustomNativeApiKeyHeader,
|
|
51
|
+
resolveCustomNativeEndpoint
|
|
52
|
+
} from "./chunk-WOAZVUSN.js";
|
|
53
|
+
import {
|
|
54
|
+
DialogNotifyError,
|
|
55
|
+
deliverDialogNotification,
|
|
56
|
+
sha256Hex
|
|
57
|
+
} from "./chunk-TE2XH4KH.js";
|
|
58
58
|
import {
|
|
59
59
|
extractLastUserText,
|
|
60
60
|
localTurnHasSubjectRefs,
|
|
61
61
|
resolveLocalUserId,
|
|
62
62
|
withResolvedRuntimeToolSurface
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-7U2TFUWW.js";
|
|
64
64
|
import {
|
|
65
65
|
createTuiSummaryLlmCaller
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-BDERPCJW.js";
|
|
67
67
|
import {
|
|
68
68
|
CliProviderQuotaError,
|
|
69
69
|
executeCli,
|
|
@@ -75,13 +75,10 @@ import {
|
|
|
75
75
|
import {
|
|
76
76
|
buildCliPrompt
|
|
77
77
|
} from "./chunk-ATNTHIZI.js";
|
|
78
|
-
import {
|
|
79
|
-
resolveUserSkillRuntime
|
|
80
|
-
} from "./chunk-6D25V6CB.js";
|
|
81
78
|
import {
|
|
82
79
|
inlineImageUrlsForCustomProvider,
|
|
83
80
|
prepareTools
|
|
84
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-ZBQ5UGYY.js";
|
|
85
82
|
import {
|
|
86
83
|
getServerProviderSecret
|
|
87
84
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -104,22 +101,25 @@ import {
|
|
|
104
101
|
resolveCliLocalSpawnDispatch,
|
|
105
102
|
resolveRunContextFacts,
|
|
106
103
|
resolveStartAgentRunCwd
|
|
107
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-7Q7MKJZN.js";
|
|
108
105
|
import {
|
|
109
106
|
deriveCredentialGroup,
|
|
110
107
|
deriveCustomProviderCredentialGroup
|
|
111
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-BWW6WRX6.js";
|
|
109
|
+
import {
|
|
110
|
+
resolveUserSkillRuntime
|
|
111
|
+
} from "./chunk-6D25V6CB.js";
|
|
112
112
|
import {
|
|
113
113
|
normalizeEnabledPromptSkills,
|
|
114
114
|
resolveUserEnabledSkills
|
|
115
115
|
} from "./chunk-DVYAFH2Q.js";
|
|
116
116
|
import {
|
|
117
117
|
validateAskChoiceInput
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-KGIIZXPL.js";
|
|
119
119
|
import {
|
|
120
120
|
prepareTokenUsageData,
|
|
121
121
|
runKeyed
|
|
122
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-FXX6VFMV.js";
|
|
123
123
|
import {
|
|
124
124
|
applyTokenUsageToDayStats,
|
|
125
125
|
require_format
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
} from "./chunk-523DITKR.js";
|
|
131
131
|
import {
|
|
132
132
|
fetchServerSyncedCredential
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-DLTMAXLF.js";
|
|
134
134
|
import {
|
|
135
135
|
defaultLoopbackRequest
|
|
136
136
|
} from "./chunk-VP3BINY7.js";
|
|
@@ -138,14 +138,14 @@ import {
|
|
|
138
138
|
CREDENTIAL_STORE_SESSION_FALLBACK_WARNING,
|
|
139
139
|
OAUTH_PROVIDER_REFS,
|
|
140
140
|
getSharedSessionCredentialBroker
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-QES2NCVM.js";
|
|
142
142
|
import {
|
|
143
143
|
fetchWithTransientRetry,
|
|
144
144
|
isTransientFetchError
|
|
145
145
|
} from "./chunk-DXWGFL2Z.js";
|
|
146
146
|
import {
|
|
147
147
|
getDefaultCliLocalRuntimeDb
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-LELADM5Q.js";
|
|
149
149
|
import {
|
|
150
150
|
_readQueueEntriesLocked,
|
|
151
151
|
ackRunRecord,
|
|
@@ -170,12 +170,12 @@ import {
|
|
|
170
170
|
terminateRunProcess,
|
|
171
171
|
transitionRunToTerminal,
|
|
172
172
|
withQueueLock
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-FSIEHQNH.js";
|
|
174
174
|
import {
|
|
175
175
|
remoteDialogSyncTimeout,
|
|
176
176
|
resolveRuntimeAuthToken,
|
|
177
177
|
resolveRuntimeServerUrl
|
|
178
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-4FE3IWRE.js";
|
|
179
179
|
import {
|
|
180
180
|
TASK_PREVIEW_MAX,
|
|
181
181
|
formatControlRunMessageCard,
|
|
@@ -192,7 +192,7 @@ import {
|
|
|
192
192
|
resolveAgentRunName,
|
|
193
193
|
resolveRunLabel,
|
|
194
194
|
shortRunId
|
|
195
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-S25VJYXV.js";
|
|
196
196
|
import {
|
|
197
197
|
isTombstoneRecord
|
|
198
198
|
} from "./chunk-BV3FLP2L.js";
|
|
@@ -201,7 +201,13 @@ import {
|
|
|
201
201
|
readDialogMessageRecords,
|
|
202
202
|
readDialogMessages,
|
|
203
203
|
resolveBuiltinLocalCliAgentConfig
|
|
204
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-2XMKW2OY.js";
|
|
205
|
+
import {
|
|
206
|
+
applyPublicAgentCatalogOverride
|
|
207
|
+
} from "./chunk-LT3DMEIB.js";
|
|
208
|
+
import {
|
|
209
|
+
applyBuiltinAgentRuntimeOverride
|
|
210
|
+
} from "./chunk-JBWXPACD.js";
|
|
205
211
|
import {
|
|
206
212
|
LOCAL_CODEX_AGENT_KEY,
|
|
207
213
|
isLocalCliAgentKey,
|
|
@@ -231,14 +237,17 @@ import {
|
|
|
231
237
|
executeLocalToolWithPolicy,
|
|
232
238
|
executeOpenAiCompatibleChatCompletion,
|
|
233
239
|
filterRetainedLedgerRecords,
|
|
240
|
+
filterToolNamesForRunKind,
|
|
234
241
|
getAgentRuntimeToolParametersIndex,
|
|
235
242
|
getLocalShellLifecycle,
|
|
243
|
+
hasRunWakeChannel,
|
|
236
244
|
hashToolDefinitions,
|
|
237
245
|
internalListWorkspaceEntries,
|
|
238
246
|
internalSearchWorkspace,
|
|
239
247
|
isCommandExecutingTool,
|
|
240
248
|
isLineRangeCovered,
|
|
241
249
|
isStableSessionIdentityEnabled,
|
|
250
|
+
isSubtaskRun,
|
|
242
251
|
normalizeLocalToolName,
|
|
243
252
|
orderDialogHistory,
|
|
244
253
|
parseSyncServersEnv,
|
|
@@ -254,7 +263,7 @@ import {
|
|
|
254
263
|
runExecShellGates,
|
|
255
264
|
validateConfiguredRootExecutionLease,
|
|
256
265
|
verifyOwnerRouteAck
|
|
257
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-EIFSCI4C.js";
|
|
258
267
|
import {
|
|
259
268
|
createHostCredentialBrokerChain,
|
|
260
269
|
createStrictHostCredentialBroker
|
|
@@ -271,7 +280,7 @@ import {
|
|
|
271
280
|
resolveAntigravityFinishReason,
|
|
272
281
|
resolveGeminiModelQuirks,
|
|
273
282
|
shouldUseGeminiNativeToolRoute
|
|
274
|
-
} from "./chunk-
|
|
283
|
+
} from "./chunk-5TJE4QCL.js";
|
|
275
284
|
import {
|
|
276
285
|
readLocalImage
|
|
277
286
|
} from "./chunk-AL3TYDIF.js";
|
|
@@ -286,24 +295,41 @@ import {
|
|
|
286
295
|
readPlatformChatSseCompletion,
|
|
287
296
|
resolvePlatformChatProviderConfig,
|
|
288
297
|
shouldUsePlatformChatProvider
|
|
289
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-OYHJ4TW7.js";
|
|
290
299
|
import {
|
|
291
300
|
readSseDataValues,
|
|
292
301
|
readSseFrames
|
|
293
302
|
} from "./chunk-HNUWUO75.js";
|
|
294
303
|
import {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
304
|
+
resolveAgentRuntimeConfigFromRecord
|
|
305
|
+
} from "./chunk-ZT3DYK5T.js";
|
|
306
|
+
import {
|
|
307
|
+
assertDispatchSelectionAdmission,
|
|
308
|
+
buildNoloWorkspaceOpenAiTools,
|
|
309
|
+
filterClientNoloWorkspaceToolNames,
|
|
310
|
+
parseNoloWorkspaceToolArguments
|
|
311
|
+
} from "./chunk-IUXBKS5L.js";
|
|
312
|
+
import {
|
|
313
|
+
MCP_TOOL_NAMES
|
|
314
|
+
} from "./chunk-7NIBQ4HY.js";
|
|
315
|
+
import {
|
|
316
|
+
extractQuotaSnapshot,
|
|
317
|
+
isCapacitySaturatedRateLimit,
|
|
318
|
+
mergeAvailabilityDeadline,
|
|
319
|
+
resolveAvailabilityAction,
|
|
320
|
+
resolveCredentialKeyWithFallback
|
|
321
|
+
} from "./chunk-QJTZ76CP.js";
|
|
322
|
+
import {
|
|
323
|
+
HIGH_RISK_MUTATION_TOOL_NAMES,
|
|
324
|
+
resolveRequestToolSurface
|
|
325
|
+
} from "./chunk-VS276URX.js";
|
|
300
326
|
import {
|
|
301
327
|
collectStablePromptPrefix,
|
|
302
328
|
convertMessagesToResponsesInput,
|
|
303
329
|
findAgentStatePairingIssues,
|
|
304
330
|
stablePromptCacheKey,
|
|
305
331
|
toResponsesTools
|
|
306
|
-
} from "./chunk-
|
|
332
|
+
} from "./chunk-NQQL2DKF.js";
|
|
307
333
|
import {
|
|
308
334
|
EMPTY_TOOL_RESULT_TEXT,
|
|
309
335
|
MAX_TOOL_IMAGES_PER_REQUEST,
|
|
@@ -316,31 +342,17 @@ import {
|
|
|
316
342
|
toolImages
|
|
317
343
|
} from "./chunk-X4O7FJF5.js";
|
|
318
344
|
import {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
} from "./chunk-
|
|
324
|
-
import {
|
|
325
|
-
extractQuotaSnapshot,
|
|
326
|
-
isCapacitySaturatedRateLimit,
|
|
327
|
-
mergeAvailabilityDeadline,
|
|
328
|
-
resolveAvailabilityAction,
|
|
329
|
-
resolveCredentialKeyWithFallback
|
|
330
|
-
} from "./chunk-QJTZ76CP.js";
|
|
331
|
-
import {
|
|
332
|
-
MCP_TOOL_NAMES
|
|
333
|
-
} from "./chunk-7NIBQ4HY.js";
|
|
334
|
-
import {
|
|
335
|
-
HIGH_RISK_MUTATION_TOOL_NAMES,
|
|
336
|
-
resolveRequestToolSurface
|
|
337
|
-
} from "./chunk-VS276URX.js";
|
|
338
|
-
import {
|
|
339
|
-
resolveAgentCallPlan
|
|
340
|
-
} from "./chunk-TWTJV35S.js";
|
|
345
|
+
resolveAgentImageInputSupport,
|
|
346
|
+
resolveCatalogImageSupport,
|
|
347
|
+
resolveToolImagePolicy,
|
|
348
|
+
withLiveImageSupport
|
|
349
|
+
} from "./chunk-IPRPYKBP.js";
|
|
341
350
|
import {
|
|
342
351
|
resolveHistoricalToolContentCap
|
|
343
352
|
} from "./chunk-WFGNWWJI.js";
|
|
353
|
+
import {
|
|
354
|
+
resolveAgentCallPlan
|
|
355
|
+
} from "./chunk-NL7J2J5Z.js";
|
|
344
356
|
import {
|
|
345
357
|
resolveAgentRequiredPackIds,
|
|
346
358
|
resolveAgentSkillConfig
|
|
@@ -358,13 +370,14 @@ import {
|
|
|
358
370
|
isCodexOAuthAgent,
|
|
359
371
|
markCodexOAuthCatalogFailure,
|
|
360
372
|
resolveCodexOAuthEffectiveModel
|
|
361
|
-
} from "./chunk-
|
|
373
|
+
} from "./chunk-ZTLTDUV6.js";
|
|
362
374
|
import {
|
|
363
375
|
isDevinOAuthAgent
|
|
364
376
|
} from "./chunk-5ZUL4CUO.js";
|
|
365
377
|
import {
|
|
366
|
-
normalizeUsage
|
|
367
|
-
|
|
378
|
+
normalizeUsage,
|
|
379
|
+
sanitizeSummarySourceSegments
|
|
380
|
+
} from "./chunk-6X3CS6NJ.js";
|
|
368
381
|
import {
|
|
369
382
|
createProviderCallTimingTracker,
|
|
370
383
|
finalizeProviderCallTiming,
|
|
@@ -425,10 +438,13 @@ import {
|
|
|
425
438
|
canonicalizeToolNames
|
|
426
439
|
} from "./chunk-6OVNSQHN.js";
|
|
427
440
|
import {
|
|
441
|
+
DIALOG_AGENT_LIST_INDEX_PREFIX,
|
|
442
|
+
TOKEN_DIALOG_INDEX_PREFIX,
|
|
428
443
|
createTokenDialogIndexKey,
|
|
429
444
|
createTokenKey,
|
|
430
445
|
createTokenStatsKey,
|
|
431
|
-
createUserKey
|
|
446
|
+
createUserKey,
|
|
447
|
+
isTokenStatsKey
|
|
432
448
|
} from "./chunk-SYTHYBMI.js";
|
|
433
449
|
import {
|
|
434
450
|
dialogMessageKey
|
|
@@ -460,14 +476,14 @@ import {
|
|
|
460
476
|
import {
|
|
461
477
|
agentRunCardLabels,
|
|
462
478
|
t
|
|
463
|
-
} from "./chunk-
|
|
479
|
+
} from "./chunk-YFRJAE3R.js";
|
|
464
480
|
import {
|
|
465
481
|
isAntigravityOAuthAgent
|
|
466
|
-
} from "./chunk-
|
|
482
|
+
} from "./chunk-LN4ZVSO7.js";
|
|
467
483
|
import {
|
|
468
484
|
buildProviderSessionHeaders,
|
|
469
485
|
resolvePlatformAuthToken
|
|
470
|
-
} from "./chunk-
|
|
486
|
+
} from "./chunk-LMFMV5UC.js";
|
|
471
487
|
import {
|
|
472
488
|
toErrorMessage
|
|
473
489
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -478,7 +494,7 @@ import {
|
|
|
478
494
|
anthropicOAuthModelMaxOutputTokens,
|
|
479
495
|
findModelConfig,
|
|
480
496
|
isAdaptiveThinkingModelId
|
|
481
|
-
} from "./chunk-
|
|
497
|
+
} from "./chunk-OJRTTERA.js";
|
|
482
498
|
import {
|
|
483
499
|
CLI_PROVIDER_VALUES,
|
|
484
500
|
isCliProvider
|
|
@@ -1255,6 +1271,57 @@ function clearCliLocalRuntimePreparedAgentCache() {
|
|
|
1255
1271
|
preparedAgentRuntimeCache.clear();
|
|
1256
1272
|
hybridStoreCache.clear();
|
|
1257
1273
|
}
|
|
1274
|
+
var SCALAR_AGENT_CONFIG_FINGERPRINT_FIELDS = [
|
|
1275
|
+
"apiSource",
|
|
1276
|
+
"customProviderUrl",
|
|
1277
|
+
"model",
|
|
1278
|
+
"name",
|
|
1279
|
+
"prompt",
|
|
1280
|
+
"provider",
|
|
1281
|
+
"revision",
|
|
1282
|
+
"updatedAt",
|
|
1283
|
+
"version"
|
|
1284
|
+
];
|
|
1285
|
+
var TOOL_LIST_FINGERPRINT_FIELDS = ["toolNames", "tools"];
|
|
1286
|
+
function extractFingerprintToolNames(raw) {
|
|
1287
|
+
if (!Array.isArray(raw)) return void 0;
|
|
1288
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1289
|
+
for (const value of raw) {
|
|
1290
|
+
const rawName = typeof value === "string" ? value : value && typeof value === "object" && !Array.isArray(value) ? typeof value.name === "string" ? value.name : value.function && typeof value.function === "object" && !Array.isArray(value.function) && typeof value.function.name === "string" ? value.function.name : "" : "";
|
|
1291
|
+
const trimmed = rawName.trim();
|
|
1292
|
+
if (trimmed) seen.add(trimmed);
|
|
1293
|
+
}
|
|
1294
|
+
return [...seen].sort((a, b) => a.localeCompare(b));
|
|
1295
|
+
}
|
|
1296
|
+
function buildLocalAgentConfigFingerprint(source) {
|
|
1297
|
+
const record = source && typeof source === "object" ? source : null;
|
|
1298
|
+
const payload = {
|
|
1299
|
+
skillPolicy: Object.entries(resolveAgentSkillConfig(record)).sort(
|
|
1300
|
+
([a], [b]) => a.localeCompare(b)
|
|
1301
|
+
)
|
|
1302
|
+
};
|
|
1303
|
+
if (record) {
|
|
1304
|
+
for (const field of SCALAR_AGENT_CONFIG_FINGERPRINT_FIELDS) {
|
|
1305
|
+
if (!Object.prototype.hasOwnProperty.call(record, field)) continue;
|
|
1306
|
+
const value = record[field];
|
|
1307
|
+
if (typeof value === "string" || typeof value === "number" && Number.isFinite(value) || typeof value === "boolean") {
|
|
1308
|
+
payload[field] = value;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
for (const field of TOOL_LIST_FINGERPRINT_FIELDS) {
|
|
1312
|
+
if (!Object.prototype.hasOwnProperty.call(record, field)) continue;
|
|
1313
|
+
const names = extractFingerprintToolNames(record[field]);
|
|
1314
|
+
if (names !== void 0) {
|
|
1315
|
+
payload[field] = names;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
const ordered = {};
|
|
1320
|
+
for (const key of Object.keys(payload).sort((a, b) => a.localeCompare(b))) {
|
|
1321
|
+
ordered[key] = payload[key];
|
|
1322
|
+
}
|
|
1323
|
+
return JSON.stringify(ordered);
|
|
1324
|
+
}
|
|
1258
1325
|
async function defaultLocalRuntimeDb() {
|
|
1259
1326
|
return getDefaultCliLocalRuntimeDb();
|
|
1260
1327
|
}
|
|
@@ -1311,44 +1378,6 @@ var REGISTRY_INJECTED_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
1311
1378
|
"read_xhs_profile"
|
|
1312
1379
|
]);
|
|
1313
1380
|
|
|
1314
|
-
// packages/agent-runtime/agentRunIsolation.ts
|
|
1315
|
-
var ORCHESTRATION_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1316
|
-
"startAgentRun",
|
|
1317
|
-
"controlAgentRun",
|
|
1318
|
-
"listAgents",
|
|
1319
|
-
"readAgent",
|
|
1320
|
-
"runStreamingAgent"
|
|
1321
|
-
]);
|
|
1322
|
-
var INTERACTION_REQUIRED_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1323
|
-
"ask_user",
|
|
1324
|
-
// 凭据请求:需要宿主交互面板(Block 1a);desktop 无通道时同 ask_user 剥离。
|
|
1325
|
-
"secret-request"
|
|
1326
|
-
]);
|
|
1327
|
-
var SELF_MUTATION_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1328
|
-
"updateSelf",
|
|
1329
|
-
"updateAgent"
|
|
1330
|
-
]);
|
|
1331
|
-
var SUBTASK_REMOVED_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1332
|
-
...ORCHESTRATION_TOOL_NAMES,
|
|
1333
|
-
...INTERACTION_REQUIRED_TOOL_NAMES,
|
|
1334
|
-
...SELF_MUTATION_TOOL_NAMES
|
|
1335
|
-
]);
|
|
1336
|
-
function isSubtaskRun(env) {
|
|
1337
|
-
if (!env) return false;
|
|
1338
|
-
const value = env.NOLO_AGENT_RUN_CHILD;
|
|
1339
|
-
return typeof value === "string" && value.length > 0 && value !== "0";
|
|
1340
|
-
}
|
|
1341
|
-
var RUN_WAKE_CHANNEL_ENV = "NOLO_RUN_WAKE";
|
|
1342
|
-
function hasRunWakeChannel(env) {
|
|
1343
|
-
if (!env) return false;
|
|
1344
|
-
const value = env[RUN_WAKE_CHANNEL_ENV];
|
|
1345
|
-
return typeof value === "string" && value.length > 0 && value !== "0";
|
|
1346
|
-
}
|
|
1347
|
-
function filterToolNamesForRunKind(toolNames, isSubtask) {
|
|
1348
|
-
if (!isSubtask) return [...toolNames];
|
|
1349
|
-
return toolNames.filter((name) => !SUBTASK_REMOVED_TOOL_NAMES.has(name));
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
1381
|
// packages/cli/client/localRuntimeTools.ts
|
|
1353
1382
|
var CLI_CHROME_CONNECTOR_TOOL_NAME_SET = new Set(
|
|
1354
1383
|
CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES
|
|
@@ -2464,7 +2493,7 @@ var resolveCliProviderTransport = async (ctx) => {
|
|
|
2464
2493
|
import { createHash } from "node:crypto";
|
|
2465
2494
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
2466
2495
|
var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
|
|
2467
|
-
var CODEX_CLIENT_VERSION = "0.
|
|
2496
|
+
var CODEX_CLIENT_VERSION = "0.169.0";
|
|
2468
2497
|
var CODEX_ORIGINATOR = "codex_cli_rs";
|
|
2469
2498
|
var CODEX_OPENAI_BETA = "responses=experimental";
|
|
2470
2499
|
var OPENAI_AUTH_CLAIM = "https://api.openai.com/auth";
|
|
@@ -5099,11 +5128,120 @@ function hasReservedBatchAuthority(metadata) {
|
|
|
5099
5128
|
(field) => key === field || key.startsWith(`${field}.`) || key === `metadata.${field}` || key.startsWith(`metadata.${field}.`)
|
|
5100
5129
|
));
|
|
5101
5130
|
}
|
|
5131
|
+
var LOCAL_ONLY_EVIDENCE_KEY_PREFIXES = [
|
|
5132
|
+
`${TOKEN_DIALOG_INDEX_PREFIX}-`,
|
|
5133
|
+
`${DIALOG_AGENT_LIST_INDEX_PREFIX}-`,
|
|
5134
|
+
"idx-tokendlg-backfill-",
|
|
5135
|
+
"token-charge-stats-",
|
|
5136
|
+
"usage-backup-"
|
|
5137
|
+
];
|
|
5138
|
+
function isRemoteDialogEvidenceExcludedKey(key) {
|
|
5139
|
+
if (!key) return true;
|
|
5140
|
+
if (isTokenStatsKey(key)) return true;
|
|
5141
|
+
return LOCAL_ONLY_EVIDENCE_KEY_PREFIXES.some(
|
|
5142
|
+
(prefix) => key.startsWith(prefix)
|
|
5143
|
+
);
|
|
5144
|
+
}
|
|
5145
|
+
var MAX_REMOTE_ERROR_DETAIL_CHARS = 120;
|
|
5146
|
+
var SAFE_SHORT_ERROR_CODE_RE = /^[A-Za-z0-9_.:-]{1,48}$/;
|
|
5147
|
+
function sanitizeRemoteDiagnosticText(raw) {
|
|
5148
|
+
const singleLine = raw.replace(/\u001b\[[0-9;?]*[ -/]*[@-~]/g, " ").replace(/[\u0000-\u001f\u007f]+/g, " ").replace(/\s+/g, " ").trim();
|
|
5149
|
+
if (!singleLine) return "";
|
|
5150
|
+
return singleLine.replace(/\bBearer\s+[A-Za-z0-9._~+/=-]{6,}/gi, "Bearer [REDACTED]").replace(/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]+)?/g, "[REDACTED]").replace(/\b(?:sk|rk|pk|nolo|tok)_[A-Za-z0-9_-]{8,}/gi, "[REDACTED]").replace(/\bvault-cred-[A-Za-z0-9_-]+/gi, "[REDACTED]");
|
|
5151
|
+
}
|
|
5152
|
+
function clampSingleLine(text, maxLen) {
|
|
5153
|
+
if (text.length <= maxLen) return text;
|
|
5154
|
+
if (maxLen <= 3) return text.slice(0, maxLen);
|
|
5155
|
+
return `${text.slice(0, maxLen - 3)}...`;
|
|
5156
|
+
}
|
|
5157
|
+
function extractSafeRemoteErrorDetail(status, bodyText) {
|
|
5158
|
+
if (status < 400 || status >= 500 || !bodyText) return "";
|
|
5159
|
+
let parsed;
|
|
5160
|
+
try {
|
|
5161
|
+
parsed = JSON.parse(bodyText);
|
|
5162
|
+
} catch {
|
|
5163
|
+
return "";
|
|
5164
|
+
}
|
|
5165
|
+
if (!isRecord(parsed)) return "";
|
|
5166
|
+
const rawCodeCandidates = [
|
|
5167
|
+
parsed.code,
|
|
5168
|
+
isRecord(parsed.error) ? parsed.error.code : void 0,
|
|
5169
|
+
typeof parsed.error === "string" ? parsed.error : void 0,
|
|
5170
|
+
parsed.reason
|
|
5171
|
+
];
|
|
5172
|
+
let code = "";
|
|
5173
|
+
let fallbackMessageFromError = "";
|
|
5174
|
+
for (const candidate of rawCodeCandidates) {
|
|
5175
|
+
if (typeof candidate !== "string") continue;
|
|
5176
|
+
const cleaned = sanitizeRemoteDiagnosticText(candidate);
|
|
5177
|
+
if (!cleaned) continue;
|
|
5178
|
+
if (SAFE_SHORT_ERROR_CODE_RE.test(cleaned)) {
|
|
5179
|
+
code = cleaned;
|
|
5180
|
+
break;
|
|
5181
|
+
}
|
|
5182
|
+
if (!fallbackMessageFromError) {
|
|
5183
|
+
fallbackMessageFromError = cleaned;
|
|
5184
|
+
}
|
|
5185
|
+
}
|
|
5186
|
+
const rawMessageCandidates = [
|
|
5187
|
+
parsed.message,
|
|
5188
|
+
isRecord(parsed.error) ? parsed.error.message : void 0,
|
|
5189
|
+
fallbackMessageFromError
|
|
5190
|
+
];
|
|
5191
|
+
let message = "";
|
|
5192
|
+
for (const candidate of rawMessageCandidates) {
|
|
5193
|
+
if (typeof candidate !== "string") continue;
|
|
5194
|
+
const cleaned = sanitizeRemoteDiagnosticText(candidate);
|
|
5195
|
+
if (cleaned && cleaned !== code) {
|
|
5196
|
+
message = cleaned;
|
|
5197
|
+
break;
|
|
5198
|
+
}
|
|
5199
|
+
}
|
|
5200
|
+
if (!code && !message) return "";
|
|
5201
|
+
const payload = {};
|
|
5202
|
+
if (code) payload.code = code;
|
|
5203
|
+
if (message) payload.message = message;
|
|
5204
|
+
let serialized = JSON.stringify(payload);
|
|
5205
|
+
if (serialized.length <= MAX_REMOTE_ERROR_DETAIL_CHARS) {
|
|
5206
|
+
return serialized;
|
|
5207
|
+
}
|
|
5208
|
+
if (code && message) {
|
|
5209
|
+
const baseLen = JSON.stringify({ code, message: "" }).length;
|
|
5210
|
+
const budget = MAX_REMOTE_ERROR_DETAIL_CHARS - baseLen;
|
|
5211
|
+
if (budget >= 8) {
|
|
5212
|
+
serialized = JSON.stringify({
|
|
5213
|
+
code,
|
|
5214
|
+
message: clampSingleLine(message, budget)
|
|
5215
|
+
});
|
|
5216
|
+
if (serialized.length <= MAX_REMOTE_ERROR_DETAIL_CHARS) return serialized;
|
|
5217
|
+
}
|
|
5218
|
+
serialized = JSON.stringify({ code });
|
|
5219
|
+
return serialized.length <= MAX_REMOTE_ERROR_DETAIL_CHARS ? serialized : clampSingleLine(serialized, MAX_REMOTE_ERROR_DETAIL_CHARS);
|
|
5220
|
+
}
|
|
5221
|
+
if (message) {
|
|
5222
|
+
const baseLen = JSON.stringify({ message: "" }).length;
|
|
5223
|
+
const budget = MAX_REMOTE_ERROR_DETAIL_CHARS - baseLen;
|
|
5224
|
+
return budget > 0 ? JSON.stringify({ message: clampSingleLine(message, budget) }) : "";
|
|
5225
|
+
}
|
|
5226
|
+
return clampSingleLine(serialized, MAX_REMOTE_ERROR_DETAIL_CHARS);
|
|
5227
|
+
}
|
|
5102
5228
|
function prepareRemoteDialogEvidenceRecord(key, value, options) {
|
|
5103
5229
|
const record = isRecord(value) ? { ...value } : {};
|
|
5104
|
-
if (key.includes("-msg-") && typeof record.type !== "string") {
|
|
5230
|
+
if (key.includes("-msg-") && (typeof record.type !== "string" || !record.type.trim() || record.type === "message")) {
|
|
5105
5231
|
record.type = "msg";
|
|
5106
5232
|
}
|
|
5233
|
+
if (key.startsWith("token-") && !isTokenStatsKey(key)) {
|
|
5234
|
+
if (typeof record.type !== "string" || !record.type.trim()) {
|
|
5235
|
+
record.type = "token";
|
|
5236
|
+
}
|
|
5237
|
+
const hasAgentId = typeof record.agentId === "string" && record.agentId.trim().length > 0;
|
|
5238
|
+
const hasCybotId = typeof record.cybotId === "string" && record.cybotId.trim().length > 0;
|
|
5239
|
+
const fallbackAgent = asOptionalTrimmedString(options?.fallbackAgentKey);
|
|
5240
|
+
if (!hasAgentId && !hasCybotId && fallbackAgent) {
|
|
5241
|
+
record.agentId = fallbackAgent;
|
|
5242
|
+
record.cybotId = fallbackAgent;
|
|
5243
|
+
}
|
|
5244
|
+
}
|
|
5107
5245
|
const metadata = record.metadata;
|
|
5108
5246
|
if (key.includes("-msg-") && record.role === "user" && isRecord(metadata) && metadata.queueState === "accepted" && (metadata.cliBatchPhase === "requested" || metadata.cliBatchPhase === "completed" || typeof metadata.cliBatchId === "string" && metadata.cliBatchId.length > 0 || options?.isAcceptedBatchMember === true) && !hasReservedBatchAuthority(metadata)) {
|
|
5109
5247
|
const { queueState: _localQueueState, ...evidenceMetadata } = metadata;
|
|
@@ -5242,6 +5380,7 @@ async function postRemoteRecord(args) {
|
|
|
5242
5380
|
customKey: args.key,
|
|
5243
5381
|
userId: args.userId,
|
|
5244
5382
|
data: prepareRemoteDialogEvidenceRecord(args.key, args.data, {
|
|
5383
|
+
fallbackAgentKey: args.fallbackAgentKey,
|
|
5245
5384
|
isAcceptedBatchMember: args.isAcceptedBatchMember
|
|
5246
5385
|
})
|
|
5247
5386
|
}),
|
|
@@ -5260,8 +5399,9 @@ async function postRemoteRecord(args) {
|
|
|
5260
5399
|
);
|
|
5261
5400
|
if (!response.ok) {
|
|
5262
5401
|
const text = await response.text().catch(() => "");
|
|
5402
|
+
const detail = extractSafeRemoteErrorDetail(response.status, text);
|
|
5263
5403
|
throw new Error(
|
|
5264
|
-
`remote dialog evidence write failed: HTTP ${response.status} ${
|
|
5404
|
+
detail ? `remote dialog evidence write failed: HTTP ${response.status} ${detail}` : `remote dialog evidence write failed: HTTP ${response.status}`
|
|
5265
5405
|
);
|
|
5266
5406
|
}
|
|
5267
5407
|
}
|
|
@@ -5336,8 +5476,9 @@ async function maybeWakeParentDialogAfterLocalSync(args) {
|
|
|
5336
5476
|
});
|
|
5337
5477
|
if (!wakeResponse.ok) {
|
|
5338
5478
|
const text = await wakeResponse.text().catch(() => "");
|
|
5479
|
+
const detail = extractSafeRemoteErrorDetail(wakeResponse.status, text);
|
|
5339
5480
|
throw new Error(
|
|
5340
|
-
`parent dialog wake failed: HTTP ${wakeResponse.status} ${
|
|
5481
|
+
detail ? `parent dialog wake failed: HTTP ${wakeResponse.status} ${detail}` : `parent dialog wake failed: HTTP ${wakeResponse.status}`
|
|
5341
5482
|
);
|
|
5342
5483
|
}
|
|
5343
5484
|
const notifiedAt = Date.now();
|
|
@@ -5362,13 +5503,14 @@ async function maybeWakeParentDialogAfterLocalSync(args) {
|
|
|
5362
5503
|
async function syncLocalDialogEvidenceToRemote(args) {
|
|
5363
5504
|
const serverUrl = resolveRuntimeServerUrl(args.env);
|
|
5364
5505
|
const authToken = resolveRuntimeAuthToken(args.env);
|
|
5365
|
-
if (!serverUrl || !authToken) {
|
|
5506
|
+
if (!serverUrl || !authToken || args.userId === "local") {
|
|
5366
5507
|
return { attempted: false };
|
|
5367
5508
|
}
|
|
5368
5509
|
const orderedOps = [];
|
|
5369
5510
|
const nonMsgOps = [];
|
|
5370
5511
|
for (const op of args.ops) {
|
|
5371
5512
|
if (op.type !== "put") continue;
|
|
5513
|
+
if (isRemoteDialogEvidenceExcludedKey(op.key)) continue;
|
|
5372
5514
|
if (op.key.includes("-msg-")) {
|
|
5373
5515
|
orderedOps.push(op);
|
|
5374
5516
|
} else {
|
|
@@ -5377,11 +5519,13 @@ async function syncLocalDialogEvidenceToRemote(args) {
|
|
|
5377
5519
|
}
|
|
5378
5520
|
orderedOps.push(...nonMsgOps);
|
|
5379
5521
|
const acceptedBatchKeys = await collectAcceptedUserBatchMessageKeys(orderedOps, args.localStore);
|
|
5522
|
+
const fallbackAgentKey = asOptionalTrimmedString(args.input?.agentKey);
|
|
5380
5523
|
await runThrottledBatches(
|
|
5381
5524
|
orderedOps.filter((op) => op.type === "put"),
|
|
5382
5525
|
(op) => postRemoteRecord({
|
|
5383
5526
|
authToken,
|
|
5384
5527
|
data: op.value,
|
|
5528
|
+
fallbackAgentKey,
|
|
5385
5529
|
fetchImpl: args.fetchImpl,
|
|
5386
5530
|
isAcceptedBatchMember: acceptedBatchKeys.has(op.key),
|
|
5387
5531
|
key: op.key,
|
|
@@ -5390,9 +5534,7 @@ async function syncLocalDialogEvidenceToRemote(args) {
|
|
|
5390
5534
|
}),
|
|
5391
5535
|
args.sleep ? { sleep: args.sleep } : {}
|
|
5392
5536
|
);
|
|
5393
|
-
const childDialogOp =
|
|
5394
|
-
(op) => op.type === "put" && !op.key.includes("-msg-")
|
|
5395
|
-
);
|
|
5537
|
+
const childDialogOp = nonMsgOps.find((op) => op.key.startsWith("dialog-")) ?? nonMsgOps[0];
|
|
5396
5538
|
const childDialogRecord = childDialogOp?.value && typeof childDialogOp.value === "object" ? childDialogOp.value : null;
|
|
5397
5539
|
if (childDialogOp && childDialogRecord) {
|
|
5398
5540
|
try {
|
|
@@ -6309,7 +6451,7 @@ function buildServerPlatformToolExecutors(args) {
|
|
|
6309
6451
|
const shortHash = (value, len) => createHash2("sha256").update(value).digest("hex").slice(0, len);
|
|
6310
6452
|
const localMemoryContext = async () => {
|
|
6311
6453
|
const openCliLocalRuntimeDb = async () => {
|
|
6312
|
-
const { getDefaultCliLocalRuntimeDb: getDefaultCliLocalRuntimeDb2 } = await import("./localRuntimeDb-
|
|
6454
|
+
const { getDefaultCliLocalRuntimeDb: getDefaultCliLocalRuntimeDb2 } = await import("./localRuntimeDb-5WZ4RJJO.js");
|
|
6313
6455
|
return getDefaultCliLocalRuntimeDb2({ env: args.env });
|
|
6314
6456
|
};
|
|
6315
6457
|
try {
|
|
@@ -6400,6 +6542,40 @@ function buildServerPlatformToolExecutors(args) {
|
|
|
6400
6542
|
const writeLocalMemory = async (input) => {
|
|
6401
6543
|
const ctx = await localMemoryContext();
|
|
6402
6544
|
if (!ctx) return false;
|
|
6545
|
+
if (input.topicKey) {
|
|
6546
|
+
const { normalizeTopicKey, rememberExplicitVNext } = await import("./rememberExplicit-CPAPONSI.js");
|
|
6547
|
+
const topicKey = normalizeTopicKey(input.topicKey);
|
|
6548
|
+
if (topicKey) {
|
|
6549
|
+
const now = input.createdAt || (/* @__PURE__ */ new Date()).toISOString();
|
|
6550
|
+
const kind = ["episodic", "semantic", "procedural"].includes(input.kind) ? input.kind : "episodic";
|
|
6551
|
+
const validSubjectTypes = ["user", "agent", "space", "project", "system"];
|
|
6552
|
+
const hasValidSubject = typeof input.subjectType === "string" && validSubjectTypes.includes(input.subjectType) && typeof input.subjectId === "string" && input.subjectId.trim().length > 0;
|
|
6553
|
+
const trimmedAgentKey = args.agentKey?.trim() || "";
|
|
6554
|
+
const useAgentSubject = (input.scope ?? "auto") === "auto" && Boolean(trimmedAgentKey);
|
|
6555
|
+
const subjectType = hasValidSubject ? input.subjectType : useAgentSubject ? "agent" : "user";
|
|
6556
|
+
const subjectId = hasValidSubject ? input.subjectId.trim() : useAgentSubject ? trimmedAgentKey : ctx.userId;
|
|
6557
|
+
await rememberExplicitVNext(ctx.db, {
|
|
6558
|
+
id: "",
|
|
6559
|
+
ownerType: "user",
|
|
6560
|
+
ownerId: ctx.userId,
|
|
6561
|
+
visibility: "private",
|
|
6562
|
+
subjectType,
|
|
6563
|
+
subjectId,
|
|
6564
|
+
kind,
|
|
6565
|
+
content: input.content,
|
|
6566
|
+
createdAt: now,
|
|
6567
|
+
lastActivatedAt: now,
|
|
6568
|
+
activationCount: 0,
|
|
6569
|
+
importance: kind === "procedural" ? 0.88 : 0.82,
|
|
6570
|
+
confidence: input.confidence,
|
|
6571
|
+
...input.tags?.length ? { tags: input.tags } : {},
|
|
6572
|
+
...input.provenance === "verified" || input.provenance === "stated" || input.provenance === "inferred" ? { provenance: input.provenance } : {},
|
|
6573
|
+
...input.sourceKind === "explicit-user-directive" || input.sourceKind === "agent-tool" || input.sourceKind === "inferred-understanding" || input.sourceKind === "dialog-learning" ? { sourceKind: input.sourceKind } : {},
|
|
6574
|
+
topicKey
|
|
6575
|
+
});
|
|
6576
|
+
return true;
|
|
6577
|
+
}
|
|
6578
|
+
}
|
|
6403
6579
|
const [{ putMemoryEntityVNext, putMemoryStateVNext, putMemoryEvidenceVNext }, { buildLegacyMemoryEvidence }] = await Promise.all([
|
|
6404
6580
|
import("./store-Z53ICFL3.js"),
|
|
6405
6581
|
import("./legacyMigration-TF4SYJCZ.js")
|
|
@@ -6526,10 +6702,10 @@ function buildServerPlatformToolExecutors(args) {
|
|
|
6526
6702
|
}
|
|
6527
6703
|
const ctx = await localMemoryContext();
|
|
6528
6704
|
if (!ctx) throw new Error("local work memory unavailable");
|
|
6529
|
-
const { resolveLocalUserId: resolveLocalUserId2 } = await import("./cliAgentConfigHelpers-
|
|
6705
|
+
const { resolveLocalUserId: resolveLocalUserId2 } = await import("./cliAgentConfigHelpers-RFR7ZCSK.js");
|
|
6530
6706
|
const localUserId = resolveLocalUserId2(args.env);
|
|
6531
6707
|
const { resolveWorkContextAccess } = await import("./workContextAccess-UZHDLBUR.js");
|
|
6532
|
-
const { updateWorkContext, readWorkContexts } = await import("./workContext-
|
|
6708
|
+
const { updateWorkContext, readWorkContexts } = await import("./workContext-Y3ADAPZU.js");
|
|
6533
6709
|
const { scope, sourceRef } = await resolveWorkContextAccess(ctx.db, localUserId, dialogId, write ? userMessageId : void 0);
|
|
6534
6710
|
if (scope.spaceId) throw new Error("local work memory cannot verify space membership");
|
|
6535
6711
|
const result = write ? await updateWorkContext(ctx.db, scope, { ...payload.activityId !== void 0 ? { activityId: payload.activityId, expectedRevision: payload.expectedRevision } : { itemKey: payload.itemKey, originRef: sourceRef }, changeId: payload.changeId, sourceRefs: [sourceRef], patch: payload.patch }) : await readWorkContexts(ctx.db, scope, payload);
|
|
@@ -6596,6 +6772,24 @@ function buildServerPlatformToolExecutors(args) {
|
|
|
6596
6772
|
if (typeof parsed.recurrenceEvidence === "string" && parsed.recurrenceEvidence.trim()) {
|
|
6597
6773
|
body.recurrenceEvidence = parsed.recurrenceEvidence.trim();
|
|
6598
6774
|
}
|
|
6775
|
+
if (parsed.topicKey !== void 0 && parsed.topicKey !== null) {
|
|
6776
|
+
if (typeof parsed.topicKey !== "string") {
|
|
6777
|
+
return {
|
|
6778
|
+
content: JSON.stringify({ error: "rememberMemory: topicKey must be a string" }),
|
|
6779
|
+
metadata: { serverPlatformTool: true, memoryWrite: false }
|
|
6780
|
+
};
|
|
6781
|
+
}
|
|
6782
|
+
const { normalizeTopicKey } = await import("./rememberExplicit-CPAPONSI.js");
|
|
6783
|
+
try {
|
|
6784
|
+
const normalizedTopicKey = normalizeTopicKey(parsed.topicKey);
|
|
6785
|
+
if (normalizedTopicKey) body.topicKey = normalizedTopicKey;
|
|
6786
|
+
} catch (err) {
|
|
6787
|
+
return {
|
|
6788
|
+
content: JSON.stringify({ error: err?.message ?? "invalid topicKey" }),
|
|
6789
|
+
metadata: { serverPlatformTool: true, memoryWrite: false }
|
|
6790
|
+
};
|
|
6791
|
+
}
|
|
6792
|
+
}
|
|
6599
6793
|
if (args.agentKey) body.agentKey = args.agentKey;
|
|
6600
6794
|
const raw = await postServer("/api/memory/remember", body, {
|
|
6601
6795
|
retryTransient: true
|
|
@@ -6608,6 +6802,10 @@ function buildServerPlatformToolExecutors(args) {
|
|
|
6608
6802
|
} catch {
|
|
6609
6803
|
}
|
|
6610
6804
|
const saved = Array.isArray(serverResult?.savedItems) ? serverResult.savedItems[0] : null;
|
|
6805
|
+
const resolvedTopicKey = typeof saved?.topicKey === "string" ? saved.topicKey : typeof body.topicKey === "string" ? body.topicKey : void 0;
|
|
6806
|
+
const validSubjectTypes = ["user", "agent", "space", "project", "system"];
|
|
6807
|
+
const savedSubjectType = typeof saved?.subjectType === "string" && validSubjectTypes.includes(saved.subjectType) ? saved.subjectType : void 0;
|
|
6808
|
+
const savedSubjectId = typeof saved?.subjectId === "string" && saved.subjectId.trim() ? saved.subjectId.trim() : void 0;
|
|
6611
6809
|
localSaved = await writeLocalMemory({
|
|
6612
6810
|
content: typeof saved?.content === "string" && saved.content.trim() ? saved.content : content,
|
|
6613
6811
|
kind: String(saved?.kind ?? serverResult?.savedKind ?? body.kind ?? "episodic"),
|
|
@@ -6615,7 +6813,10 @@ function buildServerPlatformToolExecutors(args) {
|
|
|
6615
6813
|
confidence: typeof saved?.confidence === "number" ? saved.confidence : 0.8,
|
|
6616
6814
|
provenance: typeof saved?.provenance === "string" ? saved.provenance : void 0,
|
|
6617
6815
|
sourceKind: typeof saved?.sourceKind === "string" ? saved.sourceKind : void 0,
|
|
6618
|
-
tags: Array.isArray(saved?.tags) ? saved.tags.map(String) : void 0
|
|
6816
|
+
tags: Array.isArray(saved?.tags) ? saved.tags.map(String) : void 0,
|
|
6817
|
+
scope: typeof body.scope === "string" ? body.scope : "auto",
|
|
6818
|
+
...savedSubjectType && savedSubjectId ? { subjectType: savedSubjectType, subjectId: savedSubjectId } : {},
|
|
6819
|
+
...resolvedTopicKey ? { topicKey: resolvedTopicKey } : {}
|
|
6619
6820
|
});
|
|
6620
6821
|
} catch {
|
|
6621
6822
|
}
|
|
@@ -12111,8 +12312,8 @@ async function createLocalDockerWorkload(args) {
|
|
|
12111
12312
|
}
|
|
12112
12313
|
const createLifecycle = args.createLifecycle ?? (async () => {
|
|
12113
12314
|
const [{ DockerWorkloadLifecycle, createDockerBindingAuthorizer }, accounts] = await Promise.all([
|
|
12114
|
-
import("./workloadLifecycle-
|
|
12115
|
-
import("./accountResolver-
|
|
12315
|
+
import("./workloadLifecycle-HFJIN5IZ.js"),
|
|
12316
|
+
import("./accountResolver-QETKNC7T.js")
|
|
12116
12317
|
]);
|
|
12117
12318
|
const resolveAccount = args.resolveAccount ?? accounts.createDockerAccountResolver({
|
|
12118
12319
|
env: args.env,
|
|
@@ -14296,14 +14497,26 @@ async function writeDialog(args) {
|
|
|
14296
14497
|
existingDialog,
|
|
14297
14498
|
cwd: args.cwd
|
|
14298
14499
|
});
|
|
14299
|
-
|
|
14300
|
-
|
|
14301
|
-
const
|
|
14302
|
-
|
|
14303
|
-
|
|
14304
|
-
|
|
14500
|
+
const prefetchedUserMessages = /* @__PURE__ */ new Map();
|
|
14501
|
+
if (plan.captureUserMessageIds.length > 0) {
|
|
14502
|
+
const captureEntries = plan.captureUserMessageIds.map((id) => ({
|
|
14503
|
+
id,
|
|
14504
|
+
op: plan.ops.find((op) => op.value.id === id && op.value.role === "user")
|
|
14505
|
+
}));
|
|
14506
|
+
const uniqueKeys = [...new Set(captureEntries.map((entry) => entry.op.key))];
|
|
14507
|
+
const readResults = await Promise.all(
|
|
14508
|
+
uniqueKeys.map(async (key) => [key, await args.store.read(key, { remote: false })])
|
|
14509
|
+
);
|
|
14510
|
+
const existingByKey = new Map(readResults);
|
|
14511
|
+
for (const { id, op } of captureEntries) {
|
|
14512
|
+
const existing = existingByKey.get(op.key);
|
|
14513
|
+
if (existing) {
|
|
14514
|
+
if (existing.id !== id || existing.dialogId !== plan.dialogId || existing.userId !== args.userId || existing.role !== "user" || JSON.stringify(existing.content) !== JSON.stringify(op.value.content)) {
|
|
14515
|
+
throw new Error("CLI persisted turn source conflict");
|
|
14516
|
+
}
|
|
14517
|
+
op.value = existing;
|
|
14305
14518
|
}
|
|
14306
|
-
op.value
|
|
14519
|
+
prefetchedUserMessages.set(op.key, op.value);
|
|
14307
14520
|
}
|
|
14308
14521
|
}
|
|
14309
14522
|
const lastInputTokens = extractLastProviderInputTokens(args.input) ?? (typeof existingDialog?.lastInputTokens === "number" && Number.isFinite(existingDialog.lastInputTokens) && existingDialog.lastInputTokens > 0 ? existingDialog.lastInputTokens : void 0);
|
|
@@ -14323,9 +14536,12 @@ async function writeDialog(args) {
|
|
|
14323
14536
|
source: "cli-local"
|
|
14324
14537
|
});
|
|
14325
14538
|
if (args.cliBatchCompletion) {
|
|
14326
|
-
|
|
14327
|
-
|
|
14328
|
-
|
|
14539
|
+
const completionOps = await Promise.all(
|
|
14540
|
+
args.cliBatchCompletion.batchIds.map(
|
|
14541
|
+
(batchId) => buildCliBatchCompletionOp(args.store, plan.dialogId, batchId)
|
|
14542
|
+
)
|
|
14543
|
+
);
|
|
14544
|
+
plan.ops.push(...completionOps);
|
|
14329
14545
|
}
|
|
14330
14546
|
await args.store.batch(plan.ops);
|
|
14331
14547
|
if (__perfEnabled) {
|
|
@@ -14366,7 +14582,7 @@ async function writeDialog(args) {
|
|
|
14366
14582
|
dialogId: plan.dialogId,
|
|
14367
14583
|
userId: args.userId,
|
|
14368
14584
|
persistedUserMessageIds: plan.captureUserMessageIds,
|
|
14369
|
-
read: (key) => args.store.read(key, { remote: false })
|
|
14585
|
+
read: (key) => prefetchedUserMessages.has(key) ? Promise.resolve(prefetchedUserMessages.get(key)) : args.store.read(key, { remote: false })
|
|
14370
14586
|
}).catch(() => []);
|
|
14371
14587
|
const syncAndCapture = async (fetchImpl) => {
|
|
14372
14588
|
try {
|
|
@@ -14451,12 +14667,14 @@ async function loadCliDialogSummary(args) {
|
|
|
14451
14667
|
const sourceHash = record.sourceHash;
|
|
14452
14668
|
const sourceCount = record.sourceCount;
|
|
14453
14669
|
const schemaVersion = record.schemaVersion;
|
|
14670
|
+
const sourceSegments = sanitizeSummarySourceSegments(record.sourceSegments);
|
|
14454
14671
|
return {
|
|
14455
14672
|
summary,
|
|
14456
14673
|
...typeof summarizedBeforeId === "string" && summarizedBeforeId ? { summarizedBeforeId } : {},
|
|
14457
14674
|
...typeof sourceHash === "string" && sourceHash ? { sourceHash } : {},
|
|
14458
14675
|
...typeof sourceCount === "number" && sourceCount > 0 ? { sourceCount } : {},
|
|
14459
14676
|
..."schemaVersion" in record ? { schemaVersion } : {},
|
|
14677
|
+
...sourceSegments ? { sourceSegments } : {},
|
|
14460
14678
|
...Array.isArray(record.referenceKeys) ? { referenceKeys: record.referenceKeys.filter((key) => typeof key === "string") } : {}
|
|
14461
14679
|
};
|
|
14462
14680
|
}
|
|
@@ -14465,6 +14683,7 @@ async function saveCliDialogSummary(args) {
|
|
|
14465
14683
|
const existing = await args.store.read(dialogKey) ?? {};
|
|
14466
14684
|
const bareId = typeof existing.id === "string" && existing.id ? existing.id : args.dialogId.startsWith("dialog-") ? dialogIdFromKey(dialogKey) : args.dialogId;
|
|
14467
14685
|
const compressionCount = typeof existing.compressionCount === "number" ? existing.compressionCount + 1 : 1;
|
|
14686
|
+
const sanitizedSourceSegments = sanitizeSummarySourceSegments(args.sourceSegments);
|
|
14468
14687
|
await registerDialogOwner({
|
|
14469
14688
|
store: { get: (key) => args.store.read(key, { remote: false }), put: (key, value) => args.store.write(key, value) },
|
|
14470
14689
|
dialogId: bareId,
|
|
@@ -14482,6 +14701,7 @@ async function saveCliDialogSummary(args) {
|
|
|
14482
14701
|
...args.sourceHash !== void 0 ? { sourceHash: args.sourceHash } : {},
|
|
14483
14702
|
...args.sourceCount !== void 0 ? { sourceCount: args.sourceCount } : {},
|
|
14484
14703
|
...args.schemaVersion !== void 0 ? { schemaVersion: args.schemaVersion } : {},
|
|
14704
|
+
...sanitizedSourceSegments !== void 0 ? { sourceSegments: sanitizedSourceSegments } : {},
|
|
14485
14705
|
referenceKeys: Array.from(/* @__PURE__ */ new Set([
|
|
14486
14706
|
...Array.isArray(existing.referenceKeys) ? existing.referenceKeys.filter((key) => typeof key === "string") : [],
|
|
14487
14707
|
...args.referenceKeys ?? []
|
|
@@ -14940,7 +15160,7 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
14940
15160
|
emitRunIsolationNotice(fact, { runId });
|
|
14941
15161
|
try {
|
|
14942
15162
|
const { writeFileSync: writeFileSync4, mkdirSync: mkdirSync4 } = await import("node:fs");
|
|
14943
|
-
const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-
|
|
15163
|
+
const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-CO6BASZF.js");
|
|
14944
15164
|
recordLocalRunExecutionIsolation({
|
|
14945
15165
|
runId,
|
|
14946
15166
|
runsDir: resolveRunsDir2(deps.env),
|
|
@@ -14965,7 +15185,7 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
14965
15185
|
dockerWorkloadReleased = true;
|
|
14966
15186
|
dockerWorkloadLoad = null;
|
|
14967
15187
|
if (loaded) {
|
|
14968
|
-
const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-
|
|
15188
|
+
const { resolveRunsDir: resolveRunsDir2 } = await import("./agentRunControl-CO6BASZF.js");
|
|
14969
15189
|
const exportRunDiff = deps.exportDockerRunDiffArtifact ?? exportDockerRunDiffArtifact;
|
|
14970
15190
|
const warn = (message) => process.stderr.write(`[nolo] ${message}
|
|
14971
15191
|
`);
|
|
@@ -15046,7 +15266,6 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
15046
15266
|
}
|
|
15047
15267
|
};
|
|
15048
15268
|
let runtimeToolExecutionLimits = {};
|
|
15049
|
-
const skillPolicyFingerprint = (source) => JSON.stringify(Object.entries(resolveAgentSkillConfig(source)).sort(([a], [b]) => a.localeCompare(b)));
|
|
15050
15269
|
let reviewAgentConfig;
|
|
15051
15270
|
let planningCaller = {};
|
|
15052
15271
|
const isCanonicalAutoReviewAdmitted = (visits) => {
|
|
@@ -15283,7 +15502,17 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
15283
15502
|
const cached = deps.pastedTextStore ? void 0 : preparedAgentRuntimeCache.get(cacheKey);
|
|
15284
15503
|
if (cached) {
|
|
15285
15504
|
const localRecord = await sharedStore.read(cached.agentConfig.key, { remote: false }).catch(() => null);
|
|
15286
|
-
const
|
|
15505
|
+
const effectiveLocalRecord = localRecord && typeof localRecord === "object" ? applyBuiltinAgentRuntimeOverride(
|
|
15506
|
+
agentRef,
|
|
15507
|
+
resolveAgentRuntimeConfigFromRecord(
|
|
15508
|
+
cached.agentConfig.key,
|
|
15509
|
+
applyPublicAgentCatalogOverride(
|
|
15510
|
+
localRecord,
|
|
15511
|
+
cached.agentConfig.key
|
|
15512
|
+
)
|
|
15513
|
+
)
|
|
15514
|
+
).rawRecord : null;
|
|
15515
|
+
const unchanged = !localRecord || cached.localAgentConfigFingerprint !== void 0 && effectiveLocalRecord != null && cached.localAgentConfigFingerprint === buildLocalAgentConfigFingerprint(effectiveLocalRecord);
|
|
15287
15516
|
if (!unchanged) preparedAgentRuntimeCache.delete(cacheKey);
|
|
15288
15517
|
if (unchanged) {
|
|
15289
15518
|
activeAgentToolNames = cached.activeAgentToolNames;
|
|
@@ -15371,7 +15600,9 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
15371
15600
|
if (exposedAgentConfig && !deps.pastedTextStore) {
|
|
15372
15601
|
preparedAgentRuntimeCache.set(cacheKey, {
|
|
15373
15602
|
agentConfig: exposedAgentConfig,
|
|
15374
|
-
|
|
15603
|
+
localAgentConfigFingerprint: buildLocalAgentConfigFingerprint(
|
|
15604
|
+
exposedAgentConfig.rawRecord
|
|
15605
|
+
),
|
|
15375
15606
|
activeAgentToolNames,
|
|
15376
15607
|
runtimeToolExecutionLimits
|
|
15377
15608
|
});
|
|
@@ -15418,6 +15649,7 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
15418
15649
|
sourceHash: input.sourceHash,
|
|
15419
15650
|
sourceCount: input.sourceCount,
|
|
15420
15651
|
schemaVersion: input.schemaVersion,
|
|
15652
|
+
...input.sourceSegments !== void 0 ? { sourceSegments: input.sourceSegments } : {},
|
|
15421
15653
|
referenceKeys: input.referenceKeys
|
|
15422
15654
|
}),
|
|
15423
15655
|
loadLastContextUsage: async (dialogId) => {
|
|
@@ -15890,14 +16122,14 @@ export {
|
|
|
15890
16122
|
readTimestamp,
|
|
15891
16123
|
parseAgentRunEvent,
|
|
15892
16124
|
isLiveAgentRunObservation,
|
|
15893
|
-
isSubtaskRun,
|
|
15894
|
-
RUN_WAKE_CHANNEL_ENV,
|
|
15895
16125
|
createOriginShellGrant,
|
|
16126
|
+
createCliHybridRecordStore,
|
|
15896
16127
|
preparedAgentRuntimeCache,
|
|
15897
16128
|
hybridStoreCache,
|
|
15898
16129
|
normalizeRuntimeCacheCwd,
|
|
15899
16130
|
buildPreparedAgentCacheKey,
|
|
15900
16131
|
clearCliLocalRuntimePreparedAgentCache,
|
|
16132
|
+
buildLocalAgentConfigFingerprint,
|
|
15901
16133
|
defaultLocalRuntimeDb,
|
|
15902
16134
|
createFallbackId,
|
|
15903
16135
|
logLocalRuntimeDiagnostic,
|