nolo-cli 0.172.0-alpha.2 → 0.173.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-IABRBGAE.js → _executeModel-KT7NUYZC.js} +22 -21
- package/{accountResolver-JS7QDNNL.js → accountResolver-YGMLY3WW.js} +2 -1
- package/{agentDeleteCommand-ATU2HZT2.js → agentDeleteCommand-SVGYPFU5.js} +30 -28
- package/{agentEmailCommands-YTKUTNLR.js → agentEmailCommands-TBZJC37X.js} +32 -30
- package/{agentListCommands-ZBA5JTWP.js → agentListCommands-CD7CLGH4.js} +20 -18
- package/{agentMachineCommands-ZSKWBVPO.js → agentMachineCommands-DQBUP3I5.js} +18 -16
- package/{agentProviderCommands-TWVILNAN.js → agentProviderCommands-FXEMNSZ2.js} +2 -2
- package/{agentRecordCommands-KVN6OF4P.js → agentRecordCommands-4PY33TAJ.js} +30 -28
- package/{agentRunCommand-CC6JZOGT.js → agentRunCommand-P7BC5M3Z.js} +31 -29
- package/{agentRuntimeLocal-JA2Q6UBJ.js → agentRuntimeLocal-XGBQ7JK2.js} +15 -13
- package/{agentSlice-RVJDFNRB.js → agentSlice-NL7LRTLO.js} +1 -1
- package/{appDeleteCommands-4XONJLO7.js → appDeleteCommands-VBH3YLIO.js} +19 -17
- package/{appDeployCommands-SDGJMAUG.js → appDeployCommands-3MZXLEKN.js} +19 -17
- package/{appDeployStatusCommands-A6O3FEEW.js → appDeployStatusCommands-FAWWEEOT.js} +19 -17
- package/{appGetCommands-U4Z5HSNF.js → appGetCommands-VMMCATHU.js} +19 -17
- package/{appListCommands-T4HVTIUC.js → appListCommands-NHM6PAIX.js} +19 -17
- package/{authCommand-BSOLJFPV.js → authCommand-KQ7GWCXK.js} +8 -4
- package/{chromeCommands-IY4NVSXZ.js → chromeCommands-Z5LDHMYN.js} +2 -1
- package/{chromeOpsCommands-6JHNTKXU.js → chromeOpsCommands-CHBIUDJD.js} +2 -1
- package/{chunk-ZB4JKLJM.js → chunk-25A6K2YP.js} +3 -3
- package/{chunk-6J227QXV.js → chunk-2GRXE3YJ.js} +21 -0
- package/{chunk-74PQM3XI.js → chunk-3TAVX6CD.js} +75 -39
- package/{chunk-BW3LCST7.js → chunk-4RYUMDOM.js} +2 -2
- package/{chunk-MYZHJKLG.js → chunk-64MLOS7B.js} +1 -1
- package/{chunk-CZLO63PE.js → chunk-73NYJAJS.js} +10 -10
- package/{chunk-I33CJERI.js → chunk-7QQOOHDG.js} +2 -2
- package/{chunk-BKCR2JHG.js → chunk-7ZGMQZ5D.js} +0 -45
- package/{chunk-X7KVZ2OK.js → chunk-AFFHPBEU.js} +7 -7
- package/{chunk-AKXKBNLQ.js → chunk-ASGIXFB6.js} +2 -2
- package/{chunk-UG3UI4Z7.js → chunk-AV67EUU4.js} +13 -13
- package/{chunk-EWLPIR2S.js → chunk-BAXCQF6H.js} +1 -1
- package/{chunk-FZSVCJUU.js → chunk-BGQZLBMJ.js} +4 -101
- package/{chunk-2EC6FNS4.js → chunk-BYNWE72R.js} +29 -91
- package/{chunk-WKF6C3X5.js → chunk-CLY56QIC.js} +3 -3
- package/{chunk-AJ52EA72.js → chunk-D2J22QSE.js} +1 -1
- package/{chunk-BU2YQBV4.js → chunk-DPQYIS6D.js} +41 -1
- package/{chunk-TYQZRSL6.js → chunk-ENIQIEAF.js} +1 -1
- package/{chunk-TCWK2EQX.js → chunk-FJ76E5ZM.js} +2 -2
- package/chunk-FX33MFLW.js +103 -0
- package/{chunk-UA4VAUQL.js → chunk-GXFAZGZ6.js} +2 -2
- package/{chunk-5WOL7BUP.js → chunk-J33JIJK7.js} +2 -2
- package/{chunk-WW5MNBTZ.js → chunk-JDWJ64VG.js} +5 -5
- package/{chunk-OQ3DOBYB.js → chunk-JOUFPRE4.js} +178 -2
- package/{chunk-6BDTSKUT.js → chunk-KBGWPSY6.js} +4 -4
- package/{chunk-BE42X662.js → chunk-KPSNHLFI.js} +4 -6
- package/{chunk-O4H4HD4X.js → chunk-N2N63HTQ.js} +2 -2
- package/{chunk-R2RDXNEE.js → chunk-O2LB346J.js} +3 -3
- package/{chunk-XWX5ZGWR.js → chunk-O3OJRN5Z.js} +89 -24
- package/{chunk-OPNHKULV.js → chunk-P34IX26T.js} +2 -2
- package/{chunk-ISMHFI2Y.js → chunk-QWNMFO5E.js} +3 -3
- package/{chunk-PJVGNB4L.js → chunk-RPZNVBA5.js} +1 -1
- package/{chunk-SUBKVXFM.js → chunk-RUKAOMXD.js} +1 -1
- package/chunk-SRZ6BQIP.js +68 -0
- package/{chunk-7TBARDLF.js → chunk-T7HBI3WZ.js} +1 -1
- package/{chunk-SDAIVJZG.js → chunk-TLBTPKDD.js} +11 -11
- package/chunk-UKZX3NHN.js +48 -0
- package/{chunk-ULE7ABRN.js → chunk-VETQRONK.js} +13 -11
- package/{chunk-ORKQ3T5D.js → chunk-W7S5CUGI.js} +3 -3
- package/{chunk-F3F3ARBN.js → chunk-WBA4HAFS.js} +2 -2
- package/{chunk-XBJIESNS.js → chunk-XAFCJN32.js} +2 -2
- package/{chunk-CAAH5LNN.js → chunk-Y3BUTWUJ.js} +2 -2
- package/{chunk-KNDA4K34.js → chunk-YBTP3PUM.js} +1 -1
- package/{chunk-RATR6VCP.js → chunk-ZEOR6XPJ.js} +1 -1
- package/{commandRegistry-ICL67WF7.js → commandRegistry-UVXIFHUI.js} +53 -53
- package/{contentThunks-SM5FP7FM.js → contentThunks-I4HNLTQY.js} +6 -5
- package/{createAgentAutomationAction-ECWLREQU.js → createAgentAutomationAction-GS5LQ52L.js} +6 -5
- package/{createDialogAction-LROHLFQ2.js → createDialogAction-5WNACKWC.js} +7 -6
- package/{createPageAction-KUQVLZMZ.js → createPageAction-S7MGYSMU.js} +6 -5
- package/{dialogCommands-T5JYBPS6.js → dialogCommands-OK3L6SAI.js} +19 -17
- package/{dialogSlice-2FWQCZDB.js → dialogSlice-R62QV2OE.js} +5 -4
- package/{docCreateCommands-7F4ICTJQ.js → docCreateCommands-NMCMJPQX.js} +18 -16
- package/{docDeleteCommands-4INN7EWS.js → docDeleteCommands-46FMFRZU.js} +19 -17
- package/{docReadCommands-7PZZR3C3.js → docReadCommands-6NPY5P67.js} +18 -16
- package/{docStore-WUR5MNKF.js → docStore-X5P4UGTZ.js} +1 -1
- package/{docUpdateCommands-H2YXAGOV.js → docUpdateCommands-UDT4QLPL.js} +18 -16
- package/{handleSendMessageAction-DVXNAQ2V.js → handleSendMessageAction-IVQMBROO.js} +13 -13
- package/index.js +4 -4
- package/{localRuntimeAdapter-M64P55I7.js → localRuntimeAdapter-LY5MOJN4.js} +28 -26
- package/{machineCommands-2H7QW35Q.js → machineCommands-KYTNSAIN.js} +29 -27
- package/{machineWsRunDispatch-4L2DSIMF.js → machineWsRunDispatch-ZR3GCQMH.js} +29 -27
- package/package.json +1 -1
- package/{providerPresetApply-5K4PBX4J.js → providerPresetApply-MBMGCNKZ.js} +1 -2
- package/{providerRegistry-K5MSZ3Y5.js → providerRegistry-P4KYS6SE.js} +1 -2
- package/{readlineWorkspace-KNE2THUN.js → readlineWorkspace-SNA6I5UK.js} +34 -32
- package/{runAgentClientLoop-34ME2HDT.js → runAgentClientLoop-6G7JORHJ.js} +20 -19
- package/{spaceCommands-HAVZ3PQN.js → spaceCommands-SEWFBY53.js} +18 -16
- package/{streamAgentChatTurn-YXFJ3UWD.js → streamAgentChatTurn-EJDRXKAQ.js} +26 -24
- package/{tools-M7H7Z44Z.js → tools-K3IZ7U5G.js} +13 -13
- package/{tuiSummaryLlmCaller-KVAXEH7O.js → tuiSummaryLlmCaller-2MC6SXZT.js} +8 -7
- package/{updateDialogTitleAction-YXQ2AJVK.js → updateDialogTitleAction-YO67K72J.js} +6 -5
- package/chunk-TSCI6X6C.js +0 -185
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
mergeReferences,
|
|
8
8
|
resolveReferenceAssets,
|
|
9
9
|
resolveToolsFromKeys
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FJ76E5ZM.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-GXFAZGZ6.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-N2N63HTQ.js";
|
|
36
36
|
import {
|
|
37
37
|
getTableState
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-64MLOS7B.js";
|
|
39
39
|
import {
|
|
40
40
|
PERSONALIZATION_DIALOG_CATEGORY,
|
|
41
41
|
buildPersonalizationDialogPolicyContext,
|
|
42
42
|
selectAllMsgs
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-VETQRONK.js";
|
|
44
44
|
import {
|
|
45
45
|
getCurrentSpaceIdRaw,
|
|
46
46
|
getViewMode
|
|
@@ -76,11 +76,11 @@ import {
|
|
|
76
76
|
} from "./chunk-WJZOQR2J.js";
|
|
77
77
|
import {
|
|
78
78
|
extractReferenceKeysFromMessage
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-T7HBI3WZ.js";
|
|
80
80
|
import {
|
|
81
81
|
getModelContextWindow,
|
|
82
82
|
planContextUsage
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-7ZGMQZ5D.js";
|
|
84
84
|
import {
|
|
85
85
|
asRecordOrEmpty
|
|
86
86
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./chunk-NBTY7YJF.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveCliLocalRuntimeKeyCapability
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TLBTPKDD.js";
|
|
9
9
|
import {
|
|
10
10
|
HIGH_RISK_MUTATION_TOOL_NAMES
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2GRXE3YJ.js";
|
|
12
12
|
import {
|
|
13
13
|
DEFAULT_NOLO_SERVER_URL
|
|
14
14
|
} from "./chunk-OLZBQWZU.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveRawAgentInput,
|
|
10
10
|
resolveServerUrl,
|
|
11
11
|
writeUsage
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ASGIXFB6.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-3TAVX6CD.js";
|
|
35
35
|
import {
|
|
36
36
|
clearCredentialAvailability,
|
|
37
37
|
readEffectiveCredentialEntry,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
import {
|
|
65
65
|
readDbRecord,
|
|
66
66
|
resolveAgentRecordFromHybridStore
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-P34IX26T.js";
|
|
68
68
|
import {
|
|
69
69
|
isLocalCliAgentKey
|
|
70
70
|
} from "./chunk-NBTY7YJF.js";
|
|
@@ -79,14 +79,14 @@ import {
|
|
|
79
79
|
} from "./chunk-BMQ2MJUK.js";
|
|
80
80
|
import {
|
|
81
81
|
resolveCliLocalRuntimeKeyCapability
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-TLBTPKDD.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-GXFAZGZ6.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-WBA4HAFS.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-VETQRONK.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-BYNWE72R.js";
|
|
119
119
|
import {
|
|
120
120
|
resolveAgentRuntimeConfigFromRecord
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-J33JIJK7.js";
|
|
122
122
|
import {
|
|
123
123
|
createThinkParserState,
|
|
124
124
|
flushThinkParser,
|
|
@@ -143,10 +143,10 @@ import {
|
|
|
143
143
|
} from "./chunk-JLR5NWP2.js";
|
|
144
144
|
import {
|
|
145
145
|
normalizeUsage
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-T7HBI3WZ.js";
|
|
147
147
|
import {
|
|
148
148
|
isOAuthApiKeyRef
|
|
149
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-UKZX3NHN.js";
|
|
150
150
|
import {
|
|
151
151
|
clipCompactText
|
|
152
152
|
} from "./chunk-5MMAK75Q.js";
|
|
@@ -223,7 +223,7 @@ import {
|
|
|
223
223
|
} from "./chunk-Y6ROFCZO.js";
|
|
224
224
|
import {
|
|
225
225
|
isAntigravityOAuthAgent
|
|
226
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-JOUFPRE4.js";
|
|
227
227
|
import {
|
|
228
228
|
resolveClientVersion
|
|
229
229
|
} from "./chunk-I2QHI2XM.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-XGBQ7JK2.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,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
projectOpenAiToolImages
|
|
3
|
+
} from "./chunk-FX33MFLW.js";
|
|
1
4
|
import {
|
|
2
5
|
getModelContextWindow
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7ZGMQZ5D.js";
|
|
4
7
|
import {
|
|
5
8
|
isRecord
|
|
6
9
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -232,54 +235,6 @@ var extractToolCallsFromResponseOutput = (response) => {
|
|
|
232
235
|
return calls;
|
|
233
236
|
};
|
|
234
237
|
|
|
235
|
-
// packages/agent-runtime/toolImages.ts
|
|
236
|
-
var EMPTY_TOOL_RESULT_TEXT = "[Tool completed without output]";
|
|
237
|
-
var TOOL_HAD_IMAGES = "toolHadImages";
|
|
238
|
-
function hadToolImages(message) {
|
|
239
|
-
return message.tool_result_metadata?.[TOOL_HAD_IMAGES] === true || toolImages(message).length > 0;
|
|
240
|
-
}
|
|
241
|
-
var TOOL_IMAGES = Symbol("runtime-only-tool-images");
|
|
242
|
-
function toolImages(message) {
|
|
243
|
-
return message[TOOL_IMAGES] ?? [];
|
|
244
|
-
}
|
|
245
|
-
function withoutToolImages(message) {
|
|
246
|
-
if (!(TOOL_IMAGES in message)) return message;
|
|
247
|
-
const { [TOOL_IMAGES]: _images, ...textOnly } = message;
|
|
248
|
-
return _images?.length ? {
|
|
249
|
-
...textOnly,
|
|
250
|
-
tool_result_metadata: {
|
|
251
|
-
...message.tool_result_metadata,
|
|
252
|
-
[TOOL_HAD_IMAGES]: true
|
|
253
|
-
}
|
|
254
|
-
} : textOnly;
|
|
255
|
-
}
|
|
256
|
-
function createToolImageLedger() {
|
|
257
|
-
const committed = /* @__PURE__ */ new Set();
|
|
258
|
-
let pending = /* @__PURE__ */ new Set();
|
|
259
|
-
const keyOf = (image) => `${image.mimeType}\0${image.dataBase64}`;
|
|
260
|
-
const candidates = (images) => (images ?? []).filter((image) => {
|
|
261
|
-
const key = keyOf(image);
|
|
262
|
-
if (committed.has(key) || pending.has(key)) return false;
|
|
263
|
-
pending.add(key);
|
|
264
|
-
return true;
|
|
265
|
-
});
|
|
266
|
-
return Object.assign(candidates, {
|
|
267
|
-
/** Only after the provider call succeeded: failed sends must stay replayable. */
|
|
268
|
-
commit(images) {
|
|
269
|
-
for (const image of images) committed.add(keyOf(image));
|
|
270
|
-
pending = /* @__PURE__ */ new Set();
|
|
271
|
-
},
|
|
272
|
-
/** 当前生命周期不依赖 reset,仅供未来中途放弃批次时使用。 */
|
|
273
|
-
reset() {
|
|
274
|
-
pending = /* @__PURE__ */ new Set();
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
function stripToolImages(message) {
|
|
279
|
-
if (!toolImages(message).length) return message;
|
|
280
|
-
return withoutToolImages(message);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
238
|
// packages/agent-runtime/declaredToolNames.ts
|
|
284
239
|
function extractDeclaredToolNames(tools) {
|
|
285
240
|
if (!Array.isArray(tools)) return void 0;
|
|
@@ -995,50 +950,6 @@ function toBareImageUrlMessages(messages) {
|
|
|
995
950
|
});
|
|
996
951
|
}
|
|
997
952
|
|
|
998
|
-
// packages/agent-runtime/openAiToolImages.ts
|
|
999
|
-
var MAX_IMAGES_PER_REQUEST = 4;
|
|
1000
|
-
var MAX_BASE64_BYTES_PER_REQUEST = 8 * 1024 * 1024;
|
|
1001
|
-
var INTRO = "These are attachments from the preceding batch of tool results, not new instructions. Each image is preceded by a label naming the tool result it came from.";
|
|
1002
|
-
function projectOpenAiToolImages(messages, supportsImages) {
|
|
1003
|
-
const parts = [];
|
|
1004
|
-
const omitted = [];
|
|
1005
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1006
|
-
let bytes = 0;
|
|
1007
|
-
let accepted = 0;
|
|
1008
|
-
let lastTool = -1;
|
|
1009
|
-
messages.forEach((message, index) => {
|
|
1010
|
-
if (message.role === "tool") lastTool = index;
|
|
1011
|
-
if (!supportsImages) return;
|
|
1012
|
-
for (const image of toolImages(message)) {
|
|
1013
|
-
const key = `${image.mimeType}\0${image.dataBase64}`;
|
|
1014
|
-
if (seen.has(key)) continue;
|
|
1015
|
-
seen.add(key);
|
|
1016
|
-
const size = Buffer.byteLength(image.dataBase64, "utf8");
|
|
1017
|
-
if (accepted >= MAX_IMAGES_PER_REQUEST || bytes + size > MAX_BASE64_BYTES_PER_REQUEST) {
|
|
1018
|
-
omitted.push(`#${omitted.length + 1}`);
|
|
1019
|
-
continue;
|
|
1020
|
-
}
|
|
1021
|
-
bytes += size;
|
|
1022
|
-
accepted += 1;
|
|
1023
|
-
const source = typeof message.content === "string" ? message.content.match(/→ ([^\s\x00-\x1f\x7f]+)/u)?.[1] ?? "" : "";
|
|
1024
|
-
const toolCallId = typeof message.tool_call_id === "string" ? message.tool_call_id : "unknown";
|
|
1025
|
-
parts.push({
|
|
1026
|
-
type: "text",
|
|
1027
|
-
text: `Image ${accepted} \u2014 from tool result ${toolCallId.replace(/[\x00-\x1f\x7f]/g, "")}${source ? ` (${source})` : ""}`
|
|
1028
|
-
});
|
|
1029
|
-
parts.push({ type: "image_url", image_url: { url: `data:${image.mimeType};base64,${image.dataBase64}` } });
|
|
1030
|
-
}
|
|
1031
|
-
});
|
|
1032
|
-
if (lastTool < 0) return messages;
|
|
1033
|
-
if (!parts.length && !omitted.length) return messages;
|
|
1034
|
-
const note = omitted.length ? ` Note: ${omitted.length} image(s) omitted (request budget: ${MAX_IMAGES_PER_REQUEST} images / 8 MiB base64) \u2014 they were NOT delivered, do not guess their content.` : "";
|
|
1035
|
-
const attachment = {
|
|
1036
|
-
role: "user",
|
|
1037
|
-
content: [{ type: "text", text: `${INTRO}${note}` }, ...parts]
|
|
1038
|
-
};
|
|
1039
|
-
return [...messages.slice(0, lastTool + 1), attachment, ...messages.slice(lastTool + 1)];
|
|
1040
|
-
}
|
|
1041
|
-
|
|
1042
953
|
// packages/agent-runtime/openAiCompatibleMessages.ts
|
|
1043
954
|
function isGeminiCompatibleTarget(provider, model) {
|
|
1044
955
|
const p = (provider ?? "").trim().toLowerCase();
|
|
@@ -1268,14 +1179,6 @@ var normalizeChatCompletionsBodyForProvider = ({
|
|
|
1268
1179
|
};
|
|
1269
1180
|
|
|
1270
1181
|
export {
|
|
1271
|
-
EMPTY_TOOL_RESULT_TEXT,
|
|
1272
|
-
TOOL_HAD_IMAGES,
|
|
1273
|
-
hadToolImages,
|
|
1274
|
-
TOOL_IMAGES,
|
|
1275
|
-
toolImages,
|
|
1276
|
-
withoutToolImages,
|
|
1277
|
-
createToolImageLedger,
|
|
1278
|
-
stripToolImages,
|
|
1279
1182
|
scanTruncation,
|
|
1280
1183
|
classifyUnparsableToolArgs,
|
|
1281
1184
|
markDowngradedToolTurnOrigin,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DEVIN_CONNECT_URL,
|
|
3
3
|
parseSseDataLineJson,
|
|
4
4
|
parseSseDataLineObject
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-O3OJRN5Z.js";
|
|
6
6
|
import {
|
|
7
7
|
applyChatCompletionDelta,
|
|
8
8
|
applyResponsesToolEvent,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
flushChatCompletionStream,
|
|
12
12
|
providerHttpFailure,
|
|
13
13
|
throwIfChatCompletionStreamFailed
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-O2LB346J.js";
|
|
15
15
|
import {
|
|
16
16
|
readSseFrames
|
|
17
17
|
} from "./chunk-HNUWUO75.js";
|
|
@@ -22,10 +22,13 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
EXECUTION_BACKEND_KINDS
|
|
24
24
|
} from "./chunk-PWTNI4N7.js";
|
|
25
|
+
import {
|
|
26
|
+
readLocalImage
|
|
27
|
+
} from "./chunk-SRZ6BQIP.js";
|
|
25
28
|
import {
|
|
26
29
|
hasImageInRuntimeMessages,
|
|
27
30
|
stripImagePartsFromMessages
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-J33JIJK7.js";
|
|
29
32
|
import {
|
|
30
33
|
clipToolText,
|
|
31
34
|
resolveHistoricalToolContentCap,
|
|
@@ -33,7 +36,7 @@ import {
|
|
|
33
36
|
} from "./chunk-2WZXXAQD.js";
|
|
34
37
|
import {
|
|
35
38
|
resolveAgentImageInputSupport
|
|
36
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-7QQOOHDG.js";
|
|
37
40
|
import {
|
|
38
41
|
applyShapingCounts,
|
|
39
42
|
attachProjectionFacts,
|
|
@@ -68,20 +71,16 @@ import {
|
|
|
68
71
|
hashStablePrefixContent,
|
|
69
72
|
resolveResponseGuidelines,
|
|
70
73
|
resolveToolGuidedSections
|
|
71
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-ZEOR6XPJ.js";
|
|
72
75
|
import {
|
|
73
|
-
TOOL_HAD_IMAGES,
|
|
74
|
-
TOOL_IMAGES,
|
|
75
76
|
classifyUnparsableToolArgs,
|
|
76
77
|
collectStablePromptPrefix,
|
|
77
78
|
convertMessagesToResponsesInput,
|
|
78
|
-
createToolImageLedger,
|
|
79
79
|
downgradeUnparsableToolCalls,
|
|
80
80
|
extractReasoningFromResponseOutput,
|
|
81
81
|
extractTextFromResponseOutput,
|
|
82
82
|
extractToolCallsFromResponseOutput,
|
|
83
83
|
getUsageRequestOptions,
|
|
84
|
-
hadToolImages,
|
|
85
84
|
hasParsableObjectArguments,
|
|
86
85
|
markDowngradedToolTurnOrigin,
|
|
87
86
|
normalizeChatCompletionsBodyForProvider,
|
|
@@ -92,14 +91,20 @@ import {
|
|
|
92
91
|
scanTruncation,
|
|
93
92
|
shouldStripReasoningContentForOutbound,
|
|
94
93
|
stablePromptCacheKey,
|
|
95
|
-
stripToolImages,
|
|
96
94
|
toBareImageUrlMessages,
|
|
97
95
|
toOpenAiCompatibleMessages,
|
|
98
96
|
toResponsesTools,
|
|
97
|
+
transferDowngradedToolTurnOrigin
|
|
98
|
+
} from "./chunk-BGQZLBMJ.js";
|
|
99
|
+
import {
|
|
100
|
+
TOOL_HAD_IMAGES,
|
|
101
|
+
TOOL_IMAGES,
|
|
102
|
+
createToolImageLedger,
|
|
103
|
+
hadToolImages,
|
|
104
|
+
stripToolImages,
|
|
99
105
|
toolImages,
|
|
100
|
-
transferDowngradedToolTurnOrigin,
|
|
101
106
|
withoutToolImages
|
|
102
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-FX33MFLW.js";
|
|
103
108
|
import {
|
|
104
109
|
BRIDGE_STREAM_MAX_CHARS,
|
|
105
110
|
CLI_NOLO_WORKSPACE_TOOL_NAMES,
|
|
@@ -119,7 +124,7 @@ import {
|
|
|
119
124
|
parseNoloWorkspaceToolArguments,
|
|
120
125
|
readTextStreamUpToChars,
|
|
121
126
|
resolveNoloDialogInput
|
|
122
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-2GRXE3YJ.js";
|
|
123
128
|
import {
|
|
124
129
|
buildDialogFallbackTitleFromUserInput
|
|
125
130
|
} from "./chunk-2MBTWINN.js";
|
|
@@ -134,7 +139,7 @@ import {
|
|
|
134
139
|
resolveEmptyAssistantFallbackMessage,
|
|
135
140
|
resolveEmptyAssistantOutcome,
|
|
136
141
|
resolveTruncatedReasoningTailLog
|
|
137
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-T7HBI3WZ.js";
|
|
138
143
|
import {
|
|
139
144
|
COMPACTION_SUMMARY_SCHEMA_VERSION,
|
|
140
145
|
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
@@ -157,7 +162,7 @@ import {
|
|
|
157
162
|
sha256Hex,
|
|
158
163
|
truncateToolOutputForContext,
|
|
159
164
|
withProviderCallTimingFields
|
|
160
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-7ZGMQZ5D.js";
|
|
161
166
|
import {
|
|
162
167
|
clipCompactText
|
|
163
168
|
} from "./chunk-5MMAK75Q.js";
|
|
@@ -15716,74 +15721,7 @@ async function invokeCapability(capabilityOrName, input, ctx = {}) {
|
|
|
15716
15721
|
// packages/agent-runtime/localWorkspaceTools.ts
|
|
15717
15722
|
import { existsSync as existsSync4 } from "node:fs";
|
|
15718
15723
|
import { createHash as createHash4 } from "node:crypto";
|
|
15719
|
-
|
|
15720
|
-
// packages/agent-runtime/readImage.ts
|
|
15721
|
-
import { readFile } from "node:fs/promises";
|
|
15722
|
-
import { extname } from "node:path";
|
|
15723
|
-
var MAX_IMAGE_BASE64_BYTES = 2 * 1024 * 1024;
|
|
15724
|
-
var MAX_IMAGE_EDGE = 1568;
|
|
15725
|
-
var MIME_BY_EXTENSION = {
|
|
15726
|
-
".png": "image/png",
|
|
15727
|
-
".jpg": "image/jpeg",
|
|
15728
|
-
".jpeg": "image/jpeg",
|
|
15729
|
-
".webp": "image/webp",
|
|
15730
|
-
".gif": "image/gif"
|
|
15731
|
-
};
|
|
15732
|
-
function detectMime(bytes) {
|
|
15733
|
-
if (bytes.subarray(0, 8).equals(Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]))) return "image/png";
|
|
15734
|
-
if (bytes[0] === 255 && bytes[1] === 216 && bytes[2] === 255) return "image/jpeg";
|
|
15735
|
-
if (["GIF87a", "GIF89a"].includes(bytes.toString("ascii", 0, 6))) return "image/gif";
|
|
15736
|
-
if (bytes.toString("ascii", 0, 4) === "RIFF" && bytes.toString("ascii", 8, 12) === "WEBP") return "image/webp";
|
|
15737
|
-
}
|
|
15738
|
-
async function readLocalImage(path, options) {
|
|
15739
|
-
const limit = options?.maxBase64Bytes ?? MAX_IMAGE_BASE64_BYTES;
|
|
15740
|
-
const expected = MIME_BY_EXTENSION[extname(path).toLowerCase()];
|
|
15741
|
-
if (!expected) throw new Error("read_image: unsupported image extension (PNG/JPEG/WebP/GIF only)");
|
|
15742
|
-
const bytes = await readFile(path);
|
|
15743
|
-
if (detectMime(bytes) !== expected) throw new Error("read_image: image extension and magic bytes do not match");
|
|
15744
|
-
const { default: sharp } = await import("./dist-Q2JSMAKA.js");
|
|
15745
|
-
const image = sharp(bytes, { limitInputPixels: 4e7, animated: false });
|
|
15746
|
-
const meta = await image.metadata();
|
|
15747
|
-
if (!meta.width || !meta.height) throw new Error("read_image: invalid image dimensions");
|
|
15748
|
-
const encoded = (length) => 4 * Math.ceil(length / 3);
|
|
15749
|
-
let output = bytes;
|
|
15750
|
-
let mimeType = expected;
|
|
15751
|
-
let width = meta.width;
|
|
15752
|
-
let height = meta.height;
|
|
15753
|
-
if (Math.max(width, height) > MAX_IMAGE_EDGE || encoded(output.length) > limit) {
|
|
15754
|
-
const resized = await image.rotate().resize({ width: MAX_IMAGE_EDGE, height: MAX_IMAGE_EDGE, fit: "inside", withoutEnlargement: true }).jpeg({ quality: 80 }).toBuffer({ resolveWithObject: true });
|
|
15755
|
-
output = resized.data;
|
|
15756
|
-
width = resized.info.width;
|
|
15757
|
-
height = resized.info.height;
|
|
15758
|
-
mimeType = "image/jpeg";
|
|
15759
|
-
}
|
|
15760
|
-
while (encoded(output.length) > limit) {
|
|
15761
|
-
const current = encoded(output.length);
|
|
15762
|
-
if (width === 1 && height === 1) {
|
|
15763
|
-
throw new Error(
|
|
15764
|
-
`read_image: compressed image ${width}x${height}, ${output.length} bytes (${current} base64 bytes) still exceeds ${limit} base64 bytes`
|
|
15765
|
-
);
|
|
15766
|
-
}
|
|
15767
|
-
const scale = Math.min(0.9, Math.sqrt(limit / current) * 0.95);
|
|
15768
|
-
const resized = await image.clone().rotate().resize({
|
|
15769
|
-
width: Math.max(1, Math.floor(width * scale)),
|
|
15770
|
-
height: Math.max(1, Math.floor(height * scale)),
|
|
15771
|
-
fit: "inside",
|
|
15772
|
-
withoutEnlargement: true
|
|
15773
|
-
}).jpeg({ quality: 80 }).toBuffer({ resolveWithObject: true });
|
|
15774
|
-
output = resized.data;
|
|
15775
|
-
width = resized.info.width;
|
|
15776
|
-
height = resized.info.height;
|
|
15777
|
-
mimeType = "image/jpeg";
|
|
15778
|
-
}
|
|
15779
|
-
return {
|
|
15780
|
-
content: `[image ${width}x${height} ${output.length} bytes \u2192 ${path}]`,
|
|
15781
|
-
images: [{ mimeType, dataBase64: output.toString("base64") }]
|
|
15782
|
-
};
|
|
15783
|
-
}
|
|
15784
|
-
|
|
15785
|
-
// packages/agent-runtime/localWorkspaceTools.ts
|
|
15786
|
-
import { lstat, mkdir, readdir as readdir2, readFile as readFile4, realpath, stat as stat3, writeFile } from "node:fs/promises";
|
|
15724
|
+
import { lstat, mkdir, readdir as readdir2, readFile as readFile3, realpath, stat as stat3, writeFile } from "node:fs/promises";
|
|
15787
15725
|
import { homedir } from "node:os";
|
|
15788
15726
|
import { dirname as dirname2, isAbsolute as isAbsolute2, relative as relative3, resolve as resolve4, sep } from "node:path";
|
|
15789
15727
|
import { spawn as spawnChildProcess3 } from "node:child_process";
|
|
@@ -15821,15 +15759,15 @@ function isLineRangeCovered(request3, covered) {
|
|
|
15821
15759
|
}
|
|
15822
15760
|
|
|
15823
15761
|
// packages/agent-runtime/fileTextSearch.ts
|
|
15824
|
-
import { readdir, readFile as
|
|
15762
|
+
import { readdir, readFile as readFile2, stat as stat2 } from "node:fs/promises";
|
|
15825
15763
|
import { basename, relative as relative2, resolve as resolve3 } from "node:path";
|
|
15826
15764
|
import { spawn as spawnChildProcess2 } from "node:child_process";
|
|
15827
15765
|
|
|
15828
15766
|
// packages/agent-runtime/gitignore.ts
|
|
15829
|
-
import { readFile
|
|
15767
|
+
import { readFile, stat } from "node:fs/promises";
|
|
15830
15768
|
import { resolve as resolve2 } from "node:path";
|
|
15831
15769
|
async function readRootGitignorePatterns(workspaceRoot) {
|
|
15832
|
-
const content = await
|
|
15770
|
+
const content = await readFile(resolve2(workspaceRoot, ".gitignore"), "utf8").catch(() => null);
|
|
15833
15771
|
if (content === null) return [];
|
|
15834
15772
|
return content.split(/\r?\n/).map((line) => line.trim()).filter((line) => line && !line.startsWith("#") && !line.startsWith("!")).flatMap((line) => {
|
|
15835
15773
|
const unanchored = line.replace(/^\//, "");
|
|
@@ -15909,7 +15847,7 @@ async function decorate(root, raw, context3, absolute = false) {
|
|
|
15909
15847
|
let lines = cache.get(x.file);
|
|
15910
15848
|
if (!lines) {
|
|
15911
15849
|
try {
|
|
15912
|
-
lines = (await
|
|
15850
|
+
lines = (await readFile2(x.file, "utf8")).split(/\r\n|\r|\n/);
|
|
15913
15851
|
} catch {
|
|
15914
15852
|
continue;
|
|
15915
15853
|
}
|
|
@@ -15938,7 +15876,7 @@ function globMatch(pattern, value) {
|
|
|
15938
15876
|
const r = new RegExp(`^${source}$`);
|
|
15939
15877
|
return r.test(value) || r.test(basename(value));
|
|
15940
15878
|
}
|
|
15941
|
-
var defaultReadTextFile = (filePath) =>
|
|
15879
|
+
var defaultReadTextFile = (filePath) => readFile2(filePath, "utf8").catch(() => "");
|
|
15942
15880
|
async function jsSearch(o, targetPath) {
|
|
15943
15881
|
const max4 = o.maxResults ?? Number.MAX_SAFE_INTEGER;
|
|
15944
15882
|
const excludes = o.exclude ?? [];
|
|
@@ -17010,7 +16948,7 @@ function readVisualStateCaptureArgs(args2) {
|
|
|
17010
16948
|
}
|
|
17011
16949
|
async function readWorkspacePackageScripts(workspaceRoot) {
|
|
17012
16950
|
try {
|
|
17013
|
-
const raw = await
|
|
16951
|
+
const raw = await readFile3(resolve4(workspaceRoot, "package.json"), "utf8");
|
|
17014
16952
|
const parsed = JSON.parse(raw);
|
|
17015
16953
|
const scripts = parsed && typeof parsed === "object" && parsed.scripts && typeof parsed.scripts === "object" ? Object.keys(parsed.scripts).sort() : [];
|
|
17016
16954
|
return { scripts };
|
|
@@ -17195,7 +17133,7 @@ async function readFileTool(args2) {
|
|
|
17195
17133
|
allowRuntimeOwnedSpill: true,
|
|
17196
17134
|
...args2.confirmExternalFileAccess ? { confirmExternalFileAccess: args2.confirmExternalFileAccess } : {}
|
|
17197
17135
|
});
|
|
17198
|
-
const content = await
|
|
17136
|
+
const content = await readFile3(absolutePath, "utf8");
|
|
17199
17137
|
const activity = extractActivity(parsed);
|
|
17200
17138
|
const sliced = sliceReadFileContent({
|
|
17201
17139
|
content,
|
|
@@ -17388,7 +17326,7 @@ async function editFileTool(args2) {
|
|
|
17388
17326
|
requestedPath,
|
|
17389
17327
|
...args2.confirmExternalFileAccess ? { confirmExternalFileAccess: args2.confirmExternalFileAccess } : {}
|
|
17390
17328
|
});
|
|
17391
|
-
const content = await
|
|
17329
|
+
const content = await readFile3(absolutePath, "utf8");
|
|
17392
17330
|
const { count: replacementCount, result: nextContent } = countAndReplaceEolTolerant({
|
|
17393
17331
|
content,
|
|
17394
17332
|
oldText,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-62TBKWTV.js";
|
|
7
7
|
import {
|
|
8
8
|
clearCliLocalRuntimePreparedAgentCache
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3TAVX6CD.js";
|
|
10
10
|
import {
|
|
11
11
|
readCredentialAvailability
|
|
12
12
|
} from "./chunk-R4BMKAR5.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
resolveAgentRecordFromHybridStore,
|
|
20
20
|
sanitizeAgentRecordForCliOutput,
|
|
21
21
|
writeAgentRecord
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-P34IX26T.js";
|
|
23
23
|
import {
|
|
24
24
|
resolveCliAgentKeyInput
|
|
25
25
|
} from "./chunk-NBTY7YJF.js";
|
|
@@ -244,7 +244,7 @@ async function runAgentCreateCommand(args, deps = {}) {
|
|
|
244
244
|
let verifyResult;
|
|
245
245
|
if (parsed.verify) {
|
|
246
246
|
try {
|
|
247
|
-
const { verifyCustomProvider } = await import("./agentProviderCommands-
|
|
247
|
+
const { verifyCustomProvider } = await import("./agentProviderCommands-FXEMNSZ2.js");
|
|
248
248
|
const rec = built.nextRecord;
|
|
249
249
|
verifyResult = await verifyCustomProvider({
|
|
250
250
|
providerUrl: rec.customProviderUrl,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readLocalImage
|
|
3
|
+
} from "./chunk-SRZ6BQIP.js";
|
|
1
4
|
import {
|
|
2
5
|
isRecord
|
|
3
6
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -220,6 +223,43 @@ function logUploadAudit(entry, logFn = console.warn) {
|
|
|
220
223
|
|
|
221
224
|
// packages/desktop-chrome-connector/chromeConnector.ts
|
|
222
225
|
import { existsSync as existsSync2, readFileSync } from "node:fs";
|
|
226
|
+
|
|
227
|
+
// packages/desktop-chrome-connector/screenshotResult.ts
|
|
228
|
+
import { mkdtemp, writeFile } from "node:fs/promises";
|
|
229
|
+
import { tmpdir } from "node:os";
|
|
230
|
+
import { join as join2 } from "node:path";
|
|
231
|
+
async function screenshotResult(result) {
|
|
232
|
+
const source = result;
|
|
233
|
+
if (!source?.savedTo && !source?.dataUrl) {
|
|
234
|
+
return { content: JSON.stringify({ ok: true, result }) };
|
|
235
|
+
}
|
|
236
|
+
let path = typeof source?.savedTo === "string" ? source.savedTo : void 0;
|
|
237
|
+
const { dataUrl: _dataUrl, ...summary } = source && typeof source === "object" ? source : {};
|
|
238
|
+
try {
|
|
239
|
+
if (!path && typeof source?.dataUrl === "string") {
|
|
240
|
+
const match = /^data:image\/(png|jpeg|webp|gif);base64,([\s\S]+)$/.exec(source.dataUrl);
|
|
241
|
+
if (!match) throw new Error("unsupported screenshot data URL");
|
|
242
|
+
const directory = await mkdtemp(join2(tmpdir(), "nolo-screenshot-"));
|
|
243
|
+
path = join2(directory, `screenshot.${match[1] === "jpeg" ? "jpg" : match[1]}`);
|
|
244
|
+
await writeFile(path, Buffer.from(match[2], "base64"));
|
|
245
|
+
}
|
|
246
|
+
if (!path) throw new Error("screenshot result has no savedTo or image data URL");
|
|
247
|
+
const image = await readLocalImage(path);
|
|
248
|
+
return {
|
|
249
|
+
content: `${JSON.stringify({ ok: true, result: { ...summary, savedTo: path } })}
|
|
250
|
+
${image.content.replace(/^\[image /, "[screenshot ")}`,
|
|
251
|
+
images: image.images
|
|
252
|
+
};
|
|
253
|
+
} catch (error) {
|
|
254
|
+
return {
|
|
255
|
+
content: `${JSON.stringify({ ok: true, result: { ...summary, ...path ? { savedTo: path } : {} } })}
|
|
256
|
+
${path ? `screenshot saved to ${path}
|
|
257
|
+
` : ""}Screenshot image not delivered (\u672A\u6295\u9012): ${toErrorMessage(error)}`
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// packages/desktop-chrome-connector/chromeConnector.ts
|
|
223
263
|
import { resolve as resolve2 } from "node:path";
|
|
224
264
|
var NOLO_CHROME_CONNECTOR_EXTENSION_ID = "ahpdoopadkamnglhlacfjdfnonpjdplg";
|
|
225
265
|
var NOLO_FIREFOX_CONNECTOR_EXTENSION_ID = "nolo-browser-connector@nolo.chat";
|
|
@@ -587,7 +627,7 @@ async function executeChromeConnectorTool(args) {
|
|
|
587
627
|
}) : args.client ?? createVerifiedChromeConnectorClient({ client: createChromeConnectorClient() }));
|
|
588
628
|
const result = await client.request(action, payload);
|
|
589
629
|
return {
|
|
590
|
-
content: JSON.stringify({ ok: true, result }),
|
|
630
|
+
...action === "screenshot" ? await screenshotResult(result) : { content: JSON.stringify({ ok: true, result }) },
|
|
591
631
|
metadata: {
|
|
592
632
|
chromeConnector: true,
|
|
593
633
|
action
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
clipMultilineText,
|
|
3
3
|
fetchAndSerializeTable,
|
|
4
4
|
waitForAbortableDelay
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-GXFAZGZ6.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-VETQRONK.js";
|
|
25
25
|
import {
|
|
26
26
|
createSpaceKey
|
|
27
27
|
} from "./chunk-UAD2WT54.js";
|