nolo-cli 0.251.0-alpha.1 → 0.252.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-55PHWQWB.js → _executeModel-D6G3B45S.js} +44 -44
- package/{action-WZTKEF5H.js → action-QQOQ2LP3.js} +3 -3
- package/{addContentAction-LBVAQUF7.js → addContentAction-MB22YIDV.js} +6 -6
- package/{addDialogAgentAction-6WAUSUSZ.js → addDialogAgentAction-KNTBVVGY.js} +5 -5
- package/{agentDeleteCommand-KEO3KDK3.js → agentDeleteCommand-YCWDGJSF.js} +66 -65
- package/{agentEmailCommands-RWJQQRNT.js → agentEmailCommands-DTWD5FWC.js} +66 -65
- package/{agentListCommands-L3TLPLNH.js → agentListCommands-JTOONLYL.js} +224 -37
- package/{agentMachineCommands-EZWWXWDH.js → agentMachineCommands-25X7OTLQ.js} +29 -27
- package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
- package/{agentRecordCommands-7W2CGHJJ.js → agentRecordCommands-SXE3WV2X.js} +65 -64
- package/{agentRunCommand-POL6B6BO.js → agentRunCommand-QSIED54S.js} +65 -64
- package/{agentRunControl-FKSXBUAF.js → agentRunControl-KNNDEEDI.js} +8 -6
- package/{agentRuntimeLocal-WSHWNIMF.js → agentRuntimeLocal-HVJJMB4W.js} +24 -23
- package/{agentSlice-3G2YLTA4.js → agentSlice-NBUJJVRI.js} +6 -6
- package/{appDeleteCommands-DZZQCVYH.js → appDeleteCommands-YU6TT6VN.js} +31 -29
- package/{appDeployCommands-NJJBVNH5.js → appDeployCommands-4DEIX7YP.js} +31 -29
- package/{appDeployStatusCommands-GBOAFEYG.js → appDeployStatusCommands-3VKS6GBQ.js} +31 -29
- package/{appGetCommands-GOOKYMKO.js → appGetCommands-22FNNROT.js} +31 -29
- package/{appListCommands-OBCGUG3S.js → appListCommands-FVGMLHVU.js} +31 -29
- package/{authCommand-77CRN332.js → authCommand-5DC3ES4Q.js} +12 -12
- package/{chromeOpsCommands-6RLEBBJJ.js → chromeOpsCommands-AA555ANS.js} +1 -1
- package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
- package/chunk-2GAUJDA5.js +594 -0
- package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
- package/{chunk-222CJNC2.js → chunk-2LANL4B5.js} +3 -3
- package/{chunk-PKMDYRAM.js → chunk-2PB653F5.js} +171 -237
- package/{chunk-GMWZRXRM.js → chunk-3272HU62.js} +1 -1
- package/{chunk-3ZWJVKFB.js → chunk-3N3JPQBQ.js} +82 -38
- package/{chunk-LXKK7QFI.js → chunk-4HAOOY6G.js} +53 -23
- package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
- package/{chunk-T4V6C3J3.js → chunk-52M4RYVP.js} +1 -1
- package/{chunk-6UNJ6JGR.js → chunk-5IN2NBDX.js} +4 -4
- package/{chunk-OQCAHPDQ.js → chunk-5QEOTC35.js} +4 -4
- package/{chunk-R7D5SRAZ.js → chunk-5UYDG6HP.js} +17 -0
- package/{chunk-Z7A2ZQ5X.js → chunk-64ACTEAE.js} +1 -1
- package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
- package/{chunk-UCMUXZJV.js → chunk-7XO73H5X.js} +111 -1
- package/{chunk-N3SEV3CG.js → chunk-7ZOVFB2H.js} +79 -30
- package/{chunk-UR4ZMRV3.js → chunk-A5F6DYP2.js} +1 -1
- package/{chunk-FAFDIQJG.js → chunk-A6VIMCWI.js} +3 -3
- package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
- package/{chunk-LTVEOOZL.js → chunk-CIAV4WK2.js} +14 -1
- package/{chunk-IFJ6OTI6.js → chunk-CO2NXG2J.js} +32 -10
- package/{chunk-D3E5MYXO.js → chunk-CYGFNMCH.js} +1 -1
- package/{chunk-MZVCFV3T.js → chunk-D3WOFN6N.js} +3 -3
- package/{chunk-VUHKG4KS.js → chunk-DNNPARJK.js} +9 -5
- package/{chunk-PLS2MJVW.js → chunk-DU3DJYVA.js} +4 -4
- package/{chunk-MTS5DCL2.js → chunk-EG3JTV7H.js} +2 -2
- package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
- package/{chunk-CD64YXRB.js → chunk-F6Q64KRV.js} +1 -1
- package/{chunk-L5HV76QT.js → chunk-FRC2DNTN.js} +1 -1
- package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
- package/{chunk-D35TOEMM.js → chunk-FZI2P64R.js} +137 -53
- package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
- package/{chunk-CUYFRVJF.js → chunk-GO7UC5VH.js} +5 -5
- package/{chunk-KZVRPCOR.js → chunk-GVH2IP2M.js} +4 -4
- package/{chunk-KGOBJAWC.js → chunk-GWS2X7TX.js} +206 -93
- package/{chunk-KHVTT4WW.js → chunk-HF4C5WIU.js} +81 -542
- package/{chunk-Q5KZ6F55.js → chunk-HMREADP6.js} +19 -17
- package/{chunk-X337N4D6.js → chunk-ITCOQAHS.js} +3 -3
- package/{chunk-BQ4CZEVZ.js → chunk-ITMBFT35.js} +1 -1
- package/chunk-IVK2KT3H.js +209 -0
- package/{chunk-IXAGRTAR.js → chunk-JAYPSNGR.js} +1 -1
- package/{chunk-LOXR4TQN.js → chunk-JF5QT3YY.js} +2 -2
- package/{chunk-QLGL43SI.js → chunk-JKALGWDL.js} +2 -2
- package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
- package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
- package/{chunk-3KWJPTVP.js → chunk-LAQC5FAP.js} +4 -4
- package/{chunk-NTNX77FI.js → chunk-LNIA5JVX.js} +6 -6
- package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
- package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
- package/{chunk-ZSRR6HCH.js → chunk-N2ZAY2DK.js} +1 -1
- package/{chunk-MTM4LRVG.js → chunk-NNUIVAC2.js} +1 -1
- package/{chunk-HD5EKSLF.js → chunk-NPUHKEOB.js} +2 -2
- package/{chunk-OARYOLF3.js → chunk-O6LPLIRS.js} +11 -11
- package/{chunk-HQLCYPL4.js → chunk-OB4FBZXJ.js} +4 -4
- package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
- package/{chunk-IZWGO2ZS.js → chunk-OMIXG25B.js} +1 -1
- package/{chunk-CJ2BP6V7.js → chunk-OOV5JN25.js} +2 -2
- package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
- package/{chunk-K5CIMK3R.js → chunk-P6HMEKLL.js} +114 -56
- package/{chunk-VTHWBTRE.js → chunk-PENRYZ4D.js} +1 -1
- package/{chunk-WZPG63Q4.js → chunk-PIVTQRX6.js} +43 -13
- package/{chunk-KJDN2YRH.js → chunk-QMKWSKWA.js} +4 -4
- package/{chunk-XC5RPSXK.js → chunk-QV32GSVO.js} +2 -2
- package/{chunk-XJSEST7D.js → chunk-SMCKJJXI.js} +2 -2
- package/{chunk-KRAPKTAS.js → chunk-SMZFWEMX.js} +1 -1
- package/{chunk-43VT5PLM.js → chunk-T4VVQHSE.js} +1 -1
- package/{chunk-W2N4OAKM.js → chunk-TDI7ARZO.js} +3 -3
- package/{chunk-TGKAUEV3.js → chunk-TDLZA6LJ.js} +13 -10
- package/{chunk-LMMRWGGJ.js → chunk-TTUIM3PJ.js} +2 -2
- package/{chunk-5IKKSJYX.js → chunk-TTWNTFTO.js} +35 -2
- package/{chunk-ZM5AZTQG.js → chunk-U7BP25PE.js} +18 -6
- package/{chunk-X3OZ655T.js → chunk-UI3Z3HDK.js} +1 -1
- package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
- package/{chunk-U2OWDHDE.js → chunk-VH7AQEEF.js} +2 -2
- package/{chunk-ZKKJZBNO.js → chunk-WAOHK3NJ.js} +9 -9
- package/{chunk-2FK2KZSL.js → chunk-WLHUANWZ.js} +1 -1
- package/{chunk-JUYI2D7J.js → chunk-WNIBQBOR.js} +1 -1
- package/{chunk-SLUZ6FBJ.js → chunk-XBCADGK2.js} +1 -1
- package/{chunk-6XVPMGXK.js → chunk-YB5D2GK4.js} +9 -3
- package/{chunk-QJ5YDTEF.js → chunk-YQYYYATY.js} +42 -24
- package/{chunk-WQDTSK5U.js → chunk-ZMFA2TLE.js} +1 -1
- package/{chunk-CFDOIIOZ.js → chunk-ZMXO5G3E.js} +29 -23
- package/{chunk-A55E2OCP.js → chunk-ZNOXY73P.js} +632 -124
- package/{cliAgentConfigHelpers-N6LTB7UY.js → cliAgentConfigHelpers-FKBPFPKR.js} +6 -6
- package/{cliLocalAgentRecordReader-NFNGYOOW.js → cliLocalAgentRecordReader-DWU3LBO2.js} +28 -27
- package/{commandRegistry-OM5DU4DS.js → commandRegistry-7FVATZS2.js} +70 -70
- package/{contentThunks-7URM43ET.js → contentThunks-25XCB7VY.js} +18 -18
- package/{cooldownCommands-JEEV75B7.js → cooldownCommands-PT5L4LNB.js} +3 -3
- package/{createAgentAutomationAction-GGEXIKMC.js → createAgentAutomationAction-FC5RI2LW.js} +18 -18
- package/{createDialogAction-IXXEMFRQ.js → createDialogAction-IL3ISSQQ.js} +19 -19
- package/{createPageAction-IXIVLIOO.js → createPageAction-RVYBEYZV.js} +19 -19
- package/{db-J5KE7XRI.js → db-JMGVD4TB.js} +2 -1
- package/{dbSlice-IE4ADINL.js → dbSlice-WG3ZG6PZ.js} +5 -5
- package/{deleteFile-ZCQESEEQ.js → deleteFile-4TIG54YN.js} +3 -3
- package/{dialogCommands-RPBHOZB6.js → dialogCommands-VUJISJZF.js} +33 -31
- package/{dialogNotifyCommand-ECKI5MMA.js → dialogNotifyCommand-JKYVSR6K.js} +7 -7
- package/{dialogSlice-5FQB2TNN.js → dialogSlice-UMP55UAW.js} +16 -16
- package/{docCreateCommands-XJ2X57DW.js → docCreateCommands-S46F6GKP.js} +30 -28
- package/{docDeleteCommands-45WGFFEB.js → docDeleteCommands-LJG4NK6J.js} +31 -29
- package/{docReadCommands-LRRVDS46.js → docReadCommands-YPAYGHNM.js} +30 -28
- package/{docStore-SUAVM24F.js → docStore-VK3MVJ5Q.js} +6 -6
- package/{docUpdateCommands-QUYX6BVR.js → docUpdateCommands-MPTM6267.js} +30 -28
- package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
- package/{handleSendMessageAction-FDIWBQUB.js → handleSendMessageAction-VPKVNKBU.js} +33 -33
- package/{hostCredentialCreate-CEXQHYT4.js → hostCredentialCreate-K56HWPNY.js} +65 -64
- package/index.js +8 -8
- package/{localDialogRead-USDZXKIL.js → localDialogRead-NXILOV3T.js} +1 -1
- package/{localRuntimeAdapter-O3JBRK6S.js → localRuntimeAdapter-KVU72FWT.js} +64 -63
- package/{machineCommands-I3YA7TNC.js → machineCommands-C3O5RKNJ.js} +65 -64
- package/{machineWsRunDispatch-E5CIE2OJ.js → machineWsRunDispatch-ZLART7ZA.js} +65 -64
- package/{mcpLocalAuthorizeCommand-K5J2VMG6.js → mcpLocalAuthorizeCommand-LO7E4VQ5.js} +6 -6
- package/{memberThunks-T7EAZE6A.js → memberThunks-7DNR6DRD.js} +7 -7
- package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
- package/package.json +1 -1
- package/{projectArchive-A7E65AZO.js → projectArchive-UBJFYRL7.js} +19 -19
- package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
- package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
- package/{read-BRZHXUJ6.js → read-Z2JOK6F6.js} +3 -3
- package/{readDocTool-N7RVFQEE.js → readDocTool-3QYSVWBT.js} +1 -1
- package/{readlineWorkspace-2O65NBFG.js → readlineWorkspace-TSIYF7C6.js} +610 -206
- package/{removeDialogAgentAction-GRT72HLK.js → removeDialogAgentAction-LRKDU4RI.js} +7 -7
- package/{runAgentClientLoop-NWCZIXCG.js → runAgentClientLoop-YAHGOWXN.js} +41 -41
- package/{runtimeDoctorCommands-26HYHFTK.js → runtimeDoctorCommands-QGZSKNSE.js} +5 -5
- package/{secretCommands-XR72SHLK.js → secretCommands-BXAQEOES.js} +2 -2
- package/{setDialogExtraReferencesAction-CBG3X46B.js → setDialogExtraReferencesAction-KIITOCFP.js} +6 -6
- package/{setPrimaryDialogAgentAction-EWTDZOAX.js → setPrimaryDialogAgentAction-Y36PKFFB.js} +7 -7
- package/{settingThunks-X4PT66J2.js → settingThunks-YQNG5L6K.js} +5 -5
- package/{spaceCommands-EVSNTGRS.js → spaceCommands-P644AAZZ.js} +29 -27
- package/{streamAgentChatTurn-SYP3OEM5.js → streamAgentChatTurn-5CSYAUAY.js} +54 -50
- package/{switchDialogAgentAction-YHPZ7K6E.js → switchDialogAgentAction-U2VLPPVO.js} +5 -5
- package/{tools-2AO2SK4L.js → tools-UZ3CDIR2.js} +34 -34
- package/{tuiRestart-HBQDF4AE.js → tuiRestart-GF4DGAAN.js} +7 -7
- package/{tuiSummaryLlmCaller-Q2PNR63K.js → tuiSummaryLlmCaller-HROLGN4F.js} +12 -12
- package/{updateCommands-6SI7NWVC.js → updateCommands-BZ4YDHNM.js} +3 -3
- package/{updateDialogTitleAction-MWVMBIPZ.js → updateDialogTitleAction-53XCCDK2.js} +18 -18
- package/{usageCommand-D44AOTMH.js → usageCommand-XVJ7ZUTM.js} +1 -1
- package/{usageRebuildCommand-IRIMKDI5.js → usageRebuildCommand-NK6S3D4J.js} +2 -2
- package/{windowsSelfUpdate-BJIJKKIS.js → windowsSelfUpdate-4BAXX7C3.js} +2 -2
- package/{workloadLifecycle-ZCSQCHG3.js → workloadLifecycle-DYX5ZMAT.js} +2 -2
- package/chunk-FGHEF6WI.js +0 -34
- package/{chunk-ANUP75N2.js → chunk-2E4BYAUE.js} +0 -0
- package/{chunk-CDIRKCPD.js → chunk-6HL6E7ZD.js} +152 -152
- package/{dialogUsageCommand-TBIA2QAF.js → dialogUsageCommand-IHAXS7DW.js} +3 -3
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FZI2P64R.js";
|
|
9
9
|
import {
|
|
10
10
|
CONFIRMATION_INPUT_KEYS,
|
|
11
11
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
performFetchRequest,
|
|
15
15
|
sanitizeOutboundMessages,
|
|
16
16
|
stripModelToolArgs
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-P6HMEKLL.js";
|
|
18
18
|
import {
|
|
19
19
|
findToolExecutor,
|
|
20
20
|
toolDefinitionsByName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3N3JPQBQ.js";
|
|
22
22
|
import {
|
|
23
23
|
createSSEParser,
|
|
24
24
|
createToolRunId,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
toolRunSetPending,
|
|
28
28
|
toolRunStarted,
|
|
29
29
|
toolRunSucceeded
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-WAOHK3NJ.js";
|
|
31
31
|
import {
|
|
32
32
|
addToolMessage,
|
|
33
33
|
messageStreamEnd,
|
|
@@ -35,19 +35,19 @@ import {
|
|
|
35
35
|
toast,
|
|
36
36
|
toolResultNeedsUserConfirmation,
|
|
37
37
|
updateToolMessage
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-ZNOXY73P.js";
|
|
39
39
|
import {
|
|
40
40
|
streamAgentChatTurn
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-YQYYYATY.js";
|
|
42
42
|
import {
|
|
43
43
|
getCurrentSpaceId
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-JAYPSNGR.js";
|
|
45
45
|
import {
|
|
46
46
|
selectCurrentServer
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-NNUIVAC2.js";
|
|
48
48
|
import {
|
|
49
49
|
write
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-CO2NXG2J.js";
|
|
51
51
|
import {
|
|
52
52
|
addActiveController,
|
|
53
53
|
getActiveDialogKey,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
} from "./chunk-RD3QLZQV.js";
|
|
60
60
|
import {
|
|
61
61
|
createAsyncThunk
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-YB5D2GK4.js";
|
|
63
63
|
import {
|
|
64
64
|
selectIdentityToken
|
|
65
65
|
} from "./chunk-PXYBUFDB.js";
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
projectUserPartForModel,
|
|
71
71
|
resolveOutboundDiagnosticSink,
|
|
72
72
|
resolveOutboundWire
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-WLHUANWZ.js";
|
|
74
74
|
import {
|
|
75
75
|
accumulateToolCallDelta,
|
|
76
76
|
createThinkParserState,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
} from "./chunk-56GBUMO5.js";
|
|
83
83
|
import {
|
|
84
84
|
normalizeChatCompletionsBodyForProvider
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-FXEPZKNJ.js";
|
|
86
86
|
import {
|
|
87
87
|
classifyApiError,
|
|
88
88
|
classifyGenerationError,
|
|
@@ -93,13 +93,13 @@ import {
|
|
|
93
93
|
isCompleteInstructionOutput,
|
|
94
94
|
sanitizeToolOutputText,
|
|
95
95
|
scrubSecrets
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-6HL6E7ZD.js";
|
|
97
97
|
import {
|
|
98
98
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-CIAV4WK2.js";
|
|
100
100
|
import {
|
|
101
101
|
getModelInfo
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-2FZVXOFX.js";
|
|
103
103
|
import {
|
|
104
104
|
isAbortError
|
|
105
105
|
} from "./chunk-7DPNBQSV.js";
|
|
@@ -124,7 +124,7 @@ import {
|
|
|
124
124
|
} from "./chunk-3EUW3WEO.js";
|
|
125
125
|
import {
|
|
126
126
|
getApiEndpoint
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-OKH74FML.js";
|
|
128
128
|
import {
|
|
129
129
|
isRecord
|
|
130
130
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -1700,7 +1700,9 @@ var sendOpenAICompletionsRequest = async ({
|
|
|
1700
1700
|
const requestBody = await inlineImageUrlsForCustomProvider(
|
|
1701
1701
|
buildFinalCompletionsRequestBody(bodyData, agentConfig, disableToolsForThisRequest),
|
|
1702
1702
|
{
|
|
1703
|
-
shouldInline: shouldInlineImageUrlsForAgent(agentConfig)
|
|
1703
|
+
shouldInline: shouldInlineImageUrlsForAgent(agentConfig),
|
|
1704
|
+
serverUrl: selectCurrentServer(getState()),
|
|
1705
|
+
signal
|
|
1704
1706
|
}
|
|
1705
1707
|
);
|
|
1706
1708
|
let streamState = createInitialStreamState();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TDLZA6LJ.js";
|
|
4
4
|
import {
|
|
5
5
|
prepareAndPersistMessage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZNOXY73P.js";
|
|
7
7
|
import {
|
|
8
8
|
require_format
|
|
9
9
|
} from "./chunk-BUDVRYES.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
removeCachedEntity,
|
|
17
17
|
upsertSSREntity,
|
|
18
18
|
write
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-CO2NXG2J.js";
|
|
20
20
|
import {
|
|
21
21
|
isDevelopment
|
|
22
22
|
} from "./chunk-YHNUDTU4.js";
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// node_modules/async-mutex/index.mjs
|
|
2
|
+
var E_TIMEOUT = new Error("timeout while waiting for mutex to become available");
|
|
3
|
+
var E_ALREADY_LOCKED = new Error("mutex already locked");
|
|
4
|
+
var E_CANCELED = new Error("request for lock canceled");
|
|
5
|
+
var __awaiter$2 = function(thisArg, _arguments, P, generator) {
|
|
6
|
+
function adopt(value) {
|
|
7
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
8
|
+
resolve(value);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
12
|
+
function fulfilled(value) {
|
|
13
|
+
try {
|
|
14
|
+
step(generator.next(value));
|
|
15
|
+
} catch (e) {
|
|
16
|
+
reject(e);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function rejected(value) {
|
|
20
|
+
try {
|
|
21
|
+
step(generator["throw"](value));
|
|
22
|
+
} catch (e) {
|
|
23
|
+
reject(e);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function step(result) {
|
|
27
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
28
|
+
}
|
|
29
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
var Semaphore = class {
|
|
33
|
+
constructor(_value, _cancelError = E_CANCELED) {
|
|
34
|
+
this._value = _value;
|
|
35
|
+
this._cancelError = _cancelError;
|
|
36
|
+
this._queue = [];
|
|
37
|
+
this._weightedWaiters = [];
|
|
38
|
+
}
|
|
39
|
+
acquire(weight = 1, priority = 0) {
|
|
40
|
+
if (weight <= 0)
|
|
41
|
+
throw new Error(`invalid weight ${weight}: must be positive`);
|
|
42
|
+
return new Promise((resolve, reject) => {
|
|
43
|
+
const task = { resolve, reject, weight, priority };
|
|
44
|
+
const i = findIndexFromEnd(this._queue, (other) => priority <= other.priority);
|
|
45
|
+
if (i === -1 && weight <= this._value) {
|
|
46
|
+
this._dispatchItem(task);
|
|
47
|
+
} else {
|
|
48
|
+
this._queue.splice(i + 1, 0, task);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
runExclusive(callback_1) {
|
|
53
|
+
return __awaiter$2(this, arguments, void 0, function* (callback, weight = 1, priority = 0) {
|
|
54
|
+
const [value, release] = yield this.acquire(weight, priority);
|
|
55
|
+
try {
|
|
56
|
+
return yield callback(value);
|
|
57
|
+
} finally {
|
|
58
|
+
release();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
waitForUnlock(weight = 1, priority = 0) {
|
|
63
|
+
if (weight <= 0)
|
|
64
|
+
throw new Error(`invalid weight ${weight}: must be positive`);
|
|
65
|
+
if (this._couldLockImmediately(weight, priority)) {
|
|
66
|
+
return Promise.resolve();
|
|
67
|
+
} else {
|
|
68
|
+
return new Promise((resolve) => {
|
|
69
|
+
if (!this._weightedWaiters[weight - 1])
|
|
70
|
+
this._weightedWaiters[weight - 1] = [];
|
|
71
|
+
insertSorted(this._weightedWaiters[weight - 1], { resolve, priority });
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
isLocked() {
|
|
76
|
+
return this._value <= 0;
|
|
77
|
+
}
|
|
78
|
+
getValue() {
|
|
79
|
+
return this._value;
|
|
80
|
+
}
|
|
81
|
+
setValue(value) {
|
|
82
|
+
this._value = value;
|
|
83
|
+
this._dispatchQueue();
|
|
84
|
+
}
|
|
85
|
+
release(weight = 1) {
|
|
86
|
+
if (weight <= 0)
|
|
87
|
+
throw new Error(`invalid weight ${weight}: must be positive`);
|
|
88
|
+
this._value += weight;
|
|
89
|
+
this._dispatchQueue();
|
|
90
|
+
}
|
|
91
|
+
cancel() {
|
|
92
|
+
this._queue.forEach((entry) => entry.reject(this._cancelError));
|
|
93
|
+
this._queue = [];
|
|
94
|
+
}
|
|
95
|
+
_dispatchQueue() {
|
|
96
|
+
this._drainUnlockWaiters();
|
|
97
|
+
while (this._queue.length > 0 && this._queue[0].weight <= this._value) {
|
|
98
|
+
this._dispatchItem(this._queue.shift());
|
|
99
|
+
this._drainUnlockWaiters();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
_dispatchItem(item) {
|
|
103
|
+
const previousValue = this._value;
|
|
104
|
+
this._value -= item.weight;
|
|
105
|
+
item.resolve([previousValue, this._newReleaser(item.weight)]);
|
|
106
|
+
}
|
|
107
|
+
_newReleaser(weight) {
|
|
108
|
+
let called = false;
|
|
109
|
+
return () => {
|
|
110
|
+
if (called)
|
|
111
|
+
return;
|
|
112
|
+
called = true;
|
|
113
|
+
this.release(weight);
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
_drainUnlockWaiters() {
|
|
117
|
+
if (this._queue.length === 0) {
|
|
118
|
+
for (let weight = this._value; weight > 0; weight--) {
|
|
119
|
+
const waiters = this._weightedWaiters[weight - 1];
|
|
120
|
+
if (!waiters)
|
|
121
|
+
continue;
|
|
122
|
+
waiters.forEach((waiter) => waiter.resolve());
|
|
123
|
+
this._weightedWaiters[weight - 1] = [];
|
|
124
|
+
}
|
|
125
|
+
} else {
|
|
126
|
+
const queuedPriority = this._queue[0].priority;
|
|
127
|
+
for (let weight = this._value; weight > 0; weight--) {
|
|
128
|
+
const waiters = this._weightedWaiters[weight - 1];
|
|
129
|
+
if (!waiters)
|
|
130
|
+
continue;
|
|
131
|
+
const i = waiters.findIndex((waiter) => waiter.priority <= queuedPriority);
|
|
132
|
+
(i === -1 ? waiters : waiters.splice(0, i)).forEach((waiter) => waiter.resolve());
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
_couldLockImmediately(weight, priority) {
|
|
137
|
+
return (this._queue.length === 0 || this._queue[0].priority < priority) && weight <= this._value;
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
function insertSorted(a, v) {
|
|
141
|
+
const i = findIndexFromEnd(a, (other) => v.priority <= other.priority);
|
|
142
|
+
a.splice(i + 1, 0, v);
|
|
143
|
+
}
|
|
144
|
+
function findIndexFromEnd(a, predicate) {
|
|
145
|
+
for (let i = a.length - 1; i >= 0; i--) {
|
|
146
|
+
if (predicate(a[i])) {
|
|
147
|
+
return i;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return -1;
|
|
151
|
+
}
|
|
152
|
+
var __awaiter$1 = function(thisArg, _arguments, P, generator) {
|
|
153
|
+
function adopt(value) {
|
|
154
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
155
|
+
resolve(value);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
159
|
+
function fulfilled(value) {
|
|
160
|
+
try {
|
|
161
|
+
step(generator.next(value));
|
|
162
|
+
} catch (e) {
|
|
163
|
+
reject(e);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function rejected(value) {
|
|
167
|
+
try {
|
|
168
|
+
step(generator["throw"](value));
|
|
169
|
+
} catch (e) {
|
|
170
|
+
reject(e);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function step(result) {
|
|
174
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
175
|
+
}
|
|
176
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
var Mutex = class {
|
|
180
|
+
constructor(cancelError) {
|
|
181
|
+
this._semaphore = new Semaphore(1, cancelError);
|
|
182
|
+
}
|
|
183
|
+
acquire() {
|
|
184
|
+
return __awaiter$1(this, arguments, void 0, function* (priority = 0) {
|
|
185
|
+
const [, releaser] = yield this._semaphore.acquire(1, priority);
|
|
186
|
+
return releaser;
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
runExclusive(callback, priority = 0) {
|
|
190
|
+
return this._semaphore.runExclusive(() => callback(), 1, priority);
|
|
191
|
+
}
|
|
192
|
+
isLocked() {
|
|
193
|
+
return this._semaphore.isLocked();
|
|
194
|
+
}
|
|
195
|
+
waitForUnlock(priority = 0) {
|
|
196
|
+
return this._semaphore.waitForUnlock(1, priority);
|
|
197
|
+
}
|
|
198
|
+
release() {
|
|
199
|
+
if (this._semaphore.isLocked())
|
|
200
|
+
this._semaphore.release();
|
|
201
|
+
}
|
|
202
|
+
cancel() {
|
|
203
|
+
return this._semaphore.cancel();
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
export {
|
|
208
|
+
Mutex
|
|
209
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
requireTokenUser
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XBCADGK2.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveServerUrl
|
|
6
6
|
} from "./chunk-BIDSIRTS.js";
|
|
7
7
|
import {
|
|
8
8
|
t
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5UYDG6HP.js";
|
|
10
10
|
|
|
11
11
|
// packages/cli/cliApiClient.ts
|
|
12
12
|
var CliApiError = class extends Error {
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
patch,
|
|
7
7
|
read
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CO2NXG2J.js";
|
|
9
9
|
import {
|
|
10
10
|
DEVICE_LOCAL_OWNER_ID,
|
|
11
11
|
isDeviceLocalSpaceBody
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZMFA2TLE.js";
|
|
13
13
|
import {
|
|
14
14
|
selectIdentityUserId
|
|
15
15
|
} from "./chunk-PXYBUFDB.js";
|
|
@@ -37,6 +37,9 @@ var resolveFireworksKimiModel = (model) => {
|
|
|
37
37
|
}
|
|
38
38
|
return model ?? "";
|
|
39
39
|
};
|
|
40
|
+
function hostedKimiLegacyThinkingOverride(provider, model, enableThinking, effort) {
|
|
41
|
+
return enableThinking === false && !effort && isPlatformKimiProviderModel(provider, model) ? { thinking: { type: "disabled" }, reasoning: { enabled: false } } : void 0;
|
|
42
|
+
}
|
|
40
43
|
|
|
41
44
|
// packages/ai/llm/platformHostedRoutingTable.ts
|
|
42
45
|
var PLATFORM_HOSTED_CLAUDE_SONNET_5_MODEL = "anthropic/claude-sonnet-5";
|
|
@@ -1751,6 +1754,9 @@ var platformHostedModels = [
|
|
|
1751
1754
|
]
|
|
1752
1755
|
})
|
|
1753
1756
|
];
|
|
1757
|
+
function usesMimoThinkingWire(provider, model, endpoint) {
|
|
1758
|
+
return /xiaomimimo\.com/i.test(endpoint ?? "") || provider?.toLowerCase() === "mimo" || isPlatformMimoProviderModel(provider, model);
|
|
1759
|
+
}
|
|
1754
1760
|
|
|
1755
1761
|
// packages/ai/llm/cloudflare.ts
|
|
1756
1762
|
var getCloudflareWorkersAiChatCompletionsUrl = (accountId = (typeof process !== "undefined" ? process.env?.CLOUDFLARE_ACCOUNT_ID : void 0)?.trim()) => {
|
|
@@ -1776,8 +1782,10 @@ export {
|
|
|
1776
1782
|
isNoloHostedProvider,
|
|
1777
1783
|
isFireworksKimiModel,
|
|
1778
1784
|
isDeepInfraKimiModel,
|
|
1785
|
+
isPlatformKimiProviderModel,
|
|
1779
1786
|
isPlatformManagedProvider,
|
|
1780
1787
|
resolveFireworksKimiModel,
|
|
1788
|
+
hostedKimiLegacyThinkingOverride,
|
|
1781
1789
|
PLATFORM_HOSTED_CLAUDE_SONNET_5_MODEL,
|
|
1782
1790
|
PLATFORM_HOSTED_CLAUDE_OPUS_5_MODEL,
|
|
1783
1791
|
PLATFORM_HOSTED_CLAUDE_FABLE_5_MODEL,
|
|
@@ -1801,7 +1809,6 @@ export {
|
|
|
1801
1809
|
PLATFORM_HOSTED_GLM_53_FLASH_BASETEN_PRICE,
|
|
1802
1810
|
isPlatformHostedOpenAIImageModel,
|
|
1803
1811
|
isPlatformHostedImageModel,
|
|
1804
|
-
isPlatformMimoProviderModel,
|
|
1805
1812
|
PLATFORM_HOSTED_DEEPSEEK_FLASH_PEAK_PRICE,
|
|
1806
1813
|
PLATFORM_HOSTED_DEEPSEEK_FLASH_OFF_PEAK_PRICE,
|
|
1807
1814
|
PLATFORM_HOSTED_DEEPSEEK_PRO_PEAK_PRICE,
|
|
@@ -1810,6 +1817,7 @@ export {
|
|
|
1810
1817
|
isPlatformHostedDeepseekModel,
|
|
1811
1818
|
isPlatformHostedDeepSeekV4Model,
|
|
1812
1819
|
platformHostedModels,
|
|
1820
|
+
usesMimoThinkingWire,
|
|
1813
1821
|
getCloudflareWorkersAiChatCompletionsUrl,
|
|
1814
1822
|
cloudflareModels,
|
|
1815
1823
|
GMI_CHAT_COMPLETIONS_URL,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return `${normalized}_KEY`;
|
|
5
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
providerSecretKey
|
|
3
|
+
} from "./chunk-LVZVSLKO.js";
|
|
6
4
|
|
|
7
5
|
// packages/ai/agent/providerSecrets.ts
|
|
8
6
|
var STORAGE_KEY = "nolo-local-secrets";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyPublicAgentCatalogOverride
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-D3WOFN6N.js";
|
|
4
4
|
import {
|
|
5
5
|
applyBuiltinAgentRuntimeOverride,
|
|
6
6
|
resolveBuiltinPlatformAgentConfig
|
|
7
7
|
} from "./chunk-JP2BH4NC.js";
|
|
8
8
|
import {
|
|
9
9
|
buildLocalAgentLookupKeys
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-64ACTEAE.js";
|
|
11
11
|
import {
|
|
12
12
|
localDialogMessageRecordToRuntimeMessage,
|
|
13
13
|
orderDialogHistory
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-2PB653F5.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveAgentRuntimeConfigFromRecord
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-TTUIM3PJ.js";
|
|
18
18
|
import {
|
|
19
19
|
dialogMessagePrefix,
|
|
20
20
|
dialogMessageRange
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ITMBFT35.js";
|
|
11
11
|
import {
|
|
12
12
|
parsePositiveFiniteNumberOrFallback
|
|
13
13
|
} from "./chunk-Y5GCAMGP.js";
|
|
14
14
|
import {
|
|
15
15
|
loadLocalRunChildDialogIds
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-N2ZAY2DK.js";
|
|
17
17
|
import {
|
|
18
18
|
buildDialogAttachmentPlan,
|
|
19
19
|
extractFileContentIds,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
boundSummaryText,
|
|
42
42
|
buildDialogReadEnvelope,
|
|
43
43
|
projectDialogReadForAgent
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-ZMXO5G3E.js";
|
|
45
45
|
import {
|
|
46
46
|
asRecordOrEmpty
|
|
47
47
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
} from "./chunk-BIDSIRTS.js";
|
|
69
69
|
import {
|
|
70
70
|
t
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-5UYDG6HP.js";
|
|
72
72
|
import {
|
|
73
73
|
toErrorMessage
|
|
74
74
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -825,7 +825,7 @@ function isExplicitDialogIdMismatch(meta, dialogId) {
|
|
|
825
825
|
return meta && typeof meta === "object" && "id" in meta && meta.id != null && String(meta.id) !== dialogId;
|
|
826
826
|
}
|
|
827
827
|
async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog) {
|
|
828
|
-
const reader = readLocalDialog ?? (await import("./localDialogRead-
|
|
828
|
+
const reader = readLocalDialog ?? (await import("./localDialogRead-NXILOV3T.js")).readDialogFromLocalDb;
|
|
829
829
|
const result = await reader({ dialogKey, dialogId, limit });
|
|
830
830
|
return {
|
|
831
831
|
...result,
|
|
@@ -840,7 +840,7 @@ async function readLocalDialogAtDbPathDefault(args) {
|
|
|
840
840
|
);
|
|
841
841
|
}
|
|
842
842
|
const db = await getDefaultCliLocalRuntimeDb();
|
|
843
|
-
const { readDialogFromLocalDb: reader } = await import("./localDialogRead-
|
|
843
|
+
const { readDialogFromLocalDb: reader } = await import("./localDialogRead-NXILOV3T.js");
|
|
844
844
|
return reader({ ...args, db });
|
|
845
845
|
}
|
|
846
846
|
async function readDialogFromLocalDbWithFallback(args) {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
resolvePlatformHostedCredentialProvider,
|
|
5
5
|
resolvePlatformProxyChatGatewayEndpoint,
|
|
6
6
|
resolvePlatformResponsesEndpoint
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2JHGUL5K.js";
|
|
8
8
|
import {
|
|
9
9
|
asTrimmedString
|
|
10
10
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
CLIENT_VERSION_TOO_OLD_CODE,
|
|
22
22
|
buildClientVersionGateErrorDetail,
|
|
23
23
|
evaluatePlatformHostedClientVersionGate
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JPXACKSW.js";
|
|
25
25
|
import {
|
|
26
26
|
asTrimmedLowercaseString
|
|
27
27
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -38,6 +38,22 @@ function pickAgentRuntimeInferenceOptions(agentConfig) {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
// packages/shared/providerSecrets.ts
|
|
42
|
+
function providerSecretKey(presetId) {
|
|
43
|
+
const normalized = presetId.trim().replace(/[^a-zA-Z0-9]+/g, "_").toUpperCase();
|
|
44
|
+
return `${normalized}_KEY`;
|
|
45
|
+
}
|
|
46
|
+
function isAgentCredentialShared(agent) {
|
|
47
|
+
return agent?.credentialSynced === true;
|
|
48
|
+
}
|
|
49
|
+
function resolveOutboundProxyApiKey(credential) {
|
|
50
|
+
const apiKey = asOptionalTrimmedString(credential.apiKey);
|
|
51
|
+
if (apiKey && !isAgentCredentialShared(credential)) {
|
|
52
|
+
throw new Error("\u672A\u6388\u6743\u5C06\u6B64\u5BC6\u94A5\u53D1\u9001\u5230 nolo \u4EE3\u7406\u3002\u8BF7\u4F7F\u7528\u672C\u673A\u76F4\u8FDE\uFF0C\u6216\u542F\u7528\u8DE8\u8BBE\u5907\u5171\u4EAB\u540E\u91CD\u8BD5\u3002");
|
|
53
|
+
}
|
|
54
|
+
return apiKey;
|
|
55
|
+
}
|
|
56
|
+
|
|
41
57
|
// packages/agent-runtime/providerResolution.ts
|
|
42
58
|
function resolvePlatformProviderEndpoint(agentConfig) {
|
|
43
59
|
const customProviderUrl = agentConfig.customProviderUrl?.trim();
|
|
@@ -223,7 +239,7 @@ async function buildProviderExecutionPlan(args) {
|
|
|
223
239
|
const credentialRef2 = agentConfig.credentialRef?.trim();
|
|
224
240
|
const apiKeyRef = agentConfig.apiKeyRef?.trim();
|
|
225
241
|
if (args.credentialBroker) {
|
|
226
|
-
const brokerRefs = [credentialRef2, apiKeyRef].filter(
|
|
242
|
+
const brokerRefs = [credentialRef2, ...!credentialRef2 || !apiKeyRef?.startsWith("provider-key:") ? [apiKeyRef] : []].filter(
|
|
227
243
|
(ref) => Boolean(ref)
|
|
228
244
|
);
|
|
229
245
|
for (const ref of brokerRefs) {
|
|
@@ -234,7 +250,7 @@ async function buildProviderExecutionPlan(args) {
|
|
|
234
250
|
}
|
|
235
251
|
}
|
|
236
252
|
}
|
|
237
|
-
if (!apiKey2 && agentConfig
|
|
253
|
+
if (!apiKey2 && isAgentCredentialShared(agentConfig) && args.syncFetcher && credentialRef2) {
|
|
238
254
|
let synced = null;
|
|
239
255
|
try {
|
|
240
256
|
synced = await args.syncFetcher(credentialRef2);
|
|
@@ -249,7 +265,7 @@ async function buildProviderExecutionPlan(args) {
|
|
|
249
265
|
apiKey2 = trimmed;
|
|
250
266
|
}
|
|
251
267
|
}
|
|
252
|
-
if (!apiKey2 &&
|
|
268
|
+
if (!apiKey2 && isAgentCredentialShared(agentConfig) && !credentialRef2 && apiKeyRef?.startsWith("provider-key:") && args.syncFetcher) {
|
|
253
269
|
try {
|
|
254
270
|
const shared = await args.syncFetcher(apiKeyRef);
|
|
255
271
|
const trimmed = asTrimmedString(shared);
|
|
@@ -264,12 +280,12 @@ async function buildProviderExecutionPlan(args) {
|
|
|
264
280
|
}
|
|
265
281
|
}
|
|
266
282
|
if (!apiKey2 && apiKeyRef && args.apiKeyRefResolver) {
|
|
267
|
-
const resolved = await args.apiKeyRefResolver(apiKeyRef);
|
|
283
|
+
const resolved = apiKeyRef.startsWith("provider-key:") ? null : await args.apiKeyRefResolver(apiKeyRef);
|
|
268
284
|
if (resolved) {
|
|
269
285
|
apiKey2 = resolved;
|
|
270
286
|
} else if (!agentConfig.apiKey?.trim() && !agentConfig.apiKeyFromAgentKey?.trim()) {
|
|
271
|
-
const isApiKeyRef =
|
|
272
|
-
const hint = isApiKeyRef ? agentConfig
|
|
287
|
+
const isApiKeyRef = /^(api-key|provider-key):/.test(apiKeyRef);
|
|
288
|
+
const hint = isApiKeyRef ? isAgentCredentialShared(agentConfig) ? `Local credential for "${apiKeyRef}" not found. It is synced to your account \u2014 run this agent once on a device that has the key, or re-enter it in agent settings.` : `Local credential for "${apiKeyRef}" not found. Re-enter the API key in agent settings, or enable cross-device sync.` : `OAuth credential for "${apiKeyRef}" not found locally. Run \`nolo auth ${apiKeyRef}\` (and \`--sync-to-server\` for server-side agent runs).`;
|
|
273
289
|
throw new Error(hint);
|
|
274
290
|
}
|
|
275
291
|
}
|
|
@@ -293,6 +309,7 @@ async function buildProviderExecutionPlan(args) {
|
|
|
293
309
|
agentKey: agentConfig.key,
|
|
294
310
|
...agentConfig.apiSource ? { apiSource: agentConfig.apiSource } : {},
|
|
295
311
|
...apiKey2 ? { apiKey: apiKey2 } : {},
|
|
312
|
+
...isAgentCredentialShared(agentConfig) ? { credentialSynced: true } : {},
|
|
296
313
|
...apiKeyHeader ? { apiKeyHeader } : {}
|
|
297
314
|
};
|
|
298
315
|
}
|
|
@@ -351,7 +368,7 @@ async function buildProviderExecutionPlan(args) {
|
|
|
351
368
|
apiKey = fromBroker;
|
|
352
369
|
}
|
|
353
370
|
}
|
|
354
|
-
if (!apiKey && agentConfig
|
|
371
|
+
if (!apiKey && isAgentCredentialShared(agentConfig) && args.syncFetcher && credentialRef) {
|
|
355
372
|
let synced = null;
|
|
356
373
|
try {
|
|
357
374
|
synced = await args.syncFetcher(credentialRef);
|
|
@@ -382,6 +399,9 @@ async function buildProviderExecutionPlan(args) {
|
|
|
382
399
|
}
|
|
383
400
|
|
|
384
401
|
export {
|
|
402
|
+
providerSecretKey,
|
|
403
|
+
isAgentCredentialShared,
|
|
404
|
+
resolveOutboundProxyApiKey,
|
|
385
405
|
pickAgentRuntimeInferenceOptions,
|
|
386
406
|
trimTrailingSlash,
|
|
387
407
|
resolvePlatformServerUrl,
|