nolo-cli 0.77.0 → 0.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/{_executeModel-G6BRN2BO.js → _executeModel-W26HVI75.js} +31 -31
- package/{action-7GHFPDSQ.js → action-6DXQGJMX.js} +7 -7
- package/{addContentAction-ZNVB2NOV.js → addContentAction-I7VX5SAC.js} +5 -5
- package/{addDialogAgentAction-CIDFWATM.js → addDialogAgentAction-OJSFV7DZ.js} +4 -4
- package/{agentDeleteCommand-C5JTDBIX.js → agentDeleteCommand-XNFWCKBH.js} +16 -16
- package/{agentEmailCommands-AYSYNUSH.js → agentEmailCommands-XYOZGQ6F.js} +38 -38
- package/{agentGrantCommands-R3VQEZJR.js → agentGrantCommands-YW6PQAQ2.js} +2 -2
- package/{agentListCommands-CVFL3P3D.js → agentListCommands-DFWFU6XO.js} +24 -18
- package/{agentMachineCommands-2EPX7IYC.js → agentMachineCommands-2EANXBQS.js} +16 -16
- package/{agentProviderCommands-EHR3PV2V.js → agentProviderCommands-ZBYHGTGY.js} +1 -1
- package/{agentPullCommand-U73W5IBM.js → agentPullCommand-GLOOXJ2E.js} +2 -2
- package/{agentRecordCommands-DPZVHOOA.js → agentRecordCommands-DRY5LE4F.js} +37 -37
- package/{agentRunCommand-BE53VNNN.js → agentRunCommand-YONMYI4X.js} +38 -38
- package/{agentRuntimeLocal-BPN5IOFT.js → agentRuntimeLocal-2JFG4HDU.js} +12 -12
- package/{agentSlice-PYJFXGZL.js → agentSlice-ZNLGFUB5.js} +5 -5
- package/{appDeleteCommands-TREMNXCA.js → appDeleteCommands-2UN4N2NR.js} +17 -17
- package/{appDeployCommands-7FYCMERT.js → appDeployCommands-37D74KRR.js} +17 -17
- package/{appDeployStatusCommands-7LAYH7IX.js → appDeployStatusCommands-QBLWL2IA.js} +17 -17
- package/{appGetCommands-BONTQ2XH.js → appGetCommands-6KXIDF2T.js} +17 -17
- package/{appListCommands-BYIELWUL.js → appListCommands-G2WFGEWQ.js} +17 -17
- package/{authCommand-J5C7GS33.js → authCommand-V2DJ7DB7.js} +75 -10
- package/{authCommands-VOTT6XWX.js → authCommands-RGOGCPP6.js} +2 -2
- package/{builtinSkillRegistry-YITVDLWG.js → builtinSkillRegistry-WBGYKIAZ.js} +5 -5
- package/{chatQueueReduxAdapter-PIOXZBGH.js → chatQueueReduxAdapter-XCJHIY3R.js} +12 -12
- package/{chunk-JT7FRJP5.js → chunk-2ADBVBEM.js} +2 -2
- package/{chunk-6LWO3QQS.js → chunk-2AYMFHUG.js} +2 -2
- package/{chunk-RHB6OCZS.js → chunk-36ZJDN6A.js} +5 -5
- package/{chunk-GXWEF4IZ.js → chunk-3CR2LC6X.js} +1 -1
- package/{chunk-UQ45IHLM.js → chunk-3R5PH4IP.js} +1 -1
- package/{chunk-UQYEVBMM.js → chunk-4BYPU626.js} +210 -193
- package/{chunk-PHDKTASK.js → chunk-4DRWWIOL.js} +1 -1
- package/{chunk-5DAMTON3.js → chunk-576IMUGH.js} +1 -1
- package/{chunk-XIYOAH3S.js → chunk-5DFFKASO.js} +3 -3
- package/{chunk-5XTOKQLW.js → chunk-5UTFL4QJ.js} +6 -2
- package/{chunk-JRFQPOPS.js → chunk-5V4NJHRM.js} +5 -5
- package/{chunk-US463UAD.js → chunk-6BEA566T.js} +2 -2
- package/{chunk-UINEAQ2R.js → chunk-6D6VBVEW.js} +1 -1
- package/{chunk-FSISQCCB.js → chunk-74UCTXK3.js} +78 -31
- package/{chunk-7TEU3WX2.js → chunk-7MYYE7WX.js} +8 -8
- package/{chunk-3DZIWHJ6.js → chunk-A2C4AKKM.js} +1 -1
- package/{chunk-2KDR4CWE.js → chunk-BYMV6QZG.js} +24 -1
- package/{chunk-XCSSFPTB.js → chunk-CLI4LFSM.js} +1 -1
- package/{chunk-2XEVK4BT.js → chunk-DPQ2WVBY.js} +1 -1
- package/{chunk-PGO7O65Q.js → chunk-EXTJ4GXV.js} +4 -4
- package/{chunk-VEJ4BOQV.js → chunk-F2CGG72C.js} +2 -2
- package/{chunk-UDK3ZSMN.js → chunk-FQYMLZ6C.js} +5 -5
- package/{chunk-BJIRLHJR.js → chunk-GII32WZW.js} +1 -0
- package/{chunk-LGSXBNWH.js → chunk-GRYGRGPS.js} +3 -3
- package/{chunk-ACFF7U3F.js → chunk-HMEMJ7GH.js} +100 -20
- package/{chunk-OZX2IPKM.js → chunk-HQCSU3DI.js} +1 -1
- package/{chunk-FWGPT6VI.js → chunk-HYZHJ5GW.js} +2 -2
- package/{chunk-OAJRZ35U.js → chunk-IIKPWSPX.js} +1 -1
- package/{chunk-MRT4KARW.js → chunk-JBBZ5KUM.js} +9 -9
- package/{chunk-KC5FAHVS.js → chunk-JEDZAO7L.js} +1 -1
- package/{chunk-LSV2BOJL.js → chunk-JTK3TJYV.js} +1 -1
- package/{chunk-OHUU52T3.js → chunk-L2ICPOAL.js} +1 -1
- package/{chunk-UUVQJZ75.js → chunk-N3OAPEZE.js} +3 -3
- package/{chunk-JITSBA52.js → chunk-PH5J5VUY.js} +2 -2
- package/{chunk-JYYZCK2Z.js → chunk-QFMFJZLO.js} +1 -1
- package/{chunk-6HCLDVEI.js → chunk-QHETQ3KI.js} +1 -1
- package/{chunk-IZAWJCG7.js → chunk-RZANZZL2.js} +1 -1
- package/{chunk-SPAQ4PVV.js → chunk-SAFZABH7.js} +1 -1
- package/{chunk-TIJK4PBP.js → chunk-SMZSWB44.js} +1 -1
- package/{chunk-HJKGQPYF.js → chunk-TL6L5XUT.js} +1 -1
- package/{chunk-D4TJCP3V.js → chunk-TVNI5FLG.js} +4 -4
- package/{chunk-5EJZGJS2.js → chunk-UA5S3LQQ.js} +3 -3
- package/{chunk-IEILL33V.js → chunk-UMGHLCDZ.js} +20 -16
- package/{chunk-HLRYI5XO.js → chunk-UTCCPWB2.js} +3 -3
- package/{chunk-KT6LENVP.js → chunk-VHJLQHPQ.js} +2 -2
- package/{chunk-DQD4PYQY.js → chunk-WXPVOQD7.js} +32 -30
- package/{chunk-AGX5TE5W.js → chunk-XKQJJK4F.js} +1 -1
- package/{chunk-GIG262ZG.js → chunk-XMGHGEN6.js} +1 -1
- package/{chunk-4PAFEM6V.js → chunk-XTUY5EL4.js} +16 -12
- package/{chunk-OKCTLCKS.js → chunk-YOXYA2GU.js} +1 -1
- package/{chunk-RJ3TDODF.js → chunk-ZAB3A45K.js} +12 -0
- package/{chunk-YZHP76TR.js → chunk-ZBT3WNBK.js} +1 -1
- package/{contentThunks-RYZTYVUV.js → contentThunks-VURN3DFW.js} +13 -13
- package/{createAgentAutomationAction-GUBB2LWY.js → createAgentAutomationAction-QZAAY77R.js} +13 -13
- package/{createDialogAction-577E6FB2.js → createDialogAction-CHGXVTAC.js} +15 -15
- package/{createPageAction-4CNYIRJ5.js → createPageAction-IOGAFIN7.js} +13 -13
- package/{dbSlice-4CUQE35F.js → dbSlice-YXQ6RYIH.js} +4 -4
- package/{dialogCommands-U4RQIRKK.js → dialogCommands-XREAP6WQ.js} +18 -18
- package/{dialogSlice-YXMORK5T.js → dialogSlice-DOPGWGS4.js} +12 -12
- package/{docCreateCommands-AXXATGCL.js → docCreateCommands-3PYZGSCL.js} +16 -16
- package/{docDeleteCommands-CRPIFYFA.js → docDeleteCommands-3Y6MU44Q.js} +17 -17
- package/{docReadCommands-4IMZXFDR.js → docReadCommands-UBANMAFR.js} +16 -16
- package/{docStore-3U5FBN2O.js → docStore-SYYFBENY.js} +5 -5
- package/{docUpdateCommands-RRPRZXCE.js → docUpdateCommands-4GK2X6BN.js} +16 -16
- package/{handleSendMessageAction-BQIRKHC6.js → handleSendMessageAction-NPVTY2GE.js} +12 -12
- package/index.js +76 -76
- package/{machineCommands-RNBADNTE.js → machineCommands-LES3MCTZ.js} +36 -36
- package/{machineWsRunDispatch-7J6WNF57.js → machineWsRunDispatch-FZLFAUUP.js} +36 -36
- package/{memberThunks-N35XAOC6.js → memberThunks-5T4J6KXQ.js} +5 -5
- package/{offlineMarxistsAgentCommand-GEH6SNNA.js → offlineMarxistsAgentCommand-JEWCIAWM.js} +1 -1
- package/package.json +1 -1
- package/{providerPresetApply-SAJAK7C3.js → providerPresetApply-OCWWKBSD.js} +1 -1
- package/{providerRegistry-COD57OVY.js → providerRegistry-ZJQU7AJ7.js} +1 -1
- package/{read-2PV4PN2E.js → read-M2Q6WEKB.js} +3 -3
- package/{readDocTool-FGK5XGAW.js → readDocTool-T37P3YPB.js} +1 -1
- package/{readlineWorkspace-ZO2W3N4U.js → readlineWorkspace-OZBKHD4T.js} +112 -81
- package/{removeDialogAgentAction-O2POGBOE.js → removeDialogAgentAction-HB3JBVAI.js} +7 -7
- package/{runAgentClientLoop-KJZ7DK6D.js → runAgentClientLoop-3NDADLVE.js} +29 -29
- package/{setDialogExtraReferencesAction-KPSVVY3C.js → setDialogExtraReferencesAction-4XLHRV37.js} +5 -5
- package/{setPrimaryDialogAgentAction-RMJETONI.js → setPrimaryDialogAgentAction-C3JOFC4W.js} +7 -7
- package/{settingSlice-I6MTTNDX.js → settingSlice-CZRURSTH.js} +6 -6
- package/{spaceCommands-VZRYKVWZ.js → spaceCommands-ENYCUUZH.js} +16 -16
- package/{streamAgentChatTurn-L3SO4N2R.js → streamAgentChatTurn-634OFUSR.js} +32 -32
- package/{switchDialogAgentAction-OQSGWVQQ.js → switchDialogAgentAction-C6KVUKJP.js} +4 -4
- package/{tableCommands-SUNTHAYX.js → tableCommands-O6NWHFKV.js} +1 -1
- package/{toolApiClient-VGYUB4P5.js → toolApiClient-7PSIFQPJ.js} +2 -2
- package/{tools-GRV74JPO.js → tools-ILBLCF7D.js} +26 -26
- package/{tuiSummaryLlmCaller-ATDKMGI5.js → tuiSummaryLlmCaller-LFUBZKXK.js} +7 -7
- package/{updateCommands-Y363MC3L.js → updateCommands-2M74UL7P.js} +2 -2
- package/{updateDialogTitleAction-KRUWX66L.js → updateDialogTitleAction-RKFET73N.js} +13 -13
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveRawAgentInput,
|
|
10
10
|
resolveServerUrl,
|
|
11
11
|
writeUsage
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QFMFJZLO.js";
|
|
13
13
|
import {
|
|
14
14
|
agentRunCardLabels,
|
|
15
15
|
createCliLocalRuntimeAdapter,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
resolveLocalUserId,
|
|
28
28
|
t,
|
|
29
29
|
toolLabel
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-UMGHLCDZ.js";
|
|
31
31
|
import {
|
|
32
32
|
createRunActivityTracker,
|
|
33
33
|
popSingleQueueMessage,
|
|
@@ -47,10 +47,10 @@ import {
|
|
|
47
47
|
import {
|
|
48
48
|
readDbRecord,
|
|
49
49
|
resolveAgentRecordFromHybridStore
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-UTCCPWB2.js";
|
|
51
51
|
import {
|
|
52
52
|
isLocalCliAgentKey
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-SAFZABH7.js";
|
|
54
54
|
import {
|
|
55
55
|
CliProviderQuotaError
|
|
56
56
|
} from "./chunk-MP64VFGD.js";
|
|
@@ -63,10 +63,10 @@ import {
|
|
|
63
63
|
} from "./chunk-LTRXGFMS.js";
|
|
64
64
|
import {
|
|
65
65
|
formatAgentListCard
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-WXPVOQD7.js";
|
|
67
67
|
import {
|
|
68
68
|
isTransientFetchError
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-5UTFL4QJ.js";
|
|
70
70
|
import {
|
|
71
71
|
isGatewayHttpStatus
|
|
72
72
|
} from "./chunk-NF64D32W.js";
|
|
@@ -84,11 +84,11 @@ import {
|
|
|
84
84
|
chooseMemoryOwners,
|
|
85
85
|
loadMemoryCandidatesFromDb,
|
|
86
86
|
resolveAgentMemoryPolicy
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-5V4NJHRM.js";
|
|
88
88
|
import {
|
|
89
89
|
API_REPORTED_COST_MULTIPLIER,
|
|
90
90
|
parseUiAskChoiceContent
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-HMEMJ7GH.js";
|
|
92
92
|
import {
|
|
93
93
|
isOAuthApiKeyRef
|
|
94
94
|
} from "./chunk-YYLHWIW6.js";
|
|
@@ -111,16 +111,17 @@ import {
|
|
|
111
111
|
LOCAL_AGENT_CONFIG_MISSING_CODE,
|
|
112
112
|
LOCAL_TURN_ABORTED_CODE,
|
|
113
113
|
readActionGate
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-4BYPU626.js";
|
|
115
115
|
import {
|
|
116
116
|
resolveAgentRuntimeConfigFromRecord
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-QHETQ3KI.js";
|
|
118
118
|
import {
|
|
119
119
|
createThinkParserState,
|
|
120
120
|
flushThinkParser,
|
|
121
121
|
processThinkChunk
|
|
122
122
|
} from "./chunk-N7J63Q6C.js";
|
|
123
123
|
import {
|
|
124
|
+
QUOTA_ERROR_PATTERNS,
|
|
124
125
|
isQuotaExhaustedError,
|
|
125
126
|
isQuotaLimited403Body,
|
|
126
127
|
mergeAvailabilityDeadline,
|
|
@@ -136,10 +137,10 @@ import {
|
|
|
136
137
|
DEFAULT_CONTEXT_WINDOW,
|
|
137
138
|
getModelContextWindow,
|
|
138
139
|
normalizeUsage
|
|
139
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-F2CGG72C.js";
|
|
140
141
|
import {
|
|
141
142
|
clipCompactText
|
|
142
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-VHJLQHPQ.js";
|
|
143
144
|
import {
|
|
144
145
|
findModelConfig
|
|
145
146
|
} from "./chunk-VRLI2WNW.js";
|
|
@@ -182,10 +183,10 @@ import {
|
|
|
182
183
|
BUILTIN_NOLO_AGENT_KEY,
|
|
183
184
|
BUILTIN_NOLO_AGENT_NAME,
|
|
184
185
|
builtinAgentCatalogEntryById
|
|
185
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-TL6L5XUT.js";
|
|
186
187
|
import {
|
|
187
188
|
parsePublicAgentId
|
|
188
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-GII32WZW.js";
|
|
189
190
|
import {
|
|
190
191
|
isLevelNotFoundError
|
|
191
192
|
} from "./chunk-OW765XBU.js";
|
|
@@ -10417,7 +10418,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
|
|
|
10417
10418
|
// packages/cli/client/agentRun.ts
|
|
10418
10419
|
import { ulid as ulid2 } from "ulid";
|
|
10419
10420
|
async function loadRunLocalAgentTurn() {
|
|
10420
|
-
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-
|
|
10421
|
+
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-2JFG4HDU.js");
|
|
10421
10422
|
return runLocalAgentTurn;
|
|
10422
10423
|
}
|
|
10423
10424
|
var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
|
|
@@ -10680,27 +10681,62 @@ function isMissingLocalAgentConfigError(error, agentRef) {
|
|
|
10680
10681
|
}
|
|
10681
10682
|
var PROVIDER_HTTP_FAILED_RE = /(.+?) provider failed:\s*HTTP\s+(\d+)\b/i;
|
|
10682
10683
|
var PLATFORM_TRANSPORT_RE = /\bplatform provider failed\b/i;
|
|
10684
|
+
var EXTRA_RATE_LIMIT_TEXT_RE = /\brate[\s_-]?limit(?:ed|ing|s)?\b|\bresource[_\s-]?exhausted\b|\bmax_concurrent_reached\b/i;
|
|
10685
|
+
function looksLikeRateLimitedText(message) {
|
|
10686
|
+
return EXTRA_RATE_LIMIT_TEXT_RE.test(message) || QUOTA_ERROR_PATTERNS.some((pattern) => pattern.test(message));
|
|
10687
|
+
}
|
|
10688
|
+
var AUTH_TEXT_SIGNAL_RE = /\b401\b|unauthori[sz]ed|invalid[_\s-]?(?:api[_\s-]?key|token|credential)s?|(?:api[_\s-]?key|token|credential)s?[_\s-](?:invalid|expired|rejected|missing|not[_\s-]?found)|authentication[_\s-]?(?:error|failed|required)/i;
|
|
10689
|
+
var QUOTA_EXHAUSTED_EXTRA_RE = /insufficient[_\s-]?(?:quota|balance|credits?)|余额不足|额度已?用尽/i;
|
|
10690
|
+
function looksLikeQuotaExhaustedText(message) {
|
|
10691
|
+
return isQuotaLimited403Body(message) || QUOTA_EXHAUSTED_EXTRA_RE.test(message);
|
|
10692
|
+
}
|
|
10693
|
+
var BARE_UPSTREAM_5XX_RE = /\bHTTP[:\s]+(5\d\d)\b|\bstatus[:\s=]+(5\d\d)\b|\breturned error\s+(5\d\d)\b/i;
|
|
10683
10694
|
function classifyLocalRunError(message) {
|
|
10684
10695
|
const m = message.match(PROVIDER_HTTP_FAILED_RE);
|
|
10685
|
-
if (
|
|
10686
|
-
|
|
10687
|
-
|
|
10688
|
-
|
|
10689
|
-
|
|
10690
|
-
|
|
10691
|
-
|
|
10692
|
-
|
|
10693
|
-
|
|
10694
|
-
|
|
10695
|
-
|
|
10696
|
+
if (m) {
|
|
10697
|
+
const status = Number(m[2]);
|
|
10698
|
+
const transport2 = PLATFORM_TRANSPORT_RE.test(message) ? "platform" : "local";
|
|
10699
|
+
const quotaExhausted = looksLikeQuotaExhaustedText(message);
|
|
10700
|
+
if (status === 401) {
|
|
10701
|
+
return { kind: "auth", transport: transport2, status };
|
|
10702
|
+
}
|
|
10703
|
+
if (status === 403) {
|
|
10704
|
+
return quotaExhausted ? { kind: "rate-limit", transport: transport2, status, quotaExhausted: true } : { kind: "auth", transport: transport2, status };
|
|
10705
|
+
}
|
|
10706
|
+
if (status === 400 || status === 422) {
|
|
10707
|
+
return { kind: "rejected-payload", transport: transport2, status };
|
|
10708
|
+
}
|
|
10709
|
+
if (status === 429) {
|
|
10710
|
+
return {
|
|
10711
|
+
kind: "rate-limit",
|
|
10712
|
+
transport: transport2,
|
|
10713
|
+
status,
|
|
10714
|
+
...quotaExhausted ? { quotaExhausted: true } : {}
|
|
10715
|
+
};
|
|
10716
|
+
}
|
|
10717
|
+
if (status >= 500 && status <= 599) {
|
|
10718
|
+
return { kind: "transient", transport: transport2, status };
|
|
10719
|
+
}
|
|
10720
|
+
return { kind: "upstream", transport: transport2, status };
|
|
10696
10721
|
}
|
|
10697
|
-
|
|
10698
|
-
|
|
10722
|
+
const transport = PLATFORM_TRANSPORT_RE.test(message) ? "platform" : "local";
|
|
10723
|
+
if (AUTH_TEXT_SIGNAL_RE.test(message)) return { kind: "generic" };
|
|
10724
|
+
if (looksLikeRateLimitedText(message)) {
|
|
10725
|
+
const quotaExhausted = looksLikeQuotaExhaustedText(message);
|
|
10726
|
+
return {
|
|
10727
|
+
kind: "rate-limit",
|
|
10728
|
+
transport,
|
|
10729
|
+
status: 429,
|
|
10730
|
+
statusInferred: true,
|
|
10731
|
+
...quotaExhausted ? { quotaExhausted: true } : {}
|
|
10732
|
+
};
|
|
10699
10733
|
}
|
|
10700
|
-
|
|
10734
|
+
const bare5xx = message.match(BARE_UPSTREAM_5XX_RE);
|
|
10735
|
+
if (bare5xx) {
|
|
10736
|
+
const status = Number(bare5xx[1] ?? bare5xx[2] ?? bare5xx[3]);
|
|
10701
10737
|
return { kind: "transient", transport, status };
|
|
10702
10738
|
}
|
|
10703
|
-
return { kind: "
|
|
10739
|
+
return { kind: "generic" };
|
|
10704
10740
|
}
|
|
10705
10741
|
var HISTORY_REPLAY_REJECTION_RE = /invalid_request_error|invalid\s+tool\s+call\s+arguments?/i;
|
|
10706
10742
|
var RUN_UNAVAILABLE_PREFIX = "[nolo] auto runtime: local run unavailable";
|
|
@@ -10721,9 +10757,18 @@ function buildRejectedPayloadFailure(ctx) {
|
|
|
10721
10757
|
return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status}, the provider rejected the request body \u2014 this is NOT a local credential/config issue). Detail: ${ctx.message}${cause} ${NO_FALLBACK} Use --server to run on the server explicitly, or start a fresh dialog.
|
|
10722
10758
|
`;
|
|
10723
10759
|
}
|
|
10760
|
+
var RATE_LIMIT_RESET_HINT_RE = /retry[-_\s]?after\s*[:=]?\s*\d[\w:-]*|resets?\s+(?:in|at)\s+\d[\w:-]*(?:[ T]\d[\w:-]*)?/i;
|
|
10761
|
+
function extractRateLimitResetHint(message) {
|
|
10762
|
+
const match = message.match(RATE_LIMIT_RESET_HINT_RE);
|
|
10763
|
+
return match ? match[0].trim() : void 0;
|
|
10764
|
+
}
|
|
10724
10765
|
function buildRateLimitFailure(ctx) {
|
|
10725
10766
|
const cooldownNote = ctx.cooldownUntil ? ` \u5DF2\u6807\u8BB0\u51B7\u5374\u81F3 ${ctx.cooldownUntil}\uFF0C\u5230\u671F\u524D\u6D3E\u53D1\u4F1A\u88AB\u51B7\u5374\u95E8\u63A7\u62E6\u622A\uFF08\u5230\u671F\u81EA\u52A8 probe \u6062\u590D\uFF09\u3002` : "";
|
|
10726
|
-
|
|
10767
|
+
const headline = ctx.statusInferred ? `${ctx.where} hit an upstream rate-limit/quota error` : `${ctx.where} returned HTTP ${ctx.status}, rate limited`;
|
|
10768
|
+
const cause = ctx.quotaExhausted ? "The upstream quota/balance for this agent is exhausted \u2014 NOT a local credential/config issue" : "This agent is being throttled by the upstream provider \u2014 NOT a local credential/config issue";
|
|
10769
|
+
const reset = extractRateLimitResetHint(ctx.message);
|
|
10770
|
+
const advice = ctx.quotaExhausted ? `Retry after the upstream quota resets${reset ? ` (${reset})` : ""}` : `Retry shortly${reset ? ` (${reset})` : ""}`;
|
|
10771
|
+
return `${RUN_UNAVAILABLE_PREFIX} (${headline}). Detail: ${ctx.message} ${NO_FALLBACK} ${cause}. ${advice}, switch to another agent (\`nolo agent list\`), ${SERVER_FALLBACK_HINT}${cooldownNote}
|
|
10727
10772
|
`;
|
|
10728
10773
|
}
|
|
10729
10774
|
function buildTransientFailure(ctx) {
|
|
@@ -10818,6 +10863,8 @@ function describeLocalRunFailure(message, rawError) {
|
|
|
10818
10863
|
message,
|
|
10819
10864
|
where: cls.transport === "platform" ? "server chat proxy" : "local provider",
|
|
10820
10865
|
status: cls.status,
|
|
10866
|
+
...cls.statusInferred ? { statusInferred: true } : {},
|
|
10867
|
+
...cls.quotaExhausted ? { quotaExhausted: true } : {},
|
|
10821
10868
|
...cooldownUntil ? { cooldownUntil } : {}
|
|
10822
10869
|
};
|
|
10823
10870
|
return FAILURE_BUILDERS[cls.kind](ctx);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
clipMultilineText,
|
|
9
9
|
fetchAndSerializeTable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WXPVOQD7.js";
|
|
11
11
|
import {
|
|
12
12
|
isGatewayHttpStatus
|
|
13
13
|
} from "./chunk-NF64D32W.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-3L2WKC3W.js";
|
|
20
20
|
import {
|
|
21
21
|
slateToSimplifiedMarkdown
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZBT3WNBK.js";
|
|
23
23
|
import {
|
|
24
24
|
waitForAbortableDelay
|
|
25
25
|
} from "./chunk-N4G4PKQ6.js";
|
|
@@ -28,26 +28,26 @@ import {
|
|
|
28
28
|
} from "./chunk-MEYIRKDN.js";
|
|
29
29
|
import {
|
|
30
30
|
fetchAndCacheMessages
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HMEMJ7GH.js";
|
|
32
32
|
import {
|
|
33
33
|
shouldUseServerProxy
|
|
34
34
|
} from "./chunk-YYLHWIW6.js";
|
|
35
35
|
import {
|
|
36
36
|
fetchServerSyncedCredential
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-TVNI5FLG.js";
|
|
38
38
|
import {
|
|
39
39
|
buildSkillGuidancePromptBlock,
|
|
40
40
|
extractRuntimePageCapabilities,
|
|
41
41
|
resolveBuiltinSkillPage,
|
|
42
42
|
resolveSkillGraphFromRoots
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-2ADBVBEM.js";
|
|
44
44
|
import {
|
|
45
45
|
buildIdentityBlock,
|
|
46
46
|
buildRuntimeGuidanceBlocks,
|
|
47
47
|
compileContextLayers,
|
|
48
48
|
normalizeChatCompletionsBodyForProvider,
|
|
49
49
|
resolveToolGuidedSections
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-N3OAPEZE.js";
|
|
51
51
|
import {
|
|
52
52
|
convertMessagesToResponsesInput,
|
|
53
53
|
getUsageRequestOptions,
|
|
@@ -99,13 +99,13 @@ import {
|
|
|
99
99
|
} from "./chunk-UAD2WT54.js";
|
|
100
100
|
import {
|
|
101
101
|
read
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-UA5S3LQQ.js";
|
|
103
103
|
import {
|
|
104
104
|
asTrimmedLowercaseString
|
|
105
105
|
} from "./chunk-QSJ3HFEF.js";
|
|
106
106
|
import {
|
|
107
107
|
extractCustomId
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-GII32WZW.js";
|
|
109
109
|
import {
|
|
110
110
|
getRuntimeServerContext
|
|
111
111
|
} from "./chunk-UKWGR5SS.js";
|
|
@@ -285,6 +285,27 @@ function saveProfileAgentSelection(selection, path = getDefaultProfileConfigPath
|
|
|
285
285
|
`, "utf8");
|
|
286
286
|
return config;
|
|
287
287
|
}
|
|
288
|
+
function getProfileOAuthSync(provider, path = getDefaultProfileConfigPath()) {
|
|
289
|
+
const config = loadProfileConfig(path);
|
|
290
|
+
if (!config) return void 0;
|
|
291
|
+
const profile = config.profiles[config.currentProfile];
|
|
292
|
+
return profile?.oauthSync?.[provider];
|
|
293
|
+
}
|
|
294
|
+
function saveProfileOAuthSync(provider, sync, path = getDefaultProfileConfigPath()) {
|
|
295
|
+
if (isProtectedHomeProfileWrite(path)) return null;
|
|
296
|
+
const config = loadProfileConfig(path);
|
|
297
|
+
if (!config) return null;
|
|
298
|
+
const profile = config.profiles[config.currentProfile];
|
|
299
|
+
if (!profile) return null;
|
|
300
|
+
profile.oauthSync = {
|
|
301
|
+
...profile.oauthSync ?? {},
|
|
302
|
+
[provider]: sync
|
|
303
|
+
};
|
|
304
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
305
|
+
writeFileSync(path, `${JSON.stringify(config, null, 2)}
|
|
306
|
+
`, "utf8");
|
|
307
|
+
return config;
|
|
308
|
+
}
|
|
288
309
|
|
|
289
310
|
export {
|
|
290
311
|
getDefaultProfileConfigPath,
|
|
@@ -299,5 +320,7 @@ export {
|
|
|
299
320
|
saveProfileLocale,
|
|
300
321
|
getAgentSelectionAuditPath,
|
|
301
322
|
readLastAgentSelectionAudit,
|
|
302
|
-
saveProfileAgentSelection
|
|
323
|
+
saveProfileAgentSelection,
|
|
324
|
+
getProfileOAuthSync,
|
|
325
|
+
saveProfileOAuthSync
|
|
303
326
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCliLocalRuntimePreparedAgentCache
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UMGHLCDZ.js";
|
|
4
4
|
import {
|
|
5
5
|
getReadableCliDb
|
|
6
6
|
} from "./chunk-LS2ZANRJ.js";
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
resolveAgentRecordFromHybridStore,
|
|
13
13
|
sanitizeAgentRecordForCliOutput,
|
|
14
14
|
writeAgentRecord
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UTCCPWB2.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveCliAgentKeyInput
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-SAFZABH7.js";
|
|
19
19
|
import {
|
|
20
20
|
toErrorMessage
|
|
21
21
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -212,7 +212,7 @@ async function runAgentCreateCommand(args, deps = {}) {
|
|
|
212
212
|
clearCliLocalRuntimePreparedAgentCache();
|
|
213
213
|
let verifyResult;
|
|
214
214
|
if (parsed.verify) {
|
|
215
|
-
const { verifyCustomProvider } = await import("./agentProviderCommands-
|
|
215
|
+
const { verifyCustomProvider } = await import("./agentProviderCommands-ZBYHGTGY.js");
|
|
216
216
|
const rec = built.nextRecord;
|
|
217
217
|
verifyResult = await verifyCustomProvider({
|
|
218
218
|
providerUrl: rec.customProviderUrl,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
normalizeTimingMs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VHJLQHPQ.js";
|
|
4
4
|
import {
|
|
5
5
|
MODEL_LOOKUP_MAP
|
|
6
6
|
} from "./chunk-VRLI2WNW.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-WWC7I6TA.js";
|
|
16
16
|
import {
|
|
17
17
|
BUILTIN_NOLO_AGENT_KEY
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TL6L5XUT.js";
|
|
19
19
|
import {
|
|
20
20
|
asOptionalTrimmedString
|
|
21
21
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
initReactI18next,
|
|
10
10
|
instance,
|
|
11
11
|
toast
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HMEMJ7GH.js";
|
|
13
13
|
import {
|
|
14
14
|
require_date_fns
|
|
15
15
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-YDH3FDFQ.js";
|
|
19
19
|
import {
|
|
20
20
|
isSystemAdmin
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-RZANZZL2.js";
|
|
22
22
|
import {
|
|
23
23
|
asRecordOrEmpty
|
|
24
24
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
addContentAction,
|
|
28
28
|
checkSpaceMembership,
|
|
29
29
|
localSpaceAuthorityPatchStamp
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-4DRWWIOL.js";
|
|
31
31
|
import {
|
|
32
32
|
createSpaceKey,
|
|
33
33
|
normalizeSpaceId
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
uploadFileAction,
|
|
42
42
|
upsertSSREntity,
|
|
43
43
|
write
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-UA5S3LQQ.js";
|
|
45
45
|
import {
|
|
46
46
|
SEPARATOR,
|
|
47
47
|
asTrimmedNonEmptyStringArray,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
} from "./chunk-WWC7I6TA.js";
|
|
60
60
|
import {
|
|
61
61
|
extractUserId
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-GII32WZW.js";
|
|
63
63
|
import {
|
|
64
64
|
DEVICE_LOCAL_OWNER_ID,
|
|
65
65
|
createAsyncThunk,
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A2C4AKKM.js";
|
|
11
11
|
import {
|
|
12
12
|
fetchWithTransientRetry
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5UTFL4QJ.js";
|
|
14
14
|
import {
|
|
15
15
|
DRAIN_EXHAUSTED_USER_MESSAGE,
|
|
16
16
|
isDrainExhaustedResponse
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
boundSummaryText,
|
|
31
31
|
buildDialogReadEnvelope,
|
|
32
32
|
projectDialogReadForAgent
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-YOXYA2GU.js";
|
|
34
34
|
import {
|
|
35
35
|
toErrorMessage
|
|
36
36
|
} from "./chunk-HNMXYYJR.js";
|