nolo-cli 0.182.0-alpha.1 → 0.183.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-ZMEMTJMS.js → _executeModel-YYVG3FYU.js} +24 -16
- package/{agentDeleteCommand-VXMMVCHV.js → agentDeleteCommand-EOU67KBO.js} +16 -14
- package/{agentEmailCommands-G3UR3SVL.js → agentEmailCommands-HEQLXSP6.js} +18 -16
- package/{agentListCommands-V2F7XVZN.js → agentListCommands-4QUON7JZ.js} +21 -61
- package/{agentMachineCommands-FALEGGEG.js → agentMachineCommands-53GH4CDQ.js} +7 -6
- package/{agentRecordCommands-HN7WNNGT.js → agentRecordCommands-XXN5V3AX.js} +17 -15
- package/{agentRunCommand-N3RD7WQ2.js → agentRunCommand-ZUM5E3UV.js} +18 -16
- package/{agentRuntimeLocal-B2CGM4VH.js → agentRuntimeLocal-ECGPI3CO.js} +6 -5
- package/{agentSlice-NG7VBT4O.js → agentSlice-MS5G7UCC.js} +1 -1
- package/{appDeleteCommands-2GVSRT6R.js → appDeleteCommands-UHH52BCJ.js} +6 -5
- package/{appDeployCommands-UJVGSH4V.js → appDeployCommands-Z42ILX24.js} +6 -5
- package/{appDeployStatusCommands-4UJDG7P3.js → appDeployStatusCommands-COYNEUSI.js} +6 -5
- package/{appGetCommands-D5HZK3DJ.js → appGetCommands-35XXIRZJ.js} +6 -5
- package/{appListCommands-FAHI4R2I.js → appListCommands-CIUEMKRJ.js} +6 -5
- package/{chunk-SO3N2323.js → chunk-3PVH6HJG.js} +2 -2
- package/{chunk-JGH3VOCR.js → chunk-5DVM4RIR.js} +2 -2
- package/{chunk-3YMDHQAK.js → chunk-5ROGGWPM.js} +8 -8
- package/{chunk-EUOPEEMO.js → chunk-7AVKDSWD.js} +1 -1
- package/{chunk-HRTEMYBI.js → chunk-ADF4RAQS.js} +1 -1
- package/chunk-AMWMV56B.js +73 -0
- package/{chunk-Y2CQS353.js → chunk-B3BTDNEC.js} +3 -3
- package/{chunk-XYRSQHF2.js → chunk-C3BYVRTJ.js} +2 -2
- package/{chunk-7ZGMQZ5D.js → chunk-CSINZLH7.js} +0 -78
- package/{chunk-E54QZNU3.js → chunk-DHMXTEM4.js} +1 -1
- package/{chunk-7HZ23BLI.js → chunk-FAFNPFGS.js} +7 -7
- package/{chunk-G5IZWDSM.js → chunk-FO2BTDKY.js} +11 -9
- package/{chunk-BNEHIKIR.js → chunk-FUW33OOI.js} +10 -10
- package/chunk-H57T64RA.js +80 -0
- package/{chunk-JDCX5RWD.js → chunk-HEYJFOL6.js} +1 -1
- package/{chunk-KBVF7LOK.js → chunk-HWJZEUA6.js} +2 -2
- package/{chunk-T5RLIVBZ.js → chunk-JWSHARJM.js} +10 -10
- package/{chunk-QHFRRM5U.js → chunk-MHC44FKA.js} +3 -3
- package/{chunk-EHPJFHFL.js → chunk-MO6NDG3O.js} +3 -3
- package/{chunk-UU3QSEA5.js → chunk-NCVSRB7F.js} +9 -9
- package/{chunk-T7HBI3WZ.js → chunk-NSASNKVD.js} +4 -2
- package/{chunk-RHFEDL32.js → chunk-ORYQ2GDN.js} +2 -2
- package/{chunk-YO776XHS.js → chunk-QNLRCES2.js} +2 -2
- package/chunk-TZXPT53C.js +8 -0
- package/{chunk-GQEQYXWV.js → chunk-WGHIT2HH.js} +13 -13
- package/{chunk-ZVVAK3DH.js → chunk-WPWAD6NT.js} +3 -3
- package/{commandRegistry-LFXI3KRG.js → commandRegistry-VVY2YPUI.js} +44 -40
- package/{contentThunks-AH7QDS6H.js → contentThunks-EWOORWBS.js} +7 -5
- package/{createAgentAutomationAction-FAOPVXNF.js → createAgentAutomationAction-TRIAQUAK.js} +7 -5
- package/{createDialogAction-DBTKPCXV.js → createDialogAction-FXPXXDRR.js} +8 -6
- package/{createPageAction-PZGKZFPS.js → createPageAction-HHFPJKBD.js} +7 -5
- package/{dialogCommands-GQPHQ2U6.js → dialogCommands-6Z27OC2B.js} +6 -5
- package/{dialogSlice-VHGZCHAQ.js → dialogSlice-4W7DJJC2.js} +6 -4
- package/dialogUsageCommand-ZPESQB6W.js +136 -0
- package/{docCreateCommands-CQHPL5IB.js → docCreateCommands-EBLE6KZA.js} +6 -5
- package/{docDeleteCommands-Z5UPI5PX.js → docDeleteCommands-7JONZ5PW.js} +6 -5
- package/{docReadCommands-2AEKFEFV.js → docReadCommands-NI4LTXAV.js} +6 -5
- package/{docStore-XGWH3T7Q.js → docStore-VBINJLRX.js} +1 -1
- package/{docUpdateCommands-FZD4GSGV.js → docUpdateCommands-QF4J5XQI.js} +6 -5
- package/{handleSendMessageAction-XTQQEVD4.js → handleSendMessageAction-FJKTVMCA.js} +11 -9
- package/index.js +4 -4
- package/{localRuntimeAdapter-LXMUSNJ5.js → localRuntimeAdapter-QZNQNL2X.js} +16 -14
- package/{machineCommands-AXD7ISGC.js → machineCommands-53PSUEW7.js} +17 -15
- package/{machineWsRunDispatch-PGB3VJGM.js → machineWsRunDispatch-JNNSLAOT.js} +17 -15
- package/package.json +1 -1
- package/{readlineWorkspace-IO45OJPW.js → readlineWorkspace-46TGVQQ7.js} +18 -16
- package/{runAgentClientLoop-2APY5UZL.js → runAgentClientLoop-KV6R3FSU.js} +15 -13
- package/{spaceCommands-LM74S5WK.js → spaceCommands-CIXBPVEY.js} +6 -5
- package/{streamAgentChatTurn-Z3KS7XZL.js → streamAgentChatTurn-RTQ2DU4K.js} +17 -15
- package/{tools-VWAK7F7J.js → tools-R6JLL5PS.js} +11 -9
- package/{tuiSummaryLlmCaller-A6T54UJ3.js → tuiSummaryLlmCaller-5D3XCH2C.js} +4 -3
- package/{updateDialogTitleAction-WBIPSXFL.js → updateDialogTitleAction-2QNU4T4I.js} +7 -5
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
mergeReferences,
|
|
8
8
|
resolveReferenceAssets,
|
|
9
9
|
resolveToolsFromKeys
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ORYQ2GDN.js";
|
|
11
11
|
import {
|
|
12
12
|
UI_CARD_ENVELOPE_MAX_BYTES,
|
|
13
13
|
getAllToolRuns,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
selectSpaceContextLevel,
|
|
21
21
|
selectUserTonePreset,
|
|
22
22
|
uiCardFallback
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HWJZEUA6.js";
|
|
24
24
|
import {
|
|
25
25
|
resolveToolBaseUrl
|
|
26
26
|
} from "./chunk-MYOH447Z.js";
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
} from "./chunk-TDNAAXUQ.js";
|
|
33
33
|
import {
|
|
34
34
|
getDocState
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-C3BYVRTJ.js";
|
|
36
36
|
import {
|
|
37
37
|
getTableState
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-7AVKDSWD.js";
|
|
39
39
|
import {
|
|
40
40
|
getCurrentSpaceIdRaw,
|
|
41
41
|
getViewMode
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
PERSONALIZATION_DIALOG_CATEGORY,
|
|
45
45
|
buildPersonalizationDialogPolicyContext,
|
|
46
46
|
selectAllMsgs
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-WGHIT2HH.js";
|
|
48
48
|
import {
|
|
49
49
|
selectPendingFiles
|
|
50
50
|
} from "./chunk-OWYYDMGJ.js";
|
|
@@ -76,11 +76,11 @@ import {
|
|
|
76
76
|
} from "./chunk-WJZOQR2J.js";
|
|
77
77
|
import {
|
|
78
78
|
extractReferenceKeysFromMessage
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-NSASNKVD.js";
|
|
80
80
|
import {
|
|
81
81
|
getModelContextWindow,
|
|
82
82
|
planContextUsage
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-CSINZLH7.js";
|
|
84
84
|
import {
|
|
85
85
|
asRecordOrEmpty
|
|
86
86
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
flushChatCompletionStream,
|
|
12
12
|
providerHttpFailure,
|
|
13
13
|
throwIfChatCompletionStreamFailed
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QNLRCES2.js";
|
|
15
15
|
import {
|
|
16
16
|
readSseFrames
|
|
17
17
|
} from "./chunk-HNUWUO75.js";
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
toOpenAiCompatibleMessages,
|
|
98
98
|
toResponsesTools,
|
|
99
99
|
transferDowngradedToolTurnOrigin
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-HEYJFOL6.js";
|
|
101
101
|
import {
|
|
102
102
|
TOOL_HAD_IMAGES,
|
|
103
103
|
TOOL_IMAGES,
|
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
resolveEmptyAssistantFallbackMessage,
|
|
146
146
|
resolveEmptyAssistantOutcome,
|
|
147
147
|
resolveTruncatedReasoningTailLog
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-NSASNKVD.js";
|
|
149
149
|
import {
|
|
150
150
|
COMPACTION_SUMMARY_SCHEMA_VERSION,
|
|
151
151
|
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
@@ -154,21 +154,23 @@ import {
|
|
|
154
154
|
buildCompactionUserContent,
|
|
155
155
|
computeSummaryInputTokenCap,
|
|
156
156
|
computeSummarySourceMetadata,
|
|
157
|
-
createProviderCallTimingTracker,
|
|
158
|
-
finalizeProviderCallTiming,
|
|
159
157
|
formatCompactionMetricsLog,
|
|
160
158
|
formatFileOperationsFromMessages,
|
|
161
159
|
formatMessagesForSummaryWithTruncation,
|
|
162
160
|
getModelContextWindow,
|
|
163
|
-
isMeaningfulResponsesOutput,
|
|
164
|
-
observeMeaningfulProviderResponse,
|
|
165
161
|
planCompression,
|
|
166
162
|
planContextUsage,
|
|
167
163
|
resolveCompressionTriggerRatio,
|
|
168
164
|
sha256Hex,
|
|
169
|
-
truncateToolOutputForContext
|
|
165
|
+
truncateToolOutputForContext
|
|
166
|
+
} from "./chunk-CSINZLH7.js";
|
|
167
|
+
import {
|
|
168
|
+
createProviderCallTimingTracker,
|
|
169
|
+
finalizeProviderCallTiming,
|
|
170
|
+
isMeaningfulResponsesOutput,
|
|
171
|
+
observeMeaningfulProviderResponse,
|
|
170
172
|
withProviderCallTimingFields
|
|
171
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-H57T64RA.js";
|
|
172
174
|
import {
|
|
173
175
|
clipCompactText
|
|
174
176
|
} from "./chunk-5MMAK75Q.js";
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
import {
|
|
61
61
|
inlineImageUrlsForCustomProvider,
|
|
62
62
|
prepareTools
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-5DVM4RIR.js";
|
|
64
64
|
import {
|
|
65
65
|
getServerProviderSecret
|
|
66
66
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
resolveCliLocalRuntimeKeyCapability,
|
|
83
83
|
resolveCliLocalSpawnDispatch,
|
|
84
84
|
resolveStartAgentRunCwd
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-5ROGGWPM.js";
|
|
86
86
|
import {
|
|
87
87
|
deriveCredentialGroup,
|
|
88
88
|
deriveCustomProviderCredentialGroup
|
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
} from "./chunk-KFHREHUQ.js";
|
|
94
94
|
import {
|
|
95
95
|
resolveAgentRequiredPackIds
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-HWJZEUA6.js";
|
|
97
97
|
import {
|
|
98
98
|
getDefaultCliLocalRuntimeDb
|
|
99
99
|
} from "./chunk-FDLDMJTM.js";
|
|
@@ -105,14 +105,14 @@ import {
|
|
|
105
105
|
resolveBuiltinPlatformAgentConfig,
|
|
106
106
|
runKeyed,
|
|
107
107
|
validateAskChoiceInput
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-WGHIT2HH.js";
|
|
109
109
|
import {
|
|
110
110
|
BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
|
|
111
111
|
BUILTIN_TITLE_LLM_CONFIG
|
|
112
112
|
} from "./chunk-523DITKR.js";
|
|
113
113
|
import {
|
|
114
114
|
fetchServerSyncedCredential
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-MHC44FKA.js";
|
|
116
116
|
import {
|
|
117
117
|
isTombstoneRecord
|
|
118
118
|
} from "./chunk-D2MDMY2M.js";
|
|
@@ -169,7 +169,7 @@ import {
|
|
|
169
169
|
runExecShellGates,
|
|
170
170
|
validateConfiguredRootExecutionLease,
|
|
171
171
|
verifyOwnerRouteAck
|
|
172
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-FO2BTDKY.js";
|
|
173
173
|
import {
|
|
174
174
|
accumulateGeminiChunks,
|
|
175
175
|
buildGeminiGenerateContentRequest,
|
|
@@ -192,7 +192,7 @@ import {
|
|
|
192
192
|
readPlatformChatSseCompletion,
|
|
193
193
|
resolvePlatformChatProviderConfig,
|
|
194
194
|
shouldUsePlatformChatProvider
|
|
195
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-QNLRCES2.js";
|
|
196
196
|
import {
|
|
197
197
|
readSseDataValues,
|
|
198
198
|
readSseFrames
|
|
@@ -212,7 +212,7 @@ import {
|
|
|
212
212
|
findAgentStatePairingIssues,
|
|
213
213
|
stablePromptCacheKey,
|
|
214
214
|
toResponsesTools
|
|
215
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-HEYJFOL6.js";
|
|
216
216
|
import {
|
|
217
217
|
EMPTY_TOOL_RESULT_TEXT,
|
|
218
218
|
createToolImageBudget,
|
|
@@ -242,7 +242,7 @@ import {
|
|
|
242
242
|
} from "./chunk-2MBTWINN.js";
|
|
243
243
|
import {
|
|
244
244
|
normalizeUsage
|
|
245
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-NSASNKVD.js";
|
|
246
246
|
import {
|
|
247
247
|
isDevinOAuthAgent
|
|
248
248
|
} from "./chunk-5ZUL4CUO.js";
|
|
@@ -252,7 +252,7 @@ import {
|
|
|
252
252
|
observeMeaningfulProviderResponse,
|
|
253
253
|
observeMeaningfulProviderResponseAt,
|
|
254
254
|
withProviderCallTimingFields
|
|
255
|
-
} from "./chunk-
|
|
255
|
+
} from "./chunk-H57T64RA.js";
|
|
256
256
|
import {
|
|
257
257
|
isOAuthApiKeyRef
|
|
258
258
|
} from "./chunk-UKZX3NHN.js";
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// packages/ai/token/providerCallTiming.ts
|
|
2
|
+
var defaultNow = () => {
|
|
3
|
+
const perf = globalThis.performance;
|
|
4
|
+
return typeof perf?.now === "function" ? perf.now() : Date.now();
|
|
5
|
+
};
|
|
6
|
+
var normalizeTimingMs = (value) => {
|
|
7
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
8
|
+
return void 0;
|
|
9
|
+
}
|
|
10
|
+
return Math.round(value);
|
|
11
|
+
};
|
|
12
|
+
var createProviderCallTimingTracker = (now = defaultNow) => ({
|
|
13
|
+
startMonotonicMs: now(),
|
|
14
|
+
now
|
|
15
|
+
});
|
|
16
|
+
var observeMeaningfulProviderResponseAt = (tracker, observedAt) => {
|
|
17
|
+
if (!tracker || tracker.firstMeaningfulMonotonicMs !== void 0) return;
|
|
18
|
+
tracker.firstMeaningfulMonotonicMs = observedAt;
|
|
19
|
+
};
|
|
20
|
+
var observeMeaningfulProviderResponse = (tracker) => {
|
|
21
|
+
if (!tracker) return;
|
|
22
|
+
observeMeaningfulProviderResponseAt(tracker, tracker.now());
|
|
23
|
+
};
|
|
24
|
+
var finalizeProviderCallTiming = (tracker) => {
|
|
25
|
+
if (!tracker) return {};
|
|
26
|
+
const callDurationMs = normalizeTimingMs(
|
|
27
|
+
Math.max(0, tracker.now() - tracker.startMonotonicMs)
|
|
28
|
+
);
|
|
29
|
+
const firstOutputMs = tracker.firstMeaningfulMonotonicMs !== void 0 ? normalizeTimingMs(
|
|
30
|
+
Math.max(0, tracker.firstMeaningfulMonotonicMs - tracker.startMonotonicMs)
|
|
31
|
+
) : void 0;
|
|
32
|
+
return {
|
|
33
|
+
...firstOutputMs !== void 0 ? { firstOutputMs } : {},
|
|
34
|
+
...callDurationMs !== void 0 ? { callDurationMs } : {}
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
var withProviderCallTimingFields = (usage, timing) => {
|
|
38
|
+
if (!usage || typeof usage !== "object") return usage;
|
|
39
|
+
return {
|
|
40
|
+
...usage,
|
|
41
|
+
...timing.firstOutputMs !== void 0 ? { firstOutputMs: timing.firstOutputMs } : {},
|
|
42
|
+
...timing.callDurationMs !== void 0 ? { callDurationMs: timing.callDurationMs } : {}
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
var isMeaningfulChatCompletionOutput = (delta) => {
|
|
46
|
+
if (!delta || typeof delta !== "object") return false;
|
|
47
|
+
const d = delta;
|
|
48
|
+
if (typeof d.content === "string" && d.content) return true;
|
|
49
|
+
if (typeof d.reasoning_content === "string" && d.reasoning_content) return true;
|
|
50
|
+
if (typeof d.reasoning === "string" && d.reasoning) return true;
|
|
51
|
+
return Array.isArray(d.tool_calls) && d.tool_calls.length > 0;
|
|
52
|
+
};
|
|
53
|
+
var isMeaningfulResponsesOutput = (event) => {
|
|
54
|
+
if (!event || typeof event !== "object") return false;
|
|
55
|
+
const e = event;
|
|
56
|
+
const type = typeof e.type === "string" ? e.type : "";
|
|
57
|
+
if (type.startsWith("response.") && type.endsWith(".delta")) {
|
|
58
|
+
const delta = e.delta;
|
|
59
|
+
if (typeof delta === "string" && delta.length > 0) return true;
|
|
60
|
+
if (delta && typeof delta === "object" && typeof delta.text === "string" && delta.text) {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
if (type === "response.output_item.added" || type === "response.output_item.done") {
|
|
66
|
+
return e.item?.type === "function_call";
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export {
|
|
72
|
+
normalizeTimingMs,
|
|
73
|
+
createProviderCallTimingTracker,
|
|
74
|
+
observeMeaningfulProviderResponseAt,
|
|
75
|
+
observeMeaningfulProviderResponse,
|
|
76
|
+
finalizeProviderCallTiming,
|
|
77
|
+
withProviderCallTimingFields,
|
|
78
|
+
isMeaningfulChatCompletionOutput,
|
|
79
|
+
isMeaningfulResponsesOutput
|
|
80
|
+
};
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-VYNMQ6HW.js";
|
|
9
9
|
import {
|
|
10
10
|
fetchAndCacheTableRows
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7AVKDSWD.js";
|
|
12
12
|
import {
|
|
13
13
|
require_react
|
|
14
14
|
} from "./chunk-YDH3FDFQ.js";
|
|
@@ -521,7 +521,7 @@ var executeToolRun = createAsyncThunk(
|
|
|
521
521
|
if (!executionInput) {
|
|
522
522
|
throw new Error(`ToolRun ${id} has no input to execute with.`);
|
|
523
523
|
}
|
|
524
|
-
const { findToolExecutor } = await import("./tools-
|
|
524
|
+
const { findToolExecutor } = await import("./tools-R6JLL5PS.js");
|
|
525
525
|
const { executor } = findToolExecutor(run.toolName);
|
|
526
526
|
toolRunStarted({
|
|
527
527
|
id: run.id,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5DVM4RIR.js";
|
|
9
9
|
import {
|
|
10
10
|
CONFIRMATION_INPUT_KEYS,
|
|
11
11
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
performFetchRequest,
|
|
15
15
|
sanitizeOutboundMessages,
|
|
16
16
|
stripModelToolArgs
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-B3BTDNEC.js";
|
|
18
18
|
import {
|
|
19
19
|
findToolExecutor,
|
|
20
20
|
toolDefinitionsByName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5ROGGWPM.js";
|
|
22
22
|
import {
|
|
23
23
|
classifyApiError,
|
|
24
24
|
classifyGenerationError,
|
|
25
25
|
extractErrorDiagnostics
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-ORYQ2GDN.js";
|
|
27
27
|
import {
|
|
28
28
|
createSSEParser,
|
|
29
29
|
createToolRunId,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
toolRunSetPending,
|
|
33
33
|
toolRunStarted,
|
|
34
34
|
toolRunSucceeded
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-HWJZEUA6.js";
|
|
36
36
|
import {
|
|
37
37
|
getPublicImageAgentMode
|
|
38
38
|
} from "./chunk-VIDPVFP3.js";
|
|
@@ -45,10 +45,10 @@ import {
|
|
|
45
45
|
messageStreaming,
|
|
46
46
|
toolResultNeedsUserConfirmation,
|
|
47
47
|
updateToolMessage
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-WGHIT2HH.js";
|
|
49
49
|
import {
|
|
50
50
|
streamAgentChatTurn
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-MHC44FKA.js";
|
|
52
52
|
import {
|
|
53
53
|
addActiveController,
|
|
54
54
|
removeActiveController,
|
|
@@ -85,13 +85,13 @@ import {
|
|
|
85
85
|
} from "./chunk-56GBUMO5.js";
|
|
86
86
|
import {
|
|
87
87
|
normalizeChatCompletionsBodyForProvider
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-HEYJFOL6.js";
|
|
89
89
|
import {
|
|
90
90
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-NSASNKVD.js";
|
|
92
92
|
import {
|
|
93
93
|
getModelInfo
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-CSINZLH7.js";
|
|
95
95
|
import {
|
|
96
96
|
isAbortError
|
|
97
97
|
} from "./chunk-7DPNBQSV.js";
|
|
@@ -347,7 +347,7 @@ var slice = createSliceWithThunks({
|
|
|
347
347
|
const overrides = {};
|
|
348
348
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
349
349
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
350
|
-
const { _executeModel } = await import("./_executeModel-
|
|
350
|
+
const { _executeModel } = await import("./_executeModel-YYVG3FYU.js");
|
|
351
351
|
return _executeModel(
|
|
352
352
|
{
|
|
353
353
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -368,7 +368,7 @@ var slice = createSliceWithThunks({
|
|
|
368
368
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
369
369
|
*/
|
|
370
370
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
371
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
371
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-KV6R3FSU.js");
|
|
372
372
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
373
373
|
{
|
|
374
374
|
agentKey: args.agentKey,
|
|
@@ -384,7 +384,7 @@ var slice = createSliceWithThunks({
|
|
|
384
384
|
* 聊天轮次流式 Agent 调用
|
|
385
385
|
*/
|
|
386
386
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
387
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
387
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-RTQ2DU4K.js");
|
|
388
388
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
389
389
|
}),
|
|
390
390
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FUW33OOI.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HWJZEUA6.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FO2BTDKY.js";
|
|
11
11
|
import {
|
|
12
12
|
applyToolSurfaceConstraints
|
|
13
13
|
} from "./chunk-3FTJG5NU.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveRawAgentInput,
|
|
10
10
|
resolveServerUrl,
|
|
11
11
|
writeUsage
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DHMXTEM4.js";
|
|
13
13
|
import {
|
|
14
14
|
getReadableCliDb
|
|
15
15
|
} from "./chunk-62TBKWTV.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
resolveFileWriteGateEnabled,
|
|
32
32
|
resolveLocalUserId,
|
|
33
33
|
validateInstaboxWorkspaceSelection
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-FUW33OOI.js";
|
|
35
35
|
import {
|
|
36
36
|
clearCredentialAvailability,
|
|
37
37
|
readEffectiveCredentialEntry,
|
|
@@ -72,14 +72,14 @@ import {
|
|
|
72
72
|
} from "./chunk-BMQ2MJUK.js";
|
|
73
73
|
import {
|
|
74
74
|
resolveCliLocalRuntimeKeyCapability
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-5ROGGWPM.js";
|
|
76
76
|
import {
|
|
77
77
|
isTransientFetchError
|
|
78
78
|
} from "./chunk-KFHREHUQ.js";
|
|
79
79
|
import {
|
|
80
80
|
parseUiCard,
|
|
81
81
|
uiCardFallback
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-HWJZEUA6.js";
|
|
83
83
|
import {
|
|
84
84
|
isGatewayHttpStatus
|
|
85
85
|
} from "./chunk-NF64D32W.js";
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
chooseMemoryOwners,
|
|
89
89
|
loadMemoryCandidatesFromDb,
|
|
90
90
|
resolveAgentMemoryPolicy
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-3PVH6HJG.js";
|
|
92
92
|
import {
|
|
93
93
|
getDefaultCliLocalRuntimeDb
|
|
94
94
|
} from "./chunk-FDLDMJTM.js";
|
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
resolveAgentContextWindow,
|
|
100
100
|
resolveOccupancy,
|
|
101
101
|
resolveOccupancyWindow
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-WGHIT2HH.js";
|
|
103
103
|
import {
|
|
104
104
|
buildSkillDiscoveryContextLayer
|
|
105
105
|
} from "./chunk-AU7AXHUL.js";
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
LOCAL_AGENT_CONFIG_MISSING_CODE,
|
|
112
112
|
LOCAL_TURN_ABORTED_CODE,
|
|
113
113
|
readActionGate
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-FO2BTDKY.js";
|
|
115
115
|
import {
|
|
116
116
|
resolveAgentRuntimeConfigFromRecord
|
|
117
117
|
} from "./chunk-CR5WXQX7.js";
|
|
@@ -139,7 +139,7 @@ import {
|
|
|
139
139
|
} from "./chunk-JLR5NWP2.js";
|
|
140
140
|
import {
|
|
141
141
|
normalizeUsage
|
|
142
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-NSASNKVD.js";
|
|
143
143
|
import {
|
|
144
144
|
isOAuthApiKeyRef
|
|
145
145
|
} from "./chunk-UKZX3NHN.js";
|
|
@@ -11376,7 +11376,7 @@ function isBalanceExhaustedError(error) {
|
|
|
11376
11376
|
|
|
11377
11377
|
// packages/cli/client/agentRun.ts
|
|
11378
11378
|
async function loadRunLocalAgentTurn() {
|
|
11379
|
-
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-
|
|
11379
|
+
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-ECGPI3CO.js");
|
|
11380
11380
|
return runLocalAgentTurn;
|
|
11381
11381
|
}
|
|
11382
11382
|
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();
|
|
@@ -2,9 +2,11 @@ import {
|
|
|
2
2
|
isDevinOAuthAgent
|
|
3
3
|
} from "./chunk-5ZUL4CUO.js";
|
|
4
4
|
import {
|
|
5
|
-
getModelContextWindow
|
|
5
|
+
getModelContextWindow
|
|
6
|
+
} from "./chunk-CSINZLH7.js";
|
|
7
|
+
import {
|
|
6
8
|
normalizeTimingMs
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-H57T64RA.js";
|
|
8
10
|
import {
|
|
9
11
|
BUILTIN_NOLO_AGENT_KEY
|
|
10
12
|
} from "./chunk-LOEO7LRC.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
clipMultilineText,
|
|
3
3
|
fetchAndSerializeTable,
|
|
4
4
|
waitForAbortableDelay
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HWJZEUA6.js";
|
|
6
6
|
import {
|
|
7
7
|
isGatewayHttpStatus
|
|
8
8
|
} from "./chunk-NF64D32W.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-AGIM7IMJ.js";
|
|
22
22
|
import {
|
|
23
23
|
fetchAndCacheMessages
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WGHIT2HH.js";
|
|
25
25
|
import {
|
|
26
26
|
createSpaceKey
|
|
27
27
|
} from "./chunk-UAD2WT54.js";
|
|
@@ -30,11 +30,11 @@ import {
|
|
|
30
30
|
stablePromptCacheKey,
|
|
31
31
|
toOpenAiCompatibleMessages,
|
|
32
32
|
toResponsesTools
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-HEYJFOL6.js";
|
|
34
34
|
import {
|
|
35
35
|
isMeaningfulChatCompletionOutput,
|
|
36
36
|
isMeaningfulResponsesOutput
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-H57T64RA.js";
|
|
38
38
|
import {
|
|
39
39
|
clipCompactText
|
|
40
40
|
} from "./chunk-5MMAK75Q.js";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
LOCAL_USER_ID
|
|
3
|
+
} from "./chunk-TZXPT53C.js";
|
|
1
4
|
import {
|
|
2
5
|
BUILTIN_DIALOG_LLM_FALLBACK_MODEL,
|
|
3
6
|
BUILTIN_SUMMARY_LLM_CONFIG
|
|
@@ -11,7 +14,7 @@ import {
|
|
|
11
14
|
} from "./chunk-QYPE3TS3.js";
|
|
12
15
|
import {
|
|
13
16
|
runLlm
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MHC44FKA.js";
|
|
15
18
|
import {
|
|
16
19
|
getApproxPricePerImage
|
|
17
20
|
} from "./chunk-4JH2UMJR.js";
|
|
@@ -103,7 +106,7 @@ import {
|
|
|
103
106
|
extractReferenceKeysFromMessage,
|
|
104
107
|
normalizeUsage,
|
|
105
108
|
resolveAutoExecutionProfile
|
|
106
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-NSASNKVD.js";
|
|
107
110
|
import {
|
|
108
111
|
isDevinOAuthAgent
|
|
109
112
|
} from "./chunk-5ZUL4CUO.js";
|
|
@@ -120,7 +123,7 @@ import {
|
|
|
120
123
|
getModelInfo,
|
|
121
124
|
planCompression,
|
|
122
125
|
serializeMessageContent
|
|
123
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-CSINZLH7.js";
|
|
124
127
|
import {
|
|
125
128
|
isOAuthApiKeyRef
|
|
126
129
|
} from "./chunk-UKZX3NHN.js";
|
|
@@ -11064,7 +11067,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
11064
11067
|
runtimeOptions: args.runtimeOptions
|
|
11065
11068
|
});
|
|
11066
11069
|
if (agentKeyToUse) {
|
|
11067
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
11070
|
+
const { streamAgentChatTurn } = await import("./agentSlice-MS5G7UCC.js");
|
|
11068
11071
|
await dispatch(
|
|
11069
11072
|
streamAgentChatTurn({
|
|
11070
11073
|
agentKey: agentKeyToUse,
|
|
@@ -13251,9 +13254,6 @@ var resolveBillingTarget = ({
|
|
|
13251
13254
|
};
|
|
13252
13255
|
};
|
|
13253
13256
|
|
|
13254
|
-
// packages/ai/token/usageConstants.ts
|
|
13255
|
-
var LOCAL_USER_ID = "local";
|
|
13256
|
-
|
|
13257
13257
|
// packages/ai/token/prepareTokenUsageData.ts
|
|
13258
13258
|
function resolveTokenUsagePricing(args) {
|
|
13259
13259
|
const { rawUsage, agentConfig, nowMs } = args;
|
|
@@ -13881,7 +13881,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
13881
13881
|
}
|
|
13882
13882
|
if (isCurrentDialog) {
|
|
13883
13883
|
await thunkApi.dispatch(resetMsgs());
|
|
13884
|
-
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-
|
|
13884
|
+
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-4W7DJJC2.js");
|
|
13885
13885
|
dispatch(clearPendingAttachments2());
|
|
13886
13886
|
}
|
|
13887
13887
|
return { dialogKey, isCurrentDialog, attachmentPlan };
|
|
@@ -13889,15 +13889,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
13889
13889
|
|
|
13890
13890
|
// packages/chat/dialog/dialogSlice.ts
|
|
13891
13891
|
var runCreateDialogAction = async (args, thunkApi) => {
|
|
13892
|
-
const { createDialogAction } = await import("./createDialogAction-
|
|
13892
|
+
const { createDialogAction } = await import("./createDialogAction-FXPXXDRR.js");
|
|
13893
13893
|
return createDialogAction(args, thunkApi);
|
|
13894
13894
|
};
|
|
13895
13895
|
var runCreateAgentAutomationAction = async (args, thunkApi) => {
|
|
13896
|
-
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-
|
|
13896
|
+
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-TRIAQUAK.js");
|
|
13897
13897
|
return createAgentAutomationAction(args, thunkApi);
|
|
13898
13898
|
};
|
|
13899
13899
|
var runUpdateDialogTitleAction = async (args, thunkApi) => {
|
|
13900
|
-
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-
|
|
13900
|
+
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-2QNU4T4I.js");
|
|
13901
13901
|
return updateDialogTitleAction(args, thunkApi);
|
|
13902
13902
|
};
|
|
13903
13903
|
var runAddDialogAgentAction = async (args, thunkApi) => {
|
|
@@ -13921,7 +13921,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
|
|
|
13921
13921
|
return setDialogExtraReferencesAction(args, thunkApi);
|
|
13922
13922
|
};
|
|
13923
13923
|
var runHandleSendMessageAction = async (args, thunkApi) => {
|
|
13924
|
-
const { handleSendMessageAction } = await import("./handleSendMessageAction-
|
|
13924
|
+
const { handleSendMessageAction } = await import("./handleSendMessageAction-FJKTVMCA.js");
|
|
13925
13925
|
return handleSendMessageAction(args, thunkApi);
|
|
13926
13926
|
};
|
|
13927
13927
|
function clearDialogState() {
|
|
@@ -13934,7 +13934,7 @@ var createPageAndAddReference = createAsyncThunk(
|
|
|
13934
13934
|
async (payload, { dispatch, getState, rejectWithValue }) => {
|
|
13935
13935
|
const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
|
|
13936
13936
|
try {
|
|
13937
|
-
const { createDocState } = await import("./docStore-
|
|
13937
|
+
const { createDocState } = await import("./docStore-VBINJLRX.js");
|
|
13938
13938
|
const pageKey = await createDocState(
|
|
13939
13939
|
{ slateData, title },
|
|
13940
13940
|
{ dispatch, getState }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchReferenceContents,
|
|
3
3
|
resolveReferenceAssets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ORYQ2GDN.js";
|
|
5
5
|
import {
|
|
6
6
|
updateTokensAction
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WGHIT2HH.js";
|
|
8
8
|
import {
|
|
9
9
|
applyUpdateTokensFulfilled
|
|
10
10
|
} from "./chunk-OWYYDMGJ.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
extractReasoningFromResponseOutput,
|
|
13
13
|
extractTextFromResponseOutput,
|
|
14
14
|
extractToolCallsFromResponseOutput
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HEYJFOL6.js";
|
|
16
16
|
import {
|
|
17
17
|
isRecord
|
|
18
18
|
} from "./chunk-KUG52IAP.js";
|