nolo-cli 0.8.0-alpha.20 → 0.8.0-alpha.23
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-WRUCQIV5.js → _executeModel-YXTTYRXS.js} +45 -44
- package/{action-R4M4ORGA.js → action-QM2ONPYZ.js} +10 -10
- package/{addContentAction-UYFFTEWJ.js → addContentAction-UXY3GM53.js} +9 -9
- package/{addDialogAgentAction-OT4XZAVP.js → addDialogAgentAction-MUBYOG65.js} +11 -11
- package/{agentDeleteCommand-5DD2IM3J.js → agentDeleteCommand-4NO7Y6UI.js} +28 -27
- package/{agentEmailCommands-IASM2YBQ.js → agentEmailCommands-NPP5TGZV.js} +61 -59
- package/{agentListCommands-I6KZYCIG.js → agentListCommands-IP5BNB5W.js} +32 -30
- package/{agentMachineCommands-OUP3YQP7.js → agentMachineCommands-24NFTIKY.js} +27 -26
- package/{agentPullCommand-O2MTUAFR.js → agentPullCommand-N6UWRTVL.js} +3 -3
- package/{agentRecordCommands-QKGE2JTA.js → agentRecordCommands-7AWSR46F.js} +52 -50
- package/{agentRunCommand-TVZXUBQ5.js → agentRunCommand-P46WCJ6P.js} +56 -53
- package/{agentRunControl-K4VKNEHF.js → agentRunControl-S3G62M6C.js} +3 -3
- package/{agentRuntimeLocal-ZYEIPTY4.js → agentRuntimeLocal-V5UV7S4R.js} +14 -12
- package/{agentSlice-T4PMW7W6.js → agentSlice-3CVAZZOP.js} +10 -10
- package/{authCommand-EB5JSOX5.js → authCommand-B6P2XYLN.js} +11 -11
- package/{authCommands-XPEHTKSM.js → authCommands-4YKA4GTU.js} +7 -7
- package/{chunk-PMKQGGGM.js → chunk-2CVZSC5L.js} +1 -1
- package/{chunk-4FBRSEV4.js → chunk-4VA3UQRF.js} +9 -9
- package/{chunk-BCIOM4NZ.js → chunk-5NYGMN4O.js} +15 -15
- package/{chunk-AGFH73SK.js → chunk-6KRA6AWI.js} +1 -1
- package/{chunk-P3PKED2I.js → chunk-6OHYC4BY.js} +9 -12
- package/{chunk-5KLGBAAR.js → chunk-6UUD2WES.js} +1 -1
- package/{chunk-QJ7FZNYN.js → chunk-A4MYG3TR.js} +18 -20
- package/{chunk-2FTTDCD4.js → chunk-AMJ7LA5D.js} +1 -1
- package/chunk-AOKWJZ5N.js +4884 -0
- package/{chunk-JRKKFRAV.js → chunk-AWY2AFHN.js} +9 -5
- package/{chunk-RL776AGR.js → chunk-BB2PII22.js} +1 -1
- package/{chunk-RGIM3WLT.js → chunk-BFDWXLFF.js} +2 -2
- package/{chunk-VVX233PH.js → chunk-BT37DVDA.js} +9 -9
- package/chunk-BYXBJQAS.js +0 -0
- package/{chunk-C3RUNRHT.js → chunk-D55DXHXL.js} +1 -1
- package/{chunk-7DAJ4AI4.js → chunk-DSNLHTP3.js} +2 -2
- package/{chunk-XBROXIGL.js → chunk-DVRHHFEA.js} +11 -11
- package/{chunk-SDJDLO5W.js → chunk-EUN3SYY7.js} +5 -5
- package/{chunk-7T5PWAZN.js → chunk-HAC6GPRE.js} +2 -2
- package/{chunk-CKOJQDKR.js → chunk-JEMATI63.js} +1 -1
- package/{chunk-GLYVN7EQ.js → chunk-JTINRTBT.js} +2 -2
- package/{chunk-YPRZSPF3.js → chunk-KLOCUWKZ.js} +1 -1
- package/{chunk-TIMLUWQA.js → chunk-KTHLAJEY.js} +1 -1
- package/{chunk-TISCADJH.js → chunk-L3KWEH3V.js} +9 -9
- package/{chunk-O2ZNTTET.js → chunk-LBUTKV7S.js} +21 -12
- package/{chunk-FM5IVZXO.js → chunk-LFFATN2M.js} +2632 -1578
- package/{chunk-IJGXKGXW.js → chunk-LJCH34R2.js} +6 -6
- package/{chunk-Z6EKEXJW.js → chunk-LTH6AVG7.js} +4 -4
- package/{chunk-PFTAG6DY.js → chunk-LW6FJFCT.js} +46 -68
- package/{chunk-7KCUSYT2.js → chunk-MIQOUMSN.js} +7 -7
- package/{chunk-FVYY6MCS.js → chunk-O7VS7JLJ.js} +17 -17
- package/{chunk-WI4XWASA.js → chunk-OOSFSFMA.js} +82 -19
- package/{chunk-YN4XDB7B.js → chunk-P7GAHW32.js} +361 -90
- package/{chunk-ZDRZMLKO.js → chunk-PTT6KSYQ.js} +135 -85
- package/{chunk-4IJYA27C.js → chunk-PXZAAB4L.js} +4 -4
- package/{chunk-MNJDFJND.js → chunk-Q2WC4KGQ.js} +3 -3
- package/{chunk-4QEWT7KD.js → chunk-RBB43B5W.js} +367 -85
- package/chunk-RBCENBG7.js +36 -0
- package/{chunk-IWX4UW2E.js → chunk-RBCNBU2A.js} +88 -8
- package/{chunk-PP4S6RTL.js → chunk-RQPZX6KP.js} +3 -3
- package/{chunk-2EHX7F5G.js → chunk-RYMUT5JO.js} +24 -24
- package/{chunk-K6BPOQLF.js → chunk-UBSKX3LP.js} +7 -7
- package/{chunk-4ZDM73SD.js → chunk-V2J635L5.js} +1 -1
- package/{chunk-K777STIO.js → chunk-VBKJTOAW.js} +2 -2
- package/{chunk-5W3VUFOX.js → chunk-WESWWEVA.js} +1 -1
- package/{chunk-IHBCLYEE.js → chunk-ZAUDEKML.js} +259 -179
- package/{chunk-N54XAP77.js → chunk-ZJS64PZJ.js} +1 -1
- package/{createAgentAutomationAction-CCABEOM6.js → createAgentAutomationAction-DYQOGAVE.js} +26 -25
- package/{createDialogAction-YPKF5ITI.js → createDialogAction-ETB3KQQE.js} +26 -25
- package/{createPageAction-YEZ7EK5F.js → createPageAction-UF2RHA63.js} +26 -25
- package/{dbSlice-QPVZHBOE.js → dbSlice-R5EJKZBW.js} +8 -8
- package/{deleteFile-SV5MS23W.js → deleteFile-WPWVZE4B.js} +6 -6
- package/{dialogCommands-4IX4XIZE.js → dialogCommands-LYYC7XHF.js} +23 -22
- package/{dialogSlice-OVTO7QGW.js → dialogSlice-IFBZ4IT2.js} +25 -24
- package/{docCreateCommands-SIL3NPGT.js → docCreateCommands-I66OI374.js} +22 -21
- package/{docDeleteCommands-7IOMLUS4.js → docDeleteCommands-OVRBCHMF.js} +23 -22
- package/{docReadCommands-FNFXUA5L.js → docReadCommands-YLWUMEH7.js} +22 -21
- package/{docStore-ZAYLW2HN.js → docStore-65WO7U36.js} +25 -24
- package/{docUpdateCommands-X2HNDVUC.js → docUpdateCommands-NSICS4IN.js} +22 -21
- package/fetchMessages-KTNM7QAR.js +1 -1
- package/{getPricing-3E6UNPKL.js → getPricing-7PUT44ZS.js} +7 -3
- package/{handleSendMessageAction-TZMZ4EP5.js → handleSendMessageAction-T76HEDOP.js} +30 -29
- package/index.js +74 -74
- package/{localDialogRead-2VRI24F4.js → localDialogRead-YSKFFRTT.js} +1 -1
- package/{machineCommands-M4ZJZIMS.js → machineCommands-4HQY6UVZ.js} +58 -56
- package/{machineWsRunDispatch-TPJAUGLP.js → machineWsRunDispatch-7YW2M4FS.js} +50 -48
- package/{memoryCommands-O4MIPIWQ.js → memoryCommands-HG4WKTU7.js} +2 -2
- package/{models-4OPOOLFS.js → models-MFXNI3TF.js} +2 -2
- package/package.json +1 -2
- package/{read-EBMWX4Z6.js → read-5ZMY7FKP.js} +6 -6
- package/{readDocTool-2MWHSTQE.js → readDocTool-2NXDK32S.js} +1 -1
- package/{readlineWorkspace-OMCIU3WT.js → readlineWorkspace-FLQWOAUR.js} +760 -605
- package/{removeDialogAgentAction-SNZ662NP.js → removeDialogAgentAction-KOLQ2R5W.js} +14 -13
- package/{runAgentClientLoop-H6NGOUAM.js → runAgentClientLoop-IUV2TR3X.js} +44 -43
- package/{runtimeDoctorCommands-LRHLPDRC.js → runtimeDoctorCommands-UWR5UDSM.js} +5 -5
- package/{setDialogExtraReferencesAction-XDI2KM2N.js → setDialogExtraReferencesAction-OMTEO7X6.js} +11 -11
- package/{setPrimaryDialogAgentAction-PYEC4N4Z.js → setPrimaryDialogAgentAction-DOCIS6V4.js} +14 -13
- package/{settingSlice-NOWHY2FK.js → settingSlice-UWZJYDOA.js} +9 -9
- package/{spaceCommands-E7VOF4LO.js → spaceCommands-BDDAT4VU.js} +29 -28
- package/{spaceSlice-QHBPICA2.js → spaceSlice-HH633ZA4.js} +24 -23
- package/{streamAgentChatTurn-3XTBA2HN.js → streamAgentChatTurn-UBZOVFKV.js} +96 -73
- package/{tableCommands-R5UCM63M.js → tableCommands-M3DJUETS.js} +11 -11
- package/{toolApiClient-QI3YBNWB.js → toolApiClient-C7P7YSE4.js} +2 -2
- package/{tools-GHLZ3XD6.js → tools-OQZ34KCU.js} +32 -31
- package/{tuiSummaryLlmCaller-RV3THLZF.js → tuiSummaryLlmCaller-42AEL3LL.js} +8 -6
- package/{updateCommands-VOSPKXFF.js → updateCommands-TC5SX42Y.js} +3 -3
- package/{updateDialogTitleAction-XA2OZTLP.js → updateDialogTitleAction-A3OOMSDO.js} +28 -27
- package/chunk-BBYVOSU2.js +0 -792
- package/chunk-DCOA4QSN.js +0 -105
- package/{chunk-DZ3XJVET.js → chunk-3QAF2LTL.js} +3 -3
- package/{chunk-EHLHSX7R.js → chunk-5MMZUWSG.js} +3 -3
- package/{chunk-ISNCLGUZ.js → chunk-AVMJVOQY.js} +3 -3
- package/{chunk-4CQLVGRV.js → chunk-ID4G2MAR.js} +3 -3
- package/{chunk-5MIDPSSK.js → chunk-JK7VW2FN.js} +3 -3
- package/{chunk-TILFE6LV.js → chunk-YOCHZD7D.js} +3 -3
- package/{db-HCJ5PRB5.js → db-6QED3ZVO.js} +3 -3
- package/{understanding-3CUQQ6SV.js → understanding-ZOESBLF3.js} +3 -3
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZAUDEKML.js";
|
|
4
4
|
import {
|
|
5
5
|
require_date_fns
|
|
6
6
|
} from "./chunk-M76ECQRD.js";
|
|
7
|
+
import {
|
|
8
|
+
patch,
|
|
9
|
+
readAndWait
|
|
10
|
+
} from "./chunk-L3KWEH3V.js";
|
|
7
11
|
import {
|
|
8
12
|
require_react
|
|
9
13
|
} from "./chunk-3ASDTTEI.js";
|
|
10
14
|
import {
|
|
11
15
|
toErrorMessage
|
|
12
16
|
} from "./chunk-HNMXYYJR.js";
|
|
13
|
-
import {
|
|
14
|
-
patch,
|
|
15
|
-
readAndWait
|
|
16
|
-
} from "./chunk-TISCADJH.js";
|
|
17
17
|
import {
|
|
18
18
|
asOptionalTrimmedString
|
|
19
19
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
async function createDocState(args, thunkApi) {
|
|
370
|
-
const { createPageAction } = await import("./createPageAction-
|
|
370
|
+
const { createPageAction } = await import("./createPageAction-UF2RHA63.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
selectCurrentServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UBSKX3LP.js";
|
|
4
4
|
import {
|
|
5
5
|
patch
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L3KWEH3V.js";
|
|
7
7
|
import {
|
|
8
8
|
selectIdentityToken
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DVRHHFEA.js";
|
|
10
10
|
import {
|
|
11
11
|
getIsDesktopApp
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OOSFSFMA.js";
|
|
13
13
|
|
|
14
14
|
// packages/ai/agent/cliChatClient.ts
|
|
15
15
|
function getCliChatRequestConfig(thunkApi) {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
3
3
|
isAntigravityOAuthAgent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D55DXHXL.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText,
|
|
7
7
|
fetchAndSerializeTable
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PTT6KSYQ.js";
|
|
9
9
|
import {
|
|
10
10
|
normalizeNonNegativeMs,
|
|
11
11
|
parseRetryAfterHeaderMs
|
|
12
12
|
} from "./chunk-GAKEBQD6.js";
|
|
13
13
|
import {
|
|
14
14
|
slateToSimplifiedMarkdown
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2CVZSC5L.js";
|
|
16
16
|
import {
|
|
17
17
|
extractCategorizedMentions
|
|
18
18
|
} from "./chunk-VP4WJWKW.js";
|
|
@@ -21,14 +21,18 @@ import {
|
|
|
21
21
|
} from "./chunk-VC6OZXO5.js";
|
|
22
22
|
import {
|
|
23
23
|
estimateTokenCount,
|
|
24
|
-
fetchAndCacheMessages
|
|
25
|
-
|
|
24
|
+
fetchAndCacheMessages,
|
|
25
|
+
shouldUseServerProxy
|
|
26
|
+
} from "./chunk-ZAUDEKML.js";
|
|
26
27
|
import {
|
|
27
28
|
fetchServerSyncedCredential
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-4VA3UQRF.js";
|
|
29
30
|
import {
|
|
30
31
|
createSpaceKey
|
|
31
32
|
} from "./chunk-UAD2WT54.js";
|
|
33
|
+
import {
|
|
34
|
+
read
|
|
35
|
+
} from "./chunk-L3KWEH3V.js";
|
|
32
36
|
import {
|
|
33
37
|
MEMORY_USE_GUIDANCE,
|
|
34
38
|
wrapHistoricalSummaryWithReplayGuard
|
|
@@ -37,21 +41,22 @@ import {
|
|
|
37
41
|
buildCurrentTimeBlock,
|
|
38
42
|
buildIdentityBlock,
|
|
39
43
|
buildRuntimeGuidanceBlocks
|
|
40
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-6KRA6AWI.js";
|
|
41
45
|
import {
|
|
42
46
|
OPENAI_RESPONSES_ENDPOINT,
|
|
43
47
|
buildProviderAuthHeaders,
|
|
44
48
|
convertMessagesToResponsesInput,
|
|
45
49
|
isOpenAiResponsesModel,
|
|
46
50
|
resolvePlatformChatCompletionsEndpoint
|
|
47
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-AWY2AFHN.js";
|
|
48
52
|
import {
|
|
49
53
|
canonicalizeToolNames
|
|
50
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-6OHYC4BY.js";
|
|
51
55
|
import {
|
|
56
|
+
clampReasoningEffort,
|
|
52
57
|
getModelConfig,
|
|
53
58
|
isModelSupportReasoningEffort
|
|
54
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-AOKWJZ5N.js";
|
|
55
60
|
import {
|
|
56
61
|
createFileCredentialBroker
|
|
57
62
|
} from "./chunk-5CS33IBL.js";
|
|
@@ -59,37 +64,34 @@ import {
|
|
|
59
64
|
isDeepInfraKimiModel,
|
|
60
65
|
isFireworksKimiModel,
|
|
61
66
|
resolveFireworksKimiModel
|
|
62
|
-
} from "./chunk-
|
|
63
|
-
import {
|
|
64
|
-
extractCustomId
|
|
65
|
-
} from "./chunk-DFFIZ25G.js";
|
|
66
|
-
import {
|
|
67
|
-
toErrorMessage
|
|
68
|
-
} from "./chunk-HNMXYYJR.js";
|
|
69
|
-
import {
|
|
70
|
-
read
|
|
71
|
-
} from "./chunk-TISCADJH.js";
|
|
67
|
+
} from "./chunk-RBCNBU2A.js";
|
|
72
68
|
import {
|
|
73
69
|
asNonEmptyStringArray
|
|
74
70
|
} from "./chunk-I42VC5KR.js";
|
|
71
|
+
import {
|
|
72
|
+
extractCustomId
|
|
73
|
+
} from "./chunk-DFFIZ25G.js";
|
|
75
74
|
import {
|
|
76
75
|
asTrimmedLowercaseString
|
|
77
76
|
} from "./chunk-QSJ3HFEF.js";
|
|
77
|
+
import {
|
|
78
|
+
toErrorMessage
|
|
79
|
+
} from "./chunk-HNMXYYJR.js";
|
|
78
80
|
import {
|
|
79
81
|
getRuntimeServerContext
|
|
80
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-DVRHHFEA.js";
|
|
81
83
|
import {
|
|
82
84
|
isAbortError
|
|
83
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-OOSFSFMA.js";
|
|
84
86
|
import {
|
|
85
|
-
|
|
86
|
-
} from "./chunk-
|
|
87
|
+
asTrimmedString
|
|
88
|
+
} from "./chunk-3EUW3WEO.js";
|
|
87
89
|
import {
|
|
88
90
|
API_ENDPOINTS
|
|
89
91
|
} from "./chunk-LCBAMY2M.js";
|
|
90
92
|
import {
|
|
91
|
-
|
|
92
|
-
} from "./chunk-
|
|
93
|
+
isLoopbackUrl
|
|
94
|
+
} from "./chunk-4SN6J65J.js";
|
|
93
95
|
import {
|
|
94
96
|
asOptionalTrimmedString
|
|
95
97
|
} from "./chunk-G3SUCT4W.js";
|
|
@@ -405,45 +407,6 @@ var resolveToolsFromKeys = async (keys, dispatch, preloaded) => {
|
|
|
405
407
|
};
|
|
406
408
|
};
|
|
407
409
|
|
|
408
|
-
// packages/agent-runtime/serverProxyPolicy.ts
|
|
409
|
-
var OAUTH_APIKEY_REFS = /* @__PURE__ */ new Set([
|
|
410
|
-
"antigravity",
|
|
411
|
-
"xai",
|
|
412
|
-
"chatgpt",
|
|
413
|
-
"claude"
|
|
414
|
-
]);
|
|
415
|
-
function isGoogleFamilyProvider(provider) {
|
|
416
|
-
const normalized = asTrimmedLowercaseString(provider);
|
|
417
|
-
return normalized === "google" || normalized.startsWith("google-");
|
|
418
|
-
}
|
|
419
|
-
function isOAuthApiKeyRef(value) {
|
|
420
|
-
const ref = asTrimmedLowercaseString(value);
|
|
421
|
-
return ref.length > 0 && OAUTH_APIKEY_REFS.has(ref);
|
|
422
|
-
}
|
|
423
|
-
function shouldUseServerProxy(agentConfig, requestProvider) {
|
|
424
|
-
const effectiveProvider = (requestProvider || agentConfig.provider || "").toLowerCase();
|
|
425
|
-
if (isGoogleFamilyProvider(effectiveProvider)) {
|
|
426
|
-
return true;
|
|
427
|
-
}
|
|
428
|
-
if (isOAuthApiKeyRef(agentConfig.apiKeyRef)) {
|
|
429
|
-
return true;
|
|
430
|
-
}
|
|
431
|
-
if (agentConfig.apiSource === "custom" && isRemoteCustomEndpoint(agentConfig.customProviderUrl)) {
|
|
432
|
-
return true;
|
|
433
|
-
}
|
|
434
|
-
return !!agentConfig.useServerProxy;
|
|
435
|
-
}
|
|
436
|
-
var LOCAL_HOSTS = /* @__PURE__ */ new Set(["127.0.0.1", "localhost", "::1", "0.0.0.0"]);
|
|
437
|
-
function isRemoteCustomEndpoint(url) {
|
|
438
|
-
if (typeof url !== "string") return false;
|
|
439
|
-
try {
|
|
440
|
-
const host = new URL(url).hostname.toLowerCase();
|
|
441
|
-
return !LOCAL_HOSTS.has(host);
|
|
442
|
-
} catch {
|
|
443
|
-
return false;
|
|
444
|
-
}
|
|
445
|
-
}
|
|
446
|
-
|
|
447
410
|
// packages/agent-runtime/agentCallPlan.ts
|
|
448
411
|
var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
|
|
449
412
|
var CURSOR_AGENT_URL = "https://api2.cursor.sh/agent.v1.AgentService/Run";
|
|
@@ -745,6 +708,12 @@ var CONTEXT_USAGE_INSTRUCTIONS = `\u53C2\u8003\u8D44\u6599\u4F7F\u7528\u8BF4\u66
|
|
|
745
708
|
- \u5982\u679C\u8D44\u6599\u4E2D\u6CA1\u6709\u5305\u542B\u7B54\u6848\uFF0C\u5E94\u8BF4\u660E\u8FD9\u4E00\u70B9\uFF0C\u7136\u540E\u518D\u4F7F\u7528\u4F60\u7684\u901A\u7528\u77E5\u8BC6\u8FDB\u884C\u56DE\u7B54\u3002
|
|
746
709
|
- \u5982\u679C\u4F60\u5728\u8D44\u6599\u4E2D\u53D1\u73B0\u76F8\u4E92\u77DB\u76FE\u7684\u4FE1\u606F\uFF0C\u4E5F\u8981\u5728\u56DE\u7B54\u4E2D\u6307\u51FA\u8FD9\u4E00\u70B9\u3002
|
|
747
710
|
- \u5F53\u901A\u7528\u6307\u4EE4\u4E0E\u66F4\u5177\u4F53\u7684"\u6309 Agent / \u6309\u6587\u6863"\u7684\u89C4\u5219\u53D1\u751F\u51B2\u7A81\u65F6\uFF0C\u5FC5\u987B\u4F18\u5148\u9075\u5B88\u66F4\u5177\u4F53\u3001\u4F18\u5148\u7EA7\u66F4\u9AD8\u7684\u89C4\u5219\u3002`;
|
|
711
|
+
var AGENT_ORCHESTRATION_RUN_INSTRUCTIONS = `--- \u591A Agent \u7F16\u6392\uFF08\u540E\u53F0 Run\uFF09 ---
|
|
712
|
+
\u4F60\u53EF\u7528 startAgentRun \u540E\u53F0\u542F\u52A8\u5B50 Agent\uFF08fork+exec\uFF0C\u8FD4\u56DE runId\uFF09\uFF0C\u7528 controlAgentRun \u89C2\u5BDF/\u505C\u6B62\uFF08wait+signal+proc\uFF09\u3002\u6838\u5FC3\u7EAA\u5F8B\uFF08\u53CD\u9762\u6559\u6750\uFF1A\u5B50\u4EE3\u7406\u5D29\u6E83/\u6302\u8D77\u800C\u7F16\u6392\u5668\u6BEB\u65E0\u5BDF\u89C9\uFF09\uFF1A
|
|
713
|
+
1. \u6D3E\u53D1\u540E\u5FC5\u987B\u8F6E\u8BE2\u3002startAgentRun \u62FF\u5230 runId \u540E\uFF0C\u7528 controlAgentRun(action:"status", runId, tailLines:30) \u8F6E\u8BE2\uFF08\u5EFA\u8BAE 5\u201310s \u4E00\u6B21\uFF09\uFF0C\u4E0D\u8981\u53EA\u9760\u804A\u5929\u590D\u8FF0\u7ED3\u679C\u3002\u4E0D\u8F6E\u8BE2 = \u6CA1\u7F16\u6392\u3002
|
|
714
|
+
2. \u8BFB\u65E5\u5FD7\u786E\u8BA4\u8FDB\u5C55\u3002tailLines>0 \u8BFB\u5B9E\u9645\u8F93\u51FA/\u5DE5\u5177\u8C03\u7528\uFF0C\u4E0D\u53EA\u770B status=running\u2014\u2014\u540E\u53F0\u76D1\u89C6\u5668\u53EF\u80FD\u7A7A\u8F6C\u3002
|
|
715
|
+
3. stop \u524D\u5148\u770B\u65E5\u5FD7\u3002\u7528 status \u5224\u65AD\u662F\u771F\u5361\u6B7B\u8FD8\u662F\u6B63\u5E38\u8DD1\uFF0C\u786E\u8BA4\u9700\u8981\u53EB\u505C\u518D controlAgentRun(action:"stop", runId)\uFF1B\u7528 list/status \u786E\u8BA4 run \u771F\u5B9E\u5B58\u5728\u4E14\u975E\u7EC8\u6001\uFF0C\u522B\u5047\u8BBE"\u6D3E\u53D1\u4E86\u5C31\u5728\u8DD1"\u3002
|
|
716
|
+
\u5DE5\u5177\u9009\u62E9\uFF1A\u5B50\u4EFB\u52A1 <100s \u4E14\u8981\u7ACB\u5373\u62FF\u7ED3\u679C \u2192 callAgent\uFF08\u540C\u6B65\uFF09\uFF1B\u957F\u4EFB\u52A1 / \u5E76\u884C / \u9700\u8981\u89C2\u5BDF\u6216\u53EB\u505C \u2192 startAgentRun\uFF08\u672C\u6BB5\uFF09\u3002`;
|
|
748
717
|
var MENU_USAGE_INSTRUCTIONS = `--- \u4EA4\u4E92\u8BF4\u660E ---
|
|
749
718
|
\u6240\u6709\u7528\u6237\u8F93\u5165\u5747\u4E3A\u7EAF\u6587\u672C\u6D88\u606F\uFF0C\u76F4\u63A5\u7406\u89E3\u5373\u53EF\uFF0C\u4E0D\u8981\u5728\u56DE\u590D\u4E2D\u63D0\u53CA\u6309\u94AE\u3001\u83DC\u5355\u3001\u754C\u9762\u7B49 UI \u5143\u7D20\u3002
|
|
750
719
|
|
|
@@ -835,10 +804,16 @@ var isBrowser = typeof window !== "undefined";
|
|
|
835
804
|
var TOOL_GUIDED_SECTIONS = [
|
|
836
805
|
{
|
|
837
806
|
id: "agentOrchestration",
|
|
838
|
-
triggerTools: [
|
|
807
|
+
triggerTools: [
|
|
808
|
+
"callAgent",
|
|
809
|
+
"runStreamingAgent",
|
|
810
|
+
"startAgentRun",
|
|
811
|
+
"controlAgentRun"
|
|
812
|
+
],
|
|
839
813
|
build: (tools) => [
|
|
840
814
|
AGENT_ORCHESTRATION_INSTRUCTIONS,
|
|
841
|
-
tools.includes("runStreamingAgent") ? PAGE_BUILDER_HANDOFF_INSTRUCTIONS : ""
|
|
815
|
+
tools.includes("runStreamingAgent") ? PAGE_BUILDER_HANDOFF_INSTRUCTIONS : "",
|
|
816
|
+
tools.includes("startAgentRun") || tools.includes("controlAgentRun") ? AGENT_ORCHESTRATION_RUN_INSTRUCTIONS : ""
|
|
842
817
|
].filter(Boolean).join("\n\n")
|
|
843
818
|
},
|
|
844
819
|
{ id: "menuUsage", triggerTools: ["ui_ask_choice"], build: () => MENU_USAGE_INSTRUCTIONS },
|
|
@@ -1167,7 +1142,10 @@ var buildRequestBody = (options) => {
|
|
|
1167
1142
|
});
|
|
1168
1143
|
Object.assign(bodyData, usageRequestOptions);
|
|
1169
1144
|
if (reasoning_effort && isModelSupportReasoningEffort(model)) {
|
|
1170
|
-
|
|
1145
|
+
const clamped = clampReasoningEffort(reasoning_effort, providerName);
|
|
1146
|
+
if (clamped) {
|
|
1147
|
+
bodyData.reasoning_effort = clamped;
|
|
1148
|
+
}
|
|
1171
1149
|
}
|
|
1172
1150
|
if (typeof temperature === "number") bodyData.temperature = temperature;
|
|
1173
1151
|
if (typeof top_p === "number") bodyData.top_p = top_p;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readDbRecord,
|
|
3
3
|
writeAgentRecord
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EUN3SYY7.js";
|
|
5
5
|
import {
|
|
6
6
|
buildSkillSummaryMarker
|
|
7
7
|
} from "./chunk-VF4K2QE6.js";
|
|
@@ -11,21 +11,21 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
createSpaceKey
|
|
13
13
|
} from "./chunk-UAD2WT54.js";
|
|
14
|
+
import {
|
|
15
|
+
asTrimmedLowercaseString
|
|
16
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
14
17
|
import {
|
|
15
18
|
parseUserIdFromAuthToken,
|
|
16
19
|
readOption,
|
|
17
20
|
resolveAuthToken,
|
|
18
21
|
resolveServerUrl
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AVMJVOQY.js";
|
|
20
23
|
import {
|
|
21
|
-
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
NOLO_CLUSTER_SERVERS
|
|
25
|
+
} from "./chunk-LCBAMY2M.js";
|
|
23
26
|
import {
|
|
24
27
|
DEFAULT_LOCAL_API_ORIGIN
|
|
25
28
|
} from "./chunk-4SN6J65J.js";
|
|
26
|
-
import {
|
|
27
|
-
NOLO_CLUSTER_SERVERS
|
|
28
|
-
} from "./chunk-LCBAMY2M.js";
|
|
29
29
|
import {
|
|
30
30
|
normalizeServerOrigin
|
|
31
31
|
} from "./chunk-CF7PE763.js";
|
|
@@ -1,28 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSpaceLookup,
|
|
3
3
|
getSpaceContentKeys
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ID4G2MAR.js";
|
|
5
5
|
import {
|
|
6
6
|
deleteDbRecordOnServers,
|
|
7
7
|
listUserRecordsFromServers,
|
|
8
8
|
readDbRecordFromServers,
|
|
9
9
|
readLiveDbRecordAfterTombstoneMerge
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BB2PII22.js";
|
|
11
11
|
import {
|
|
12
12
|
buildDialogAttachmentPlan,
|
|
13
13
|
extractFileContentIds
|
|
14
14
|
} from "./chunk-MTU75CZ2.js";
|
|
15
|
-
import {
|
|
16
|
-
parseUserIdFromAuthToken,
|
|
17
|
-
readOption,
|
|
18
|
-
resolveAuthToken,
|
|
19
|
-
resolveDeleteServerCandidates,
|
|
20
|
-
resolveServerCandidates,
|
|
21
|
-
resolveServerUrl
|
|
22
|
-
} from "./chunk-ISNCLGUZ.js";
|
|
23
|
-
import {
|
|
24
|
-
toErrorMessage
|
|
25
|
-
} from "./chunk-HNMXYYJR.js";
|
|
26
15
|
import {
|
|
27
16
|
parsePositiveFiniteNumberOrFallback
|
|
28
17
|
} from "./chunk-Y5GCAMGP.js";
|
|
@@ -33,15 +22,26 @@ import {
|
|
|
33
22
|
asNonEmptyStringArray,
|
|
34
23
|
asTrimmedNonEmptyStringArray
|
|
35
24
|
} from "./chunk-I42VC5KR.js";
|
|
25
|
+
import {
|
|
26
|
+
parseUserIdFromAuthToken,
|
|
27
|
+
readOption,
|
|
28
|
+
resolveAuthToken,
|
|
29
|
+
resolveDeleteServerCandidates,
|
|
30
|
+
resolveServerCandidates,
|
|
31
|
+
resolveServerUrl
|
|
32
|
+
} from "./chunk-AVMJVOQY.js";
|
|
33
|
+
import {
|
|
34
|
+
toErrorMessage
|
|
35
|
+
} from "./chunk-HNMXYYJR.js";
|
|
36
36
|
import {
|
|
37
37
|
asTrimmedString
|
|
38
38
|
} from "./chunk-3EUW3WEO.js";
|
|
39
|
-
import {
|
|
40
|
-
asOptionalTrimmedString
|
|
41
|
-
} from "./chunk-G3SUCT4W.js";
|
|
42
39
|
import {
|
|
43
40
|
isRecord
|
|
44
41
|
} from "./chunk-KUG52IAP.js";
|
|
42
|
+
import {
|
|
43
|
+
asOptionalTrimmedString
|
|
44
|
+
} from "./chunk-G3SUCT4W.js";
|
|
45
45
|
|
|
46
46
|
// packages/cli/dialogAttachmentCleanup.ts
|
|
47
47
|
function asText(value) {
|
|
@@ -625,7 +625,7 @@ async function tryHttpDialogCandidates(args) {
|
|
|
625
625
|
throw Object.assign(new Error("All HTTP dialog reads failed"), { attempts });
|
|
626
626
|
}
|
|
627
627
|
async function readDialogFromLocalDb(dialogKey, dialogId, limit) {
|
|
628
|
-
const { readDialogFromLocalDb: readLocalDialog } = await import("./localDialogRead-
|
|
628
|
+
const { readDialogFromLocalDb: readLocalDialog } = await import("./localDialogRead-YSKFFRTT.js");
|
|
629
629
|
const result = await readLocalDialog({ dialogKey, dialogId, limit });
|
|
630
630
|
return {
|
|
631
631
|
...result,
|
|
@@ -22,8 +22,86 @@ function isAbortError(error) {
|
|
|
22
22
|
return error.name === "AbortError";
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
// packages/
|
|
26
|
-
|
|
25
|
+
// packages/core/clientLogger.ts
|
|
26
|
+
var LOG_LEVELS = {
|
|
27
|
+
debug: 10,
|
|
28
|
+
info: 20,
|
|
29
|
+
warn: 30,
|
|
30
|
+
error: 40
|
|
31
|
+
};
|
|
32
|
+
var serializeValue = (value, seen = /* @__PURE__ */ new WeakSet()) => {
|
|
33
|
+
if (value instanceof Error) {
|
|
34
|
+
return {
|
|
35
|
+
name: value.name,
|
|
36
|
+
message: value.message,
|
|
37
|
+
...value.stack ? { stack: value.stack } : {}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
if (typeof value !== "object" || value === null) {
|
|
41
|
+
if (typeof value === "bigint") {
|
|
42
|
+
return value.toString();
|
|
43
|
+
}
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
if (seen.has(value)) {
|
|
47
|
+
return "[Circular]";
|
|
48
|
+
}
|
|
49
|
+
seen.add(value);
|
|
50
|
+
if (Array.isArray(value)) {
|
|
51
|
+
return value.map((item) => serializeValue(item, seen));
|
|
52
|
+
}
|
|
53
|
+
return Object.fromEntries(
|
|
54
|
+
Object.entries(value).map(([key, item]) => [key, serializeValue(item, seen)])
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
var getLogLevel = () => {
|
|
58
|
+
const configured = typeof process !== "undefined" && typeof process.env?.NOLO_LOG_LEVEL === "string" ? process.env.NOLO_LOG_LEVEL : "info";
|
|
59
|
+
return LOG_LEVELS[configured] ?? LOG_LEVELS.info;
|
|
60
|
+
};
|
|
61
|
+
var writeLog = (level, name, fields, message) => {
|
|
62
|
+
if (LOG_LEVELS[level] < getLogLevel()) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const serializedFields = serializeValue(fields);
|
|
66
|
+
const payload = {
|
|
67
|
+
level,
|
|
68
|
+
...name ? { name } : {},
|
|
69
|
+
...serializedFields,
|
|
70
|
+
...message ? { msg: message } : {}
|
|
71
|
+
};
|
|
72
|
+
const output = JSON.stringify(payload);
|
|
73
|
+
const isNodeRuntime = typeof process !== "undefined" && typeof process.stderr?.write === "function";
|
|
74
|
+
if (isNodeRuntime) {
|
|
75
|
+
process.stderr.write(`${output}
|
|
76
|
+
`);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const consoleMethod = console[level] ?? console.log;
|
|
80
|
+
if (Object.keys(fields).length === 0 && message) {
|
|
81
|
+
consoleMethod(`[${name}] ${message}`);
|
|
82
|
+
} else {
|
|
83
|
+
consoleMethod(output);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var parseArgs = (first, second) => {
|
|
87
|
+
if (typeof first === "string") {
|
|
88
|
+
return { fields: {}, message: first };
|
|
89
|
+
}
|
|
90
|
+
return { fields: first ?? {}, message: second };
|
|
91
|
+
};
|
|
92
|
+
var createClientLogger = (name, parentFields = {}) => {
|
|
93
|
+
const log = (level, first, second) => {
|
|
94
|
+
const { fields, message } = parseArgs(first, second);
|
|
95
|
+
writeLog(level, name, { ...parentFields, ...fields }, message);
|
|
96
|
+
};
|
|
97
|
+
return {
|
|
98
|
+
debug: (first, second) => log("debug", first, second),
|
|
99
|
+
info: (first, second) => log("info", first, second),
|
|
100
|
+
warn: (first, second) => log("warn", first, second),
|
|
101
|
+
error: (first, second) => log("error", first, second),
|
|
102
|
+
child: (fields) => createClientLogger(name, { ...parentFields, ...fields })
|
|
103
|
+
};
|
|
104
|
+
};
|
|
27
105
|
|
|
28
106
|
// packages/app/utils/retryFetch.ts
|
|
29
107
|
var TRANSIENT_READ_RETRY_STATUSES = /* @__PURE__ */ new Set([502, 503, 504]);
|
|
@@ -67,23 +145,7 @@ function isLevelNotFoundError(error) {
|
|
|
67
145
|
}
|
|
68
146
|
|
|
69
147
|
// packages/database/actions/common.ts
|
|
70
|
-
var
|
|
71
|
-
var logger = isRN ? {
|
|
72
|
-
info: (...args) => console.log(...args),
|
|
73
|
-
warn: (...args) => console.warn(...args),
|
|
74
|
-
error: (...args) => console.error(...args),
|
|
75
|
-
debug: (...args) => console.log(...args),
|
|
76
|
-
// console.debug in RN behaves like log
|
|
77
|
-
trace: (...args) => console.log(...args),
|
|
78
|
-
fatal: (...args) => console.error(...args),
|
|
79
|
-
child: () => logger
|
|
80
|
-
// 简单返回自己
|
|
81
|
-
} : pino({
|
|
82
|
-
level: "info"
|
|
83
|
-
// transport: {
|
|
84
|
-
// target: "pino-pretty",
|
|
85
|
-
// },
|
|
86
|
-
});
|
|
148
|
+
var logger = createClientLogger("database");
|
|
87
149
|
var normalizeServer = (server) => normalizeKnownServerOrigin(server) ?? normalizeServerOrigin(server);
|
|
88
150
|
var mergeConfiguredServers = (currentServer, syncServers) => {
|
|
89
151
|
const runtimeOrigin = !getIsDesktopApp() && typeof window !== "undefined" && typeof window.location?.origin === "string" && /^https?:\/\//.test(window.location.origin) ? window.location.origin : void 0;
|
|
@@ -197,6 +259,7 @@ var normalizeTimeFields = (data) => ({
|
|
|
197
259
|
export {
|
|
198
260
|
isProduction,
|
|
199
261
|
getIsDesktopApp,
|
|
262
|
+
createClientLogger,
|
|
200
263
|
isAbortError,
|
|
201
264
|
fetchWithTransientReadRetry,
|
|
202
265
|
logger,
|