nolo-cli 0.175.0-alpha.1 → 0.176.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-557MGBNC.js → _executeModel-OV72YSE4.js} +14 -14
- package/{agentDeleteCommand-WI6U4NFI.js → agentDeleteCommand-HOWS5BAT.js} +16 -16
- package/{agentEmailCommands-Z3TNB4JY.js → agentEmailCommands-3EETPZFC.js} +18 -18
- package/{agentListCommands-UHHP6HFB.js → agentListCommands-7ZZHM4GC.js} +7 -7
- package/{agentMachineCommands-FIUBHYRT.js → agentMachineCommands-BGQVXERS.js} +8 -8
- package/{agentRecordCommands-EQDWG4RY.js → agentRecordCommands-L2O46J54.js} +17 -17
- package/{agentRunCommand-WZCHXCYS.js → agentRunCommand-7HDQ4RLO.js} +18 -18
- package/{agentRuntimeLocal-VQZCOFTL.js → agentRuntimeLocal-3QX3FMER.js} +7 -7
- package/{agentSlice-YQHUKPIF.js → agentSlice-VC7BZD5N.js} +1 -1
- package/{appDeleteCommands-3QISRABE.js → appDeleteCommands-NJAVC6F4.js} +7 -7
- package/{appDeployCommands-UIMXDPOG.js → appDeployCommands-POTCQDWQ.js} +7 -7
- package/{appDeployStatusCommands-D2ZA54DA.js → appDeployStatusCommands-YIG5S2ET.js} +7 -7
- package/{appGetCommands-QH2XYWOK.js → appGetCommands-HSXKEA64.js} +7 -7
- package/{appListCommands-HH2HYJDZ.js → appListCommands-GKLZKGKZ.js} +7 -7
- package/{authCommand-CVKPVPHN.js → authCommand-2IUG2PX7.js} +3 -3
- package/{chunk-Z4UP2EDE.js → chunk-33AGCT5W.js} +1 -1
- package/{chunk-RNIZNIVT.js → chunk-36OQE7ZU.js} +9 -9
- package/{chunk-QFAISMV5.js → chunk-3ERN2PSD.js} +3 -3
- package/{chunk-RYBZM4A2.js → chunk-73FHDE7C.js} +2 -2
- package/{chunk-TMAQFKHS.js → chunk-CCWUO2ZE.js} +2 -2
- package/{chunk-HHEM4TV3.js → chunk-CS4FUKMG.js} +2 -2
- package/{chunk-LCCULKPJ.js → chunk-DRR5E2EM.js} +24 -5
- package/{chunk-ONQ2APOE.js → chunk-GA4NE7QH.js} +3 -3
- package/{chunk-RABMW33C.js → chunk-GHNRJ3TK.js} +3 -3
- package/{chunk-Z4HDFBYK.js → chunk-GJU7F5IR.js} +1 -1
- package/{chunk-A6B3LSDB.js → chunk-IJOJMOCX.js} +6 -2
- package/{chunk-MG63GUYM.js → chunk-IR55JAHL.js} +3 -3
- package/{chunk-4NYYWHM7.js → chunk-JJE5HQ6M.js} +5 -5
- package/{chunk-LTWBOZE6.js → chunk-LQRXBYTS.js} +8 -8
- package/{chunk-UILL43UU.js → chunk-MR7SWXO4.js} +31 -23
- package/{chunk-VJ52BYBK.js → chunk-P3KTMRQ2.js} +1 -1
- package/{chunk-FGSVT353.js → chunk-QA5LXQFO.js} +24 -11
- package/{chunk-DWFRZ3UI.js → chunk-QMFYP3O4.js} +12 -7
- package/{chunk-L7ZCLG72.js → chunk-S4SXPMPC.js} +2 -2
- package/{chunk-KXIJYPVC.js → chunk-SYIWIP4D.js} +2 -2
- package/{chunk-24VDDKCB.js → chunk-TV6QW46C.js} +8 -8
- package/{chunk-ISIFZP3N.js → chunk-U3YGSKXD.js} +64 -3
- package/{chunk-J63HVOSX.js → chunk-UPJVQK5J.js} +2 -2
- package/{chunk-EGT6ORP5.js → chunk-XIM37FAU.js} +8 -8
- package/{chunk-7QQOOHDG.js → chunk-XRU4QTSX.js} +24 -8
- package/{commandRegistry-S54U5ZHX.js → commandRegistry-B24YK3LB.js} +47 -47
- package/{contentThunks-NVX3NBHZ.js → contentThunks-F4Y7V4IH.js} +3 -3
- package/{createAgentAutomationAction-EONFRZYA.js → createAgentAutomationAction-7K5M7ULU.js} +3 -3
- package/{createDialogAction-ZVY45CNY.js → createDialogAction-SYA2LFEN.js} +4 -4
- package/{createPageAction-N5XSWPN2.js → createPageAction-FAYZZVYI.js} +3 -3
- package/{dialogCommands-A5CHG67A.js → dialogCommands-K6AQZTAS.js} +7 -7
- package/{dialogSlice-ST2FXOF3.js → dialogSlice-QRWP73XJ.js} +2 -2
- package/{docCreateCommands-BF354FQW.js → docCreateCommands-3ZDCDYLH.js} +7 -7
- package/{docDeleteCommands-3K5K4XFO.js → docDeleteCommands-O74MHZEA.js} +7 -7
- package/{docReadCommands-A7ZDZIQV.js → docReadCommands-QJPAFQS3.js} +7 -7
- package/{docStore-PPUT7MQV.js → docStore-TABPPAGD.js} +1 -1
- package/{docUpdateCommands-5MGDR5ME.js → docUpdateCommands-M3THSN6V.js} +7 -7
- package/{handleSendMessageAction-74EKQW4M.js → handleSendMessageAction-FRBUFXEC.js} +8 -8
- package/index.js +4 -4
- package/{localRuntimeAdapter-ZAXRSVWI.js → localRuntimeAdapter-2YSA5D7P.js} +16 -16
- package/{machineCommands-MT4FDVVG.js → machineCommands-LVRRVNPD.js} +17 -17
- package/{machineWsRunDispatch-7T3SEMB6.js → machineWsRunDispatch-HUQ6HPSC.js} +17 -17
- package/package.json +1 -1
- package/{readlineWorkspace-MTYLMWBM.js → readlineWorkspace-N74QNU7H.js} +18 -18
- package/{runAgentClientLoop-Z6STKR3Z.js → runAgentClientLoop-NYZWX6JF.js} +12 -12
- package/{spaceCommands-M44RQPCK.js → spaceCommands-5ZN5J2X3.js} +7 -7
- package/{streamAgentChatTurn-2ON7E6LT.js → streamAgentChatTurn-LP3RQ3K5.js} +16 -16
- package/{tools-ZB2YBHSS.js → tools-KYFVARQ5.js} +7 -7
- package/{tuiSummaryLlmCaller-I2MRY6T5.js → tuiSummaryLlmCaller-OM3V6TZG.js} +4 -4
- package/{updateDialogTitleAction-YMQAOVJ2.js → updateDialogTitleAction-4ESKJ7L6.js} +3 -3
|
@@ -18,23 +18,23 @@ import "./chunk-RPZNVBA5.js";
|
|
|
18
18
|
import "./chunk-NBTY7YJF.js";
|
|
19
19
|
import "./chunk-VF4K2QE6.js";
|
|
20
20
|
import "./chunk-UAD2WT54.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-QA5LXQFO.js";
|
|
22
|
+
import "./chunk-QMFYP3O4.js";
|
|
23
23
|
import "./chunk-ZNFJWEN4.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-DRR5E2EM.js";
|
|
25
25
|
import "./chunk-HNUWUO75.js";
|
|
26
26
|
import "./chunk-CHOZJMJS.js";
|
|
27
27
|
import "./chunk-PWTNI4N7.js";
|
|
28
28
|
import "./chunk-SRZ6BQIP.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-CS4FUKMG.js";
|
|
30
30
|
import "./chunk-2WZXXAQD.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-XRU4QTSX.js";
|
|
32
32
|
import "./chunk-G6OOUQWJ.js";
|
|
33
33
|
import "./chunk-56GBUMO5.js";
|
|
34
34
|
import "./chunk-WJZOQR2J.js";
|
|
35
35
|
import "./chunk-ZEOR6XPJ.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-U3YGSKXD.js";
|
|
37
|
+
import "./chunk-IJOJMOCX.js";
|
|
38
38
|
import "./chunk-2GRXE3YJ.js";
|
|
39
39
|
import "./chunk-JLR5NWP2.js";
|
|
40
40
|
import "./chunk-XAFCJN32.js";
|
|
@@ -18,23 +18,23 @@ import "./chunk-RPZNVBA5.js";
|
|
|
18
18
|
import "./chunk-NBTY7YJF.js";
|
|
19
19
|
import "./chunk-VF4K2QE6.js";
|
|
20
20
|
import "./chunk-UAD2WT54.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-QA5LXQFO.js";
|
|
22
|
+
import "./chunk-QMFYP3O4.js";
|
|
23
23
|
import "./chunk-ZNFJWEN4.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-DRR5E2EM.js";
|
|
25
25
|
import "./chunk-HNUWUO75.js";
|
|
26
26
|
import "./chunk-CHOZJMJS.js";
|
|
27
27
|
import "./chunk-PWTNI4N7.js";
|
|
28
28
|
import "./chunk-SRZ6BQIP.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-CS4FUKMG.js";
|
|
30
30
|
import "./chunk-2WZXXAQD.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-XRU4QTSX.js";
|
|
32
32
|
import "./chunk-G6OOUQWJ.js";
|
|
33
33
|
import "./chunk-56GBUMO5.js";
|
|
34
34
|
import "./chunk-WJZOQR2J.js";
|
|
35
35
|
import "./chunk-ZEOR6XPJ.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-U3YGSKXD.js";
|
|
37
|
+
import "./chunk-IJOJMOCX.js";
|
|
38
38
|
import "./chunk-2GRXE3YJ.js";
|
|
39
39
|
import "./chunk-JLR5NWP2.js";
|
|
40
40
|
import "./chunk-XAFCJN32.js";
|
|
@@ -65,10 +65,10 @@ import {
|
|
|
65
65
|
detectLocalDevinCredentials,
|
|
66
66
|
extractDevinToken,
|
|
67
67
|
fetchAntigravityCloudCodeCompletion
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-QMFYP3O4.js";
|
|
69
69
|
import "./chunk-HNUWUO75.js";
|
|
70
|
-
import "./chunk-
|
|
71
|
-
import "./chunk-
|
|
70
|
+
import "./chunk-XRU4QTSX.js";
|
|
71
|
+
import "./chunk-IJOJMOCX.js";
|
|
72
72
|
import "./chunk-XAFCJN32.js";
|
|
73
73
|
import "./chunk-5ZUL4CUO.js";
|
|
74
74
|
import "./chunk-UKZX3NHN.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveRawAgentInput,
|
|
10
10
|
resolveServerUrl,
|
|
11
11
|
writeUsage
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-P3KTMRQ2.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-MR7SWXO4.js";
|
|
35
35
|
import {
|
|
36
36
|
clearCredentialAvailability,
|
|
37
37
|
readEffectiveCredentialEntry,
|
|
@@ -79,14 +79,14 @@ import {
|
|
|
79
79
|
} from "./chunk-BMQ2MJUK.js";
|
|
80
80
|
import {
|
|
81
81
|
resolveCliLocalRuntimeKeyCapability
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-TV6QW46C.js";
|
|
83
83
|
import {
|
|
84
84
|
isTransientFetchError
|
|
85
85
|
} from "./chunk-KFHREHUQ.js";
|
|
86
86
|
import {
|
|
87
87
|
parseUiCard,
|
|
88
88
|
uiCardFallback
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-SYIWIP4D.js";
|
|
90
90
|
import {
|
|
91
91
|
isGatewayHttpStatus
|
|
92
92
|
} from "./chunk-NF64D32W.js";
|
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
chooseMemoryOwners,
|
|
96
96
|
loadMemoryCandidatesFromDb,
|
|
97
97
|
resolveAgentMemoryPolicy
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-73FHDE7C.js";
|
|
99
99
|
import {
|
|
100
100
|
API_REPORTED_COST_MULTIPLIER,
|
|
101
101
|
estimateMessagesTokens,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
resolveAgentContextWindow,
|
|
104
104
|
resolveOccupancy,
|
|
105
105
|
resolveOccupancyWindow
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-LQRXBYTS.js";
|
|
107
107
|
import {
|
|
108
108
|
buildSkillDiscoveryContextLayer
|
|
109
109
|
} from "./chunk-AU7AXHUL.js";
|
|
@@ -115,10 +115,10 @@ import {
|
|
|
115
115
|
LOCAL_AGENT_CONFIG_MISSING_CODE,
|
|
116
116
|
LOCAL_TURN_ABORTED_CODE,
|
|
117
117
|
readActionGate
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-QA5LXQFO.js";
|
|
119
119
|
import {
|
|
120
120
|
resolveAgentRuntimeConfigFromRecord
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-CS4FUKMG.js";
|
|
122
122
|
import {
|
|
123
123
|
createThinkParserState,
|
|
124
124
|
flushThinkParser,
|
|
@@ -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-3QX3FMER.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();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchReferenceContents,
|
|
3
3
|
resolveReferenceAssets
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UPJVQK5J.js";
|
|
5
5
|
import {
|
|
6
6
|
updateTokensAction
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LQRXBYTS.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-U3YGSKXD.js";
|
|
16
16
|
import {
|
|
17
17
|
isRecord
|
|
18
18
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GJU7F5IR.js";
|
|
4
4
|
import {
|
|
5
5
|
format,
|
|
6
6
|
prepareAndPersistMessage,
|
|
7
7
|
uiAskChoiceFunc,
|
|
8
8
|
uiAskChoiceFunctionSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LQRXBYTS.js";
|
|
10
10
|
import {
|
|
11
11
|
formatISO
|
|
12
12
|
} from "./chunk-ZRAU6T47.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveAgentImageInputSupport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XRU4QTSX.js";
|
|
4
4
|
import {
|
|
5
5
|
TOOL_HAD_IMAGES,
|
|
6
6
|
hadToolImages
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IJOJMOCX.js";
|
|
8
8
|
import {
|
|
9
9
|
asOptionalFiniteNumber
|
|
10
10
|
} from "./chunk-WWC7I6TA.js";
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
readSseFrames
|
|
3
3
|
} from "./chunk-HNUWUO75.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
resolveToolImagePolicy
|
|
6
|
+
} from "./chunk-XRU4QTSX.js";
|
|
7
7
|
import {
|
|
8
8
|
accumulateToolCallDelta,
|
|
9
9
|
createThinkParserState,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
stablePromptCacheKey,
|
|
31
31
|
toOpenAiCompatibleMessages,
|
|
32
32
|
toResponsesTools
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-U3YGSKXD.js";
|
|
34
34
|
import {
|
|
35
35
|
isMeaningfulChatCompletionOutput,
|
|
36
36
|
isMeaningfulResponsesOutput
|
|
@@ -526,10 +526,29 @@ function buildPlatformChatCompletionRequest(args) {
|
|
|
526
526
|
const body = {
|
|
527
527
|
model: args.providerConfig.model,
|
|
528
528
|
...usesResponsesApi ? {
|
|
529
|
-
|
|
529
|
+
// 平台代理路径:网关中转通常仅支持字符串形态的 function_call_output.output,
|
|
530
|
+
// 保持「合成 user 消息」方案传递图片附件。
|
|
531
|
+
// Responses 协议天然支持 reasoning 数组回放,因此不 stripReasoningContent。
|
|
532
|
+
input: convertMessagesToResponsesInput(
|
|
533
|
+
toOpenAiCompatibleMessages(sanitizedMessages, {
|
|
534
|
+
supportsToolImages: resolveToolImagePolicy({
|
|
535
|
+
routeKind: "platform",
|
|
536
|
+
provider: args.providerConfig.usageProvider ?? args.providerConfig.provider,
|
|
537
|
+
model: args.providerConfig.model,
|
|
538
|
+
customProviderUrl: args.providerConfig.endpoint,
|
|
539
|
+
hasVision: args.providerConfig.hasVision
|
|
540
|
+
}).supportsToolImages
|
|
541
|
+
})
|
|
542
|
+
)
|
|
530
543
|
} : {
|
|
531
544
|
messages: toOpenAiCompatibleMessages(sanitizedMessages, {
|
|
532
|
-
supportsToolImages:
|
|
545
|
+
supportsToolImages: resolveToolImagePolicy({
|
|
546
|
+
routeKind: "platform",
|
|
547
|
+
provider: args.providerConfig.usageProvider ?? args.providerConfig.provider,
|
|
548
|
+
model: args.providerConfig.model,
|
|
549
|
+
customProviderUrl: args.providerConfig.endpoint,
|
|
550
|
+
hasVision: args.providerConfig.hasVision
|
|
551
|
+
}).supportsToolImages,
|
|
533
552
|
stripReasoningContent: shouldStripReasoning
|
|
534
553
|
})
|
|
535
554
|
},
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-HS7MLR74.js";
|
|
4
4
|
import {
|
|
5
5
|
performServerProxyFetchWithRetry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UPJVQK5J.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchServerSyncedCredential
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GHNRJ3TK.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSkillGuidancePromptBlock
|
|
12
12
|
} from "./chunk-3LNVSFTH.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
resolveReasoningReplayOptions,
|
|
33
33
|
shouldStripReasoningContentForOutbound,
|
|
34
34
|
stablePromptCacheKey
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-U3YGSKXD.js";
|
|
36
36
|
import {
|
|
37
37
|
resolveAgentCallPlan,
|
|
38
38
|
resolveClientWire
|
|
@@ -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-OV72YSE4.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-NYZWX6JF.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-LP3RQ3K5.js");
|
|
388
388
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
389
389
|
}),
|
|
390
390
|
/**
|
|
@@ -34,6 +34,9 @@ function resetToolImageDelivery(images) {
|
|
|
34
34
|
function toolImageDelivery(image) {
|
|
35
35
|
return delivery.get(image);
|
|
36
36
|
}
|
|
37
|
+
var MAX_TOOL_IMAGES_PER_REQUEST = 4;
|
|
38
|
+
var MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST = 8 * 1024 * 1024;
|
|
39
|
+
var formatToolImageBudgetNote = (omittedCount) => `Note: ${omittedCount} image(s) omitted (request budget: ${MAX_TOOL_IMAGES_PER_REQUEST} images / 8 MiB base64) \u2014 they were NOT delivered, do not guess their content.`;
|
|
37
40
|
function createToolImageBudget() {
|
|
38
41
|
let count = 0;
|
|
39
42
|
let bytes = 0;
|
|
@@ -43,11 +46,11 @@ function createToolImageBudget() {
|
|
|
43
46
|
if (seen.has(key)) return "duplicate";
|
|
44
47
|
seen.add(key);
|
|
45
48
|
const size = Buffer.byteLength(image.dataBase64, "utf8");
|
|
46
|
-
if (size >
|
|
49
|
+
if (size > MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST) {
|
|
47
50
|
delivery.set(image, "impossible");
|
|
48
51
|
return "impossible";
|
|
49
52
|
}
|
|
50
|
-
if (count >=
|
|
53
|
+
if (count >= MAX_TOOL_IMAGES_PER_REQUEST || bytes + size > MAX_TOOL_IMAGE_BASE64_BYTES_PER_REQUEST) return "pending";
|
|
51
54
|
count += 1;
|
|
52
55
|
bytes += size;
|
|
53
56
|
delivery.set(image, "delivered");
|
|
@@ -142,6 +145,7 @@ export {
|
|
|
142
145
|
toolImageNotices,
|
|
143
146
|
resetToolImageDelivery,
|
|
144
147
|
toolImageDelivery,
|
|
148
|
+
formatToolImageBudgetNote,
|
|
145
149
|
createToolImageBudget,
|
|
146
150
|
toolImageSource,
|
|
147
151
|
toolImageOmission,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MR7SWXO4.js";
|
|
5
5
|
import {
|
|
6
6
|
t
|
|
7
7
|
} from "./chunk-TDX2L4W2.js";
|
|
8
8
|
import {
|
|
9
9
|
clipMultilineText
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SYIWIP4D.js";
|
|
11
11
|
import {
|
|
12
12
|
runLocalAgentTurn
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QA5LXQFO.js";
|
|
14
14
|
import {
|
|
15
15
|
applyToolSurfaceConstraints
|
|
16
16
|
} from "./chunk-2GRXE3YJ.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
mergeReferences,
|
|
8
8
|
resolveReferenceAssets,
|
|
9
9
|
resolveToolsFromKeys
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UPJVQK5J.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-SYIWIP4D.js";
|
|
24
24
|
import {
|
|
25
25
|
resolveToolBaseUrl
|
|
26
26
|
} from "./chunk-MYOH447Z.js";
|
|
@@ -32,15 +32,15 @@ import {
|
|
|
32
32
|
} from "./chunk-TDNAAXUQ.js";
|
|
33
33
|
import {
|
|
34
34
|
getDocState
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-S4SXPMPC.js";
|
|
36
36
|
import {
|
|
37
37
|
getTableState
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-GJU7F5IR.js";
|
|
39
39
|
import {
|
|
40
40
|
PERSONALIZATION_DIALOG_CATEGORY,
|
|
41
41
|
buildPersonalizationDialogPolicyContext,
|
|
42
42
|
selectAllMsgs
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-LQRXBYTS.js";
|
|
44
44
|
import {
|
|
45
45
|
getCurrentSpaceIdRaw,
|
|
46
46
|
getViewMode
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-QYPE3TS3.js";
|
|
12
12
|
import {
|
|
13
13
|
runLlm
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GHNRJ3TK.js";
|
|
15
15
|
import {
|
|
16
16
|
getApproxPricePerImage
|
|
17
17
|
} from "./chunk-4JH2UMJR.js";
|
|
@@ -11064,7 +11064,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
11064
11064
|
runtimeOptions: args.runtimeOptions
|
|
11065
11065
|
});
|
|
11066
11066
|
if (agentKeyToUse) {
|
|
11067
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
11067
|
+
const { streamAgentChatTurn } = await import("./agentSlice-VC7BZD5N.js");
|
|
11068
11068
|
await dispatch(
|
|
11069
11069
|
streamAgentChatTurn({
|
|
11070
11070
|
agentKey: agentKeyToUse,
|
|
@@ -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-QRWP73XJ.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-SYA2LFEN.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-7K5M7ULU.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-4ESKJ7L6.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-FRBUFXEC.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-TABPPAGD.js");
|
|
13938
13938
|
const pageKey = await createDocState(
|
|
13939
13939
|
{ slateData, title },
|
|
13940
13940
|
{ dispatch, getState }
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
import {
|
|
65
65
|
inlineImageUrlsForCustomProvider,
|
|
66
66
|
prepareTools
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-CCWUO2ZE.js";
|
|
68
68
|
import {
|
|
69
69
|
getServerProviderSecret
|
|
70
70
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
resolveCliLocalRuntimeKeyCapability,
|
|
87
87
|
resolveCliLocalSpawnDispatch,
|
|
88
88
|
resolveStartAgentRunCwd
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-TV6QW46C.js";
|
|
90
90
|
import {
|
|
91
91
|
deriveCredentialGroup,
|
|
92
92
|
deriveCustomProviderCredentialGroup
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
} from "./chunk-KFHREHUQ.js";
|
|
98
98
|
import {
|
|
99
99
|
resolveAgentRequiredPackIds
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-SYIWIP4D.js";
|
|
101
101
|
import {
|
|
102
102
|
applyBuiltinAgentRuntimeOverride,
|
|
103
103
|
applyTokenUsageToDayStats,
|
|
@@ -106,14 +106,14 @@ import {
|
|
|
106
106
|
resolveBuiltinPlatformAgentConfig,
|
|
107
107
|
runKeyed,
|
|
108
108
|
validateAskChoiceInput
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-LQRXBYTS.js";
|
|
110
110
|
import {
|
|
111
111
|
BUILTIN_DIALOG_LLM_CHAT_FALLBACK_MODEL,
|
|
112
112
|
BUILTIN_TITLE_LLM_CONFIG
|
|
113
113
|
} from "./chunk-523DITKR.js";
|
|
114
114
|
import {
|
|
115
115
|
fetchServerSyncedCredential
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-GHNRJ3TK.js";
|
|
117
117
|
import {
|
|
118
118
|
isTombstoneRecord
|
|
119
119
|
} from "./chunk-D2MDMY2M.js";
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
runExecShellGates,
|
|
171
171
|
validateConfiguredRootExecutionLease,
|
|
172
172
|
verifyOwnerRouteAck
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-QA5LXQFO.js";
|
|
174
174
|
import {
|
|
175
175
|
accumulateGeminiChunks,
|
|
176
176
|
buildGeminiGenerateContentRequest,
|
|
@@ -182,7 +182,7 @@ import {
|
|
|
182
182
|
resolveAntigravityFinishReason,
|
|
183
183
|
resolveGeminiModelQuirks,
|
|
184
184
|
shouldUseGeminiNativeToolRoute
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-QMFYP3O4.js";
|
|
186
186
|
import {
|
|
187
187
|
PlatformStreamInterruptedError,
|
|
188
188
|
buildPlatformChatCompletionRequest,
|
|
@@ -193,27 +193,27 @@ import {
|
|
|
193
193
|
readPlatformChatSseCompletion,
|
|
194
194
|
resolvePlatformChatProviderConfig,
|
|
195
195
|
shouldUsePlatformChatProvider
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-DRR5E2EM.js";
|
|
197
197
|
import {
|
|
198
198
|
readSseDataValues,
|
|
199
199
|
readSseFrames
|
|
200
200
|
} from "./chunk-HNUWUO75.js";
|
|
201
201
|
import {
|
|
202
202
|
resolveAgentRuntimeConfigFromRecord
|
|
203
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-CS4FUKMG.js";
|
|
204
204
|
import {
|
|
205
205
|
resolveHistoricalToolContentCap
|
|
206
206
|
} from "./chunk-2WZXXAQD.js";
|
|
207
207
|
import {
|
|
208
|
-
|
|
209
|
-
} from "./chunk-
|
|
208
|
+
resolveToolImagePolicy
|
|
209
|
+
} from "./chunk-XRU4QTSX.js";
|
|
210
210
|
import {
|
|
211
211
|
collectStablePromptPrefix,
|
|
212
212
|
convertMessagesToResponsesInput,
|
|
213
213
|
findAgentStatePairingIssues,
|
|
214
214
|
stablePromptCacheKey,
|
|
215
215
|
toResponsesTools
|
|
216
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-U3YGSKXD.js";
|
|
217
217
|
import {
|
|
218
218
|
EMPTY_TOOL_RESULT_TEXT,
|
|
219
219
|
createToolImageBudget,
|
|
@@ -222,7 +222,7 @@ import {
|
|
|
222
222
|
toolImageOmission,
|
|
223
223
|
toolImageSource,
|
|
224
224
|
toolImages
|
|
225
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-IJOJMOCX.js";
|
|
226
226
|
import {
|
|
227
227
|
buildNoloWorkspaceOpenAiTools,
|
|
228
228
|
filterClientNoloWorkspaceToolNames,
|
|
@@ -826,7 +826,7 @@ function buildAnthropicMessagesBody(args) {
|
|
|
826
826
|
const effective = text.trim() ? text : EMPTY_TOOL_RESULT_TEXT;
|
|
827
827
|
const notices = toolImageNotices(message);
|
|
828
828
|
const imageBlocks = [];
|
|
829
|
-
if (
|
|
829
|
+
if (resolveToolImagePolicy({ ...args.agentConfig, routeKind: "anthropic" }).supportsToolImages) {
|
|
830
830
|
for (const image of images) {
|
|
831
831
|
const decision = imageBudget(image);
|
|
832
832
|
if (decision === "duplicate") continue;
|
|
@@ -2444,8 +2444,9 @@ function collectInstructions(messages, agentPrompt) {
|
|
|
2444
2444
|
}
|
|
2445
2445
|
return systemTexts.join("\n\n");
|
|
2446
2446
|
}
|
|
2447
|
-
function convertMessagesToCodexInput(messages) {
|
|
2448
|
-
|
|
2447
|
+
function convertMessagesToCodexInput(messages, supportsToolImages = false) {
|
|
2448
|
+
const normalizedToolImages = typeof supportsToolImages === "boolean" ? supportsToolImages : supportsToolImages.supportsToolImages === true;
|
|
2449
|
+
return convertMessagesToResponsesInput(messages, { supportsToolImages: normalizedToolImages }).map((item) => {
|
|
2449
2450
|
if (item.type !== "reasoning") return item;
|
|
2450
2451
|
return {
|
|
2451
2452
|
type: "reasoning",
|
|
@@ -2462,7 +2463,12 @@ function buildCodexRequestBody(args, identity = createCodexRequestIdentity(), se
|
|
|
2462
2463
|
const role = m && typeof m === "object" ? String(m.role) : "";
|
|
2463
2464
|
return role !== "system" && role !== "developer";
|
|
2464
2465
|
});
|
|
2465
|
-
const input = convertMessagesToCodexInput(nonSystem
|
|
2466
|
+
const input = convertMessagesToCodexInput(nonSystem, resolveToolImagePolicy({
|
|
2467
|
+
...args.agentConfig,
|
|
2468
|
+
model: typeof args.openAiBody.model === "string" ? args.openAiBody.model : args.agentConfig.model,
|
|
2469
|
+
routeKind: "codex/responses",
|
|
2470
|
+
legacySupportsToolImages: false
|
|
2471
|
+
}).supportsToolImages);
|
|
2466
2472
|
const instructions = collectInstructions(rawMessages, args.agentConfig.prompt);
|
|
2467
2473
|
const stableInstructions = collectStablePromptPrefix(rawMessages, args.agentConfig.prompt);
|
|
2468
2474
|
const model = asOptionalTrimmedString(args.openAiBody.model) ?? asOptionalTrimmedString(args.agentConfig.model) ?? "gpt-5.5";
|
|
@@ -2993,12 +2999,13 @@ function buildGeminiCustomNativeProvider(p) {
|
|
|
2993
2999
|
return { ok: true, mimeType: image.headers.get("content-type") ?? "application/octet-stream", bytes: new Uint8Array(await image.arrayBuffer()) };
|
|
2994
3000
|
}
|
|
2995
3001
|
});
|
|
2996
|
-
const supportsToolImages =
|
|
3002
|
+
const supportsToolImages = resolveToolImagePolicy({
|
|
3003
|
+
routeKind: "gemini-native",
|
|
2997
3004
|
...agentConfig,
|
|
2998
3005
|
provider: agentConfig.provider ?? "google",
|
|
2999
3006
|
model,
|
|
3000
|
-
hasVision: agentConfig.hasVision
|
|
3001
|
-
});
|
|
3007
|
+
hasVision: agentConfig.hasVision
|
|
3008
|
+
}).supportsToolImages;
|
|
3002
3009
|
const body = buildGeminiGenerateContentRequest({ messages: inlineResult.messages, tools, maxTokens: typeof agentConfig.max_tokens === "number" ? agentConfig.max_tokens : void 0, temperature: typeof agentConfig.temperature === "number" ? agentConfig.temperature : void 0, attachSkipThoughtSignature: resolveGeminiModelQuirks(model).allowsThoughtSignatureSentinel, supportsToolImages });
|
|
3003
3010
|
log("provider.request.start", { agentKey: agentConfig.key, transport, requestUrl: nativeEndpoint, model, messageCount: messages.length, toolCount: tools.length, requestedToolNames });
|
|
3004
3011
|
const response = await fetchImpl(nativeEndpoint, { method: "POST", headers: { "Content-Type": "application/json", ...customNativeAuthHeaders("gemini", apiKey, apiKeyHeader), ...buildProviderSessionHeaders({ endpoint, sessionId: options?.dialogId ?? fallbackSessionId }) }, body: JSON.stringify(body), signal: options?.signal ? AbortSignal.any([options.signal, AbortSignal.timeout(options.timeoutMs ?? 12e4)]) : AbortSignal.timeout(options?.timeoutMs ?? 12e4) });
|
|
@@ -3542,12 +3549,13 @@ var resolveGeminiNativeToolTransport = async (ctx) => {
|
|
|
3542
3549
|
model: providerConfig.model,
|
|
3543
3550
|
complete: async (messages, options) => {
|
|
3544
3551
|
const model = providerConfig.model;
|
|
3545
|
-
const supportsToolImages =
|
|
3552
|
+
const supportsToolImages = resolveToolImagePolicy({
|
|
3553
|
+
routeKind: "gemini-native",
|
|
3546
3554
|
provider: providerConfig.usageProvider ?? providerConfig.provider,
|
|
3547
3555
|
model: providerConfig.model,
|
|
3548
3556
|
customProviderUrl: providerConfig.endpoint,
|
|
3549
|
-
hasVision: agentConfig.hasVision
|
|
3550
|
-
});
|
|
3557
|
+
hasVision: agentConfig.hasVision
|
|
3558
|
+
}).supportsToolImages;
|
|
3551
3559
|
const requestBody = buildGeminiGenerateContentRequest({
|
|
3552
3560
|
messages,
|
|
3553
3561
|
tools,
|