nolo-cli 0.138.0-alpha.1 → 0.139.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-JWLH2Z7S.js → _executeModel-HXIPDI7Q.js} +14 -13
- package/{agentDeleteCommand-UZGJZS5J.js → agentDeleteCommand-DAM4LEEO.js} +1 -1
- package/{agentEmailCommands-2SVG6LS3.js → agentEmailCommands-7QB2RPWW.js} +13 -13
- package/{agentListCommands-GADYFX2S.js → agentListCommands-T3V5EL27.js} +1 -1
- package/{agentMachineCommands-JALXFO3Y.js → agentMachineCommands-DL53ZAIR.js} +2 -2
- package/{agentRecordCommands-INRNLAFR.js → agentRecordCommands-HVRESCTP.js} +13 -13
- package/{agentRunCommand-TKHBLWSI.js → agentRunCommand-ETERBOFG.js} +13 -13
- package/{agentRuntimeLocal-F44W2XTL.js → agentRuntimeLocal-DKFAWMRZ.js} +1 -1
- package/{agentSlice-T53NW4SS.js → agentSlice-EO7LL6VT.js} +1 -1
- package/{appDeleteCommands-GEVEUPWJ.js → appDeleteCommands-PBCGWJZQ.js} +1 -1
- package/{appDeployCommands-FMAHPMA2.js → appDeployCommands-E7KRDPZ5.js} +1 -1
- package/{appDeployStatusCommands-7DRR4X7F.js → appDeployStatusCommands-TZ64EREZ.js} +1 -1
- package/{appGetCommands-EOULTSHM.js → appGetCommands-3M2OIBJ3.js} +1 -1
- package/{appListCommands-ARJVCFDJ.js → appListCommands-D7H6I62Y.js} +1 -1
- package/{chatQueueReduxAdapter-GSD7C24T.js → chatQueueReduxAdapter-27524QLC.js} +2 -2
- package/chunk-6OTOA5MH.js +108 -0
- package/{chunk-TNYKI3LI.js → chunk-6SFO23NA.js} +5 -5
- package/{chunk-J2RGIFX5.js → chunk-COTFAI7O.js} +2 -2
- package/{chunk-DXXCZYEZ.js → chunk-D3LZLKAK.js} +9 -9
- package/{chunk-ZWJ6WQBO.js → chunk-EUND6AAM.js} +1 -1
- package/chunk-GOMR6S5Z.js +83 -0
- package/{chunk-MLXQO7X4.js → chunk-ISZR4Z6A.js} +3 -3
- package/{chunk-2LFG5CGH.js → chunk-JZEK4KCJ.js} +1 -1
- package/{chunk-ZTQANKS2.js → chunk-L5HM63XP.js} +2 -2
- package/{chunk-PA2BRUNR.js → chunk-MPRCVW4J.js} +3 -3
- package/{chunk-KQW2EHWB.js → chunk-MS4ZBOMR.js} +19 -78
- package/{chunk-FSEVS4U3.js → chunk-PARMU7Z2.js} +16 -8
- package/chunk-PWOXYPE6.js +194 -0
- package/{chunk-27YNIIBN.js → chunk-TW6MNSWL.js} +2 -2
- package/{chunk-VIOF5352.js → chunk-TZU6NT4E.js} +8 -6
- package/{chunk-TTMVLXU5.js → chunk-WZYWLD6H.js} +6 -108
- package/{chunk-3SPFKUP5.js → chunk-XSSTHNXQ.js} +1 -1
- package/{chunk-IEEGKL6X.js → chunk-YBUA6LCU.js} +2068 -1700
- package/{commandRegistry-DMS5KFOK.js → commandRegistry-EKKQFWXE.js} +40 -40
- package/{contentThunks-SDVFY3MX.js → contentThunks-HY5AO3KY.js} +3 -3
- package/{createAgentAutomationAction-CD6QYRC2.js → createAgentAutomationAction-JHE3IIMX.js} +3 -3
- package/{createDialogAction-MB6BOVJJ.js → createDialogAction-GE4SGFZE.js} +4 -4
- package/{createPageAction-Y2A5MARX.js → createPageAction-5W7SP33M.js} +3 -3
- package/{dialogCommands-G7ZTYMIA.js → dialogCommands-FBSQ4KJR.js} +2 -2
- package/{dialogSlice-5C3POHWD.js → dialogSlice-6CW6J5FW.js} +2 -2
- package/{docCreateCommands-AEZC5UXB.js → docCreateCommands-N2TPCEZ7.js} +1 -1
- package/{docDeleteCommands-DXXYWOXH.js → docDeleteCommands-FJA7Q6CI.js} +1 -1
- package/{docReadCommands-G6PL2543.js → docReadCommands-2UZB5OR7.js} +1 -1
- package/{docStore-ZX7AIY5W.js → docStore-3RP3DE4Q.js} +1 -1
- package/{docUpdateCommands-TWKJOXYT.js → docUpdateCommands-BID4C3QP.js} +1 -1
- package/{handleSendMessageAction-2AF42N6F.js → handleSendMessageAction-TFHLM7KU.js} +274 -6
- package/index.js +2 -2
- package/{machineCommands-ZY5BB4O3.js → machineCommands-NSYLVEE7.js} +13 -13
- package/{machineWsRunDispatch-5XE37H4C.js → machineWsRunDispatch-N2VXL5QL.js} +13 -13
- package/package.json +1 -1
- package/{readlineWorkspace-HDAVBAL5.js → readlineWorkspace-MP5KA4H4.js} +13 -13
- package/{runAgentClientLoop-TVA5UASR.js → runAgentClientLoop-DQ2JSJBW.js} +12 -11
- package/{spaceCommands-G2UBKO4F.js → spaceCommands-TKFZFVCA.js} +1 -1
- package/{streamAgentChatTurn-B6H35UWR.js → streamAgentChatTurn-T6F23DOK.js} +30 -210
- package/{tools-EEAEICHM.js → tools-YCF5PGD5.js} +9 -9
- package/{updateDialogTitleAction-UPPVYQ7R.js → updateDialogTitleAction-5IKSGO4I.js} +3 -3
- package/chunk-N4G4PKQ6.js +0 -23
|
@@ -4,22 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
getLocalProviderSecret
|
|
6
6
|
} from "./chunk-HS7MLR74.js";
|
|
7
|
+
import {
|
|
8
|
+
performServerProxyFetchWithRetry
|
|
9
|
+
} from "./chunk-6OTOA5MH.js";
|
|
7
10
|
import {
|
|
8
11
|
clipMultilineText,
|
|
9
12
|
fetchAndSerializeTable
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
isGatewayHttpStatus
|
|
13
|
-
} from "./chunk-NF64D32W.js";
|
|
14
|
-
import {
|
|
15
|
-
createDrainExhaustedResponse,
|
|
16
|
-
isCoreDrainingBody,
|
|
17
|
-
normalizeNonNegativeMs,
|
|
18
|
-
parseRetryAfterHeaderMs
|
|
19
|
-
} from "./chunk-3L2WKC3W.js";
|
|
20
|
-
import {
|
|
21
|
-
waitForAbortableDelay
|
|
22
|
-
} from "./chunk-N4G4PKQ6.js";
|
|
13
|
+
} from "./chunk-MS4ZBOMR.js";
|
|
23
14
|
import {
|
|
24
15
|
resolvePageReadMarkdown,
|
|
25
16
|
slateToSimplifiedMarkdown
|
|
@@ -29,13 +20,13 @@ import {
|
|
|
29
20
|
} from "./chunk-MEYIRKDN.js";
|
|
30
21
|
import {
|
|
31
22
|
fetchAndCacheMessages
|
|
32
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-PARMU7Z2.js";
|
|
33
24
|
import {
|
|
34
25
|
shouldUseServerProxy
|
|
35
26
|
} from "./chunk-YYLHWIW6.js";
|
|
36
27
|
import {
|
|
37
28
|
fetchServerSyncedCredential
|
|
38
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-MPRCVW4J.js";
|
|
39
30
|
import {
|
|
40
31
|
buildSkillGuidancePromptBlock,
|
|
41
32
|
extractRuntimePageCapabilities,
|
|
@@ -109,9 +100,6 @@ import {
|
|
|
109
100
|
import {
|
|
110
101
|
getRuntimeServerContext
|
|
111
102
|
} from "./chunk-AUXHZ2M5.js";
|
|
112
|
-
import {
|
|
113
|
-
isAbortError
|
|
114
|
-
} from "./chunk-QOKAKDPE.js";
|
|
115
103
|
import {
|
|
116
104
|
isRecord
|
|
117
105
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -1073,95 +1061,6 @@ var generateRequestBody = ({
|
|
|
1073
1061
|
return applyImageConfigIfNeeded(baseBody, agentConfigForRequest, provider);
|
|
1074
1062
|
};
|
|
1075
1063
|
|
|
1076
|
-
// packages/ai/chat/serverProxyRetry.ts
|
|
1077
|
-
var DEFAULT_SERVER_PROXY_RETRY_AFTER_MS = 1500;
|
|
1078
|
-
var MAX_SERVER_PROXY_RETRIES = 2;
|
|
1079
|
-
var MAX_STATUS_RETRIES = 3;
|
|
1080
|
-
var MAX_SERVER_DRAIN_STATUS_RETRIES = 30;
|
|
1081
|
-
var readRetryableResponseBody = async (response) => {
|
|
1082
|
-
try {
|
|
1083
|
-
return await response.clone().json();
|
|
1084
|
-
} catch {
|
|
1085
|
-
return null;
|
|
1086
|
-
}
|
|
1087
|
-
};
|
|
1088
|
-
var resolveServerProxyRetryAfterMs = (response, body) => parseRetryAfterHeaderMs(response.headers.get("Retry-After")) ?? normalizeNonNegativeMs(
|
|
1089
|
-
body?.retryAfterMs,
|
|
1090
|
-
DEFAULT_SERVER_PROXY_RETRY_AFTER_MS
|
|
1091
|
-
);
|
|
1092
|
-
var isRetryableServerProxyFetchError = (error) => {
|
|
1093
|
-
if (!error || isAbortError(error)) return false;
|
|
1094
|
-
const message = typeof error?.message === "string" ? error.message : String(error);
|
|
1095
|
-
return /ECONNREFUSED|ECONNRESET|EPIPE|socket hang up|network error|failed to fetch|fetch failed|connection closed|load failed|502|503|504/i.test(
|
|
1096
|
-
message
|
|
1097
|
-
);
|
|
1098
|
-
};
|
|
1099
|
-
var waitForServerProxyRetry = async (retryAfterMs, signal) => {
|
|
1100
|
-
const delayMs = normalizeNonNegativeMs(
|
|
1101
|
-
retryAfterMs,
|
|
1102
|
-
DEFAULT_SERVER_PROXY_RETRY_AFTER_MS
|
|
1103
|
-
);
|
|
1104
|
-
if (delayMs <= 0) return;
|
|
1105
|
-
await waitForAbortableDelay(delayMs, signal);
|
|
1106
|
-
};
|
|
1107
|
-
var performServerProxyFetchWithRetry = async ({
|
|
1108
|
-
execute,
|
|
1109
|
-
signal,
|
|
1110
|
-
logPrefix = "[fetchWithServerProxy]",
|
|
1111
|
-
onRetry,
|
|
1112
|
-
retryNetworkErrors = true
|
|
1113
|
-
}) => {
|
|
1114
|
-
let networkRetries = 0;
|
|
1115
|
-
let statusRetries = 0;
|
|
1116
|
-
while (true) {
|
|
1117
|
-
try {
|
|
1118
|
-
const response = await execute();
|
|
1119
|
-
const responseBody = response.status === 503 ? await readRetryableResponseBody(response) : null;
|
|
1120
|
-
const isCoreDraining = response.status === 503 && isCoreDrainingBody(responseBody);
|
|
1121
|
-
const maxStatusRetries = isCoreDraining ? MAX_SERVER_DRAIN_STATUS_RETRIES : MAX_STATUS_RETRIES;
|
|
1122
|
-
if (statusRetries < maxStatusRetries && isGatewayHttpStatus(response.status)) {
|
|
1123
|
-
statusRetries += 1;
|
|
1124
|
-
const retryAfterMs = resolveServerProxyRetryAfterMs(
|
|
1125
|
-
response,
|
|
1126
|
-
responseBody
|
|
1127
|
-
);
|
|
1128
|
-
console.warn(
|
|
1129
|
-
`${logPrefix} \u68C0\u6D4B\u5230${response.status}\u72B6\u6001\uFF0C${retryAfterMs}ms\u540E\u91CD\u8BD5...`
|
|
1130
|
-
);
|
|
1131
|
-
onRetry?.({
|
|
1132
|
-
attempt: statusRetries,
|
|
1133
|
-
maxAttempts: maxStatusRetries,
|
|
1134
|
-
delayMs: retryAfterMs
|
|
1135
|
-
});
|
|
1136
|
-
await waitForServerProxyRetry(retryAfterMs, signal);
|
|
1137
|
-
continue;
|
|
1138
|
-
}
|
|
1139
|
-
if (isCoreDraining) {
|
|
1140
|
-
console.warn(`${logPrefix} core_draining \u91CD\u8BD5\u8017\u5C3D\uFF0C\u8FD4\u56DE\u53CB\u597D\u63D0\u793A`);
|
|
1141
|
-
return createDrainExhaustedResponse(response);
|
|
1142
|
-
}
|
|
1143
|
-
return response;
|
|
1144
|
-
} catch (error) {
|
|
1145
|
-
if (retryNetworkErrors && networkRetries < MAX_SERVER_PROXY_RETRIES && isRetryableServerProxyFetchError(error)) {
|
|
1146
|
-
networkRetries += 1;
|
|
1147
|
-
const retryDelay = networkRetries * 1e3;
|
|
1148
|
-
console.warn(
|
|
1149
|
-
`${logPrefix} \u68C0\u6D4B\u5230\u7F51\u7EDC\u77AC\u65AD\uFF0C${retryDelay}ms\u540E\u91CD\u8BD5(\u7B2C${networkRetries}\u6B21)...`,
|
|
1150
|
-
error
|
|
1151
|
-
);
|
|
1152
|
-
onRetry?.({
|
|
1153
|
-
attempt: networkRetries,
|
|
1154
|
-
maxAttempts: MAX_SERVER_PROXY_RETRIES,
|
|
1155
|
-
delayMs: retryDelay
|
|
1156
|
-
});
|
|
1157
|
-
await waitForServerProxyRetry(retryDelay, signal);
|
|
1158
|
-
continue;
|
|
1159
|
-
}
|
|
1160
|
-
throw error;
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
};
|
|
1164
|
-
|
|
1165
1064
|
// packages/ai/chat/resolveDirectRequestApiKey.ts
|
|
1166
1065
|
var DIRECT_API_KEY_UNAVAILABLE_MESSAGE = "\u65E0\u6CD5\u52A0\u8F7D\u672C\u5730 API \u5BC6\u94A5\u3002\u8BF7\u5728 Agent \u8BBE\u7F6E\u4E2D\u91CD\u65B0\u586B\u5199\u5BC6\u94A5\uFF0C\u6216\u786E\u8BA4\u672C\u673A\u51ED\u636E\u53EF\u7528\u3002";
|
|
1167
1066
|
var DirectApiKeyResolutionError = class extends Error {
|
|
@@ -1904,7 +1803,6 @@ export {
|
|
|
1904
1803
|
resolveClientWire,
|
|
1905
1804
|
resolveAgentCallPlan,
|
|
1906
1805
|
generateRequestBody,
|
|
1907
|
-
performServerProxyFetchWithRetry,
|
|
1908
1806
|
performFetchRequest,
|
|
1909
1807
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
1910
1808
|
parseToolCallArguments,
|