nolo-cli 0.74.0-alpha.2 → 0.75.0-alpha.2
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-YEVZAJYX.js → _executeModel-WEZ3PEQX.js} +10 -10
- package/agentDeleteCommand-WVO3JTH6.js +1 -1
- package/{agentEmailCommands-QYQ2DZUS.js → agentEmailCommands-63LDSFLY.js} +11 -10
- package/agentListCommands-XWLQZ2ZH.js +1 -1
- package/{agentMachineCommands-BJZUZ2EY.js → agentMachineCommands-NZ7GGXDI.js} +2 -2
- package/{agentRecordCommands-O6PYBK2A.js → agentRecordCommands-CVYIAAA7.js} +11 -10
- package/{agentRunCommand-POFC5W46.js → agentRunCommand-DTSXYOFC.js} +11 -10
- package/{agentSlice-RRZS2UII.js → agentSlice-J6B5FD5T.js} +1 -1
- package/appDeleteCommands-426QK2XG.js +1 -1
- package/appDeployCommands-FIGFGXIJ.js +1 -1
- package/appDeployStatusCommands-D3B235FQ.js +1 -1
- package/appGetCommands-U6RZJII4.js +1 -1
- package/appListCommands-732PFEWM.js +1 -1
- package/{chatQueueReduxAdapter-LSBTGZW2.js → chatQueueReduxAdapter-7HTXKEAI.js} +2 -2
- package/chromeCommands-VOIRNJBL.js +499 -0
- package/chromeOpsCommands-M7DPCX2T.js +258 -0
- package/{chunk-TI4CCL34.js → chunk-2BA5B35E.js} +3 -3
- package/{chunk-I4UWPYBH.js → chunk-3WR7AKML.js} +2 -2
- package/{chunk-SJTCDYBY.js → chunk-6ULAXDTC.js} +5 -5
- package/{chunk-VOEW2KF3.js → chunk-6VHEHZ3O.js} +8 -8
- package/{chunk-XPQJXIF5.js → chunk-73Z4HXBB.js} +43 -4
- package/{chunk-CS36XM4N.js → chunk-7SM7OIAA.js} +3 -3
- package/{chunk-HSELVGAL.js → chunk-CB4TPLND.js} +1 -1
- package/{chunk-DFY6PUV4.js → chunk-DORA6JDU.js} +5 -5
- package/{chunk-2JCTE5UN.js → chunk-ESNV5ZH6.js} +2 -2
- package/{chunk-AWPU7GXU.js → chunk-GKCVKZMJ.js} +2 -2
- package/{chunk-VE3O45CJ.js → chunk-IHHZ5QIT.js} +2 -2
- package/{chunk-QBA5KMJI.js → chunk-KTCEAOB7.js} +22 -8
- package/{chunk-57VRXRLF.js → chunk-OCIRWOJN.js} +1 -1
- package/chunk-QCZX4FTW.js +242 -0
- package/{chunk-XGZM6BTX.js → chunk-X4J6SLM7.js} +59 -119
- package/{contentThunks-476Y6CFR.js → contentThunks-YTGI4QHN.js} +3 -3
- package/{createAgentAutomationAction-DN4SFTP5.js → createAgentAutomationAction-NKJB4ZUJ.js} +3 -3
- package/{createDialogAction-2GS4JCMU.js → createDialogAction-46TNX2KI.js} +4 -4
- package/{createPageAction-44WTUMZ5.js → createPageAction-XKCTX2L5.js} +3 -3
- package/dialogCommands-7FH6Z2YK.js +1 -1
- package/{dialogSlice-7HEVCJFT.js → dialogSlice-IA4AYIZT.js} +2 -2
- package/docCreateCommands-GN5E5ULM.js +1 -1
- package/docDeleteCommands-OQWPPQME.js +1 -1
- package/docReadCommands-E4QK2223.js +1 -1
- package/{docStore-LJ7KNKFB.js → docStore-BTPXEBOF.js} +1 -1
- package/docUpdateCommands-ZDJE4SI7.js +1 -1
- package/{handleSendMessageAction-ETA5QZIN.js → handleSendMessageAction-EVLVKKX5.js} +2 -2
- package/index.js +75 -15
- package/{machineCommands-SJLMLCCV.js → machineCommands-6IEXOQSE.js} +11 -10
- package/{machineWsRunDispatch-74GHVCNY.js → machineWsRunDispatch-Y6X7MZZT.js} +11 -10
- package/package.json +1 -1
- package/{readlineWorkspace-XHS5C5F7.js → readlineWorkspace-XKMEZZ5A.js} +11 -10
- package/{runAgentClientLoop-2PGZSCET.js → runAgentClientLoop-3XIXREHM.js} +8 -8
- package/spaceCommands-GSQCO2LI.js +1 -1
- package/{streamAgentChatTurn-I6FUM6RV.js → streamAgentChatTurn-J27A54UC.js} +9 -9
- package/{tools-KU4X5HGZ.js → tools-CZTAI4BF.js} +6 -6
- package/{updateDialogTitleAction-E3SNB75W.js → updateDialogTitleAction-QUU6G7SD.js} +3 -3
- package/{agentRuntimeLocal-O6DZDTK4.js → agentRuntimeLocal-ZSUEMWRL.js} +1 -1
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createChromeConnectorClient
|
|
3
|
+
} from "./chunk-QCZX4FTW.js";
|
|
4
|
+
import {
|
|
5
|
+
toErrorMessage
|
|
6
|
+
} from "./chunk-HNMXYYJR.js";
|
|
7
|
+
import {
|
|
8
|
+
readOption
|
|
9
|
+
} from "./chunk-A7GB5UGH.js";
|
|
10
|
+
import "./chunk-OLZBQWZU.js";
|
|
11
|
+
import "./chunk-KUG52IAP.js";
|
|
12
|
+
import "./chunk-LCBAMY2M.js";
|
|
13
|
+
import "./chunk-4SN6J65J.js";
|
|
14
|
+
import "./chunk-CF7PE763.js";
|
|
15
|
+
import "./chunk-G3SUCT4W.js";
|
|
16
|
+
import "./chunk-4VNS5WPM.js";
|
|
17
|
+
|
|
18
|
+
// packages/cli/chromeOpsCommands.ts
|
|
19
|
+
import { writeFile } from "node:fs/promises";
|
|
20
|
+
function wantsHelp(args) {
|
|
21
|
+
return args.includes("--help") || args.includes("-h");
|
|
22
|
+
}
|
|
23
|
+
function readTrimmedOption(args, flag) {
|
|
24
|
+
return (readOption(args, flag) ?? "").trim();
|
|
25
|
+
}
|
|
26
|
+
function readIntOption(args, flag, usage) {
|
|
27
|
+
const raw = readOption(args, flag);
|
|
28
|
+
if (raw === void 0) return void 0;
|
|
29
|
+
const value = Number.parseInt(raw, 10);
|
|
30
|
+
if (!Number.isFinite(value)) {
|
|
31
|
+
throw new Error(`Invalid ${flag} <N>. Usage: ${usage}`);
|
|
32
|
+
}
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
function requireTabId(args, usage) {
|
|
36
|
+
const tabId = readTrimmedOption(args, "--tab");
|
|
37
|
+
if (!tabId) {
|
|
38
|
+
throw new Error(`Missing required --tab <id>. Usage: ${usage}`);
|
|
39
|
+
}
|
|
40
|
+
return tabId;
|
|
41
|
+
}
|
|
42
|
+
function requireTarget(args, usage) {
|
|
43
|
+
const elementRef = readTrimmedOption(args, "--ref");
|
|
44
|
+
const selector = readTrimmedOption(args, "--selector");
|
|
45
|
+
if (!elementRef && !selector) {
|
|
46
|
+
throw new Error(
|
|
47
|
+
`Provide --ref <elementRef> (from read-page) or --selector <css>. Usage: ${usage}`
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
...elementRef ? { elementRef } : {},
|
|
52
|
+
...selector ? { selector } : {}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
var CHROME_OPS_SUBCOMMANDS = {
|
|
56
|
+
"list-tabs": {
|
|
57
|
+
action: "list_tabs",
|
|
58
|
+
usage: "nolo chrome list-tabs",
|
|
59
|
+
payload: () => ({})
|
|
60
|
+
},
|
|
61
|
+
"open-tab": {
|
|
62
|
+
action: "open_tab",
|
|
63
|
+
usage: "nolo chrome open-tab --url <url> [--active]",
|
|
64
|
+
payload: (args, usage) => {
|
|
65
|
+
const url = readTrimmedOption(args, "--url");
|
|
66
|
+
if (!url) {
|
|
67
|
+
throw new Error(`Missing required --url <url>. Usage: ${usage}`);
|
|
68
|
+
}
|
|
69
|
+
return { url, active: args.includes("--active") };
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"close-tab": {
|
|
73
|
+
action: "close_tab",
|
|
74
|
+
usage: "nolo chrome close-tab --tab <id>",
|
|
75
|
+
payload: (args, usage) => ({ tabId: requireTabId(args, usage) })
|
|
76
|
+
},
|
|
77
|
+
"read-page": {
|
|
78
|
+
action: "read_page",
|
|
79
|
+
usage: "nolo chrome read-page --tab <id> [--selector <css>] [--detail compact|full] [--max-elements N]",
|
|
80
|
+
payload: (args, usage) => {
|
|
81
|
+
const payload = { tabId: requireTabId(args, usage) };
|
|
82
|
+
const selector = readTrimmedOption(args, "--selector");
|
|
83
|
+
if (selector) payload.selector = selector;
|
|
84
|
+
const detail = readTrimmedOption(args, "--detail");
|
|
85
|
+
if (detail) payload.detail = detail;
|
|
86
|
+
const maxElements = readIntOption(args, "--max-elements", usage);
|
|
87
|
+
if (maxElements !== void 0) payload.maxElements = maxElements;
|
|
88
|
+
return payload;
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
click: {
|
|
92
|
+
action: "click",
|
|
93
|
+
usage: "nolo chrome click --tab <id> (--ref <elementRef> | --selector <css>)",
|
|
94
|
+
payload: (args, usage) => ({
|
|
95
|
+
tabId: requireTabId(args, usage),
|
|
96
|
+
...requireTarget(args, usage)
|
|
97
|
+
})
|
|
98
|
+
},
|
|
99
|
+
type: {
|
|
100
|
+
action: "type",
|
|
101
|
+
usage: "nolo chrome type --tab <id> (--ref <elementRef> | --selector <css>) --text <text> [--append]",
|
|
102
|
+
payload: (args, usage) => {
|
|
103
|
+
const text = readOption(args, "--text");
|
|
104
|
+
if (text === void 0 || text.startsWith("--")) {
|
|
105
|
+
throw new Error(`Missing required --text <text>. Usage: ${usage}`);
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
tabId: requireTabId(args, usage),
|
|
109
|
+
...requireTarget(args, usage),
|
|
110
|
+
text,
|
|
111
|
+
...args.includes("--append") ? { clearFirst: false } : {}
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
press: {
|
|
116
|
+
action: "press",
|
|
117
|
+
usage: "nolo chrome press --tab <id> --key <key>",
|
|
118
|
+
payload: (args, usage) => {
|
|
119
|
+
const key = readTrimmedOption(args, "--key");
|
|
120
|
+
if (!key) {
|
|
121
|
+
throw new Error(`Missing required --key <key>. Usage: ${usage}`);
|
|
122
|
+
}
|
|
123
|
+
return { tabId: requireTabId(args, usage), key };
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
scroll: {
|
|
127
|
+
action: "scroll",
|
|
128
|
+
usage: "nolo chrome scroll --tab <id> [--delta-x N] [--delta-y N]",
|
|
129
|
+
payload: (args, usage) => {
|
|
130
|
+
const payload = { tabId: requireTabId(args, usage) };
|
|
131
|
+
const deltaX = readIntOption(args, "--delta-x", usage);
|
|
132
|
+
const deltaY = readIntOption(args, "--delta-y", usage);
|
|
133
|
+
if (deltaX !== void 0) payload.deltaX = deltaX;
|
|
134
|
+
if (deltaY !== void 0) payload.deltaY = deltaY;
|
|
135
|
+
return payload;
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
screenshot: {
|
|
139
|
+
action: "screenshot",
|
|
140
|
+
usage: "nolo chrome screenshot --tab <id> [--out <path>] [--full-page]",
|
|
141
|
+
payload: (args, usage) => ({
|
|
142
|
+
tabId: requireTabId(args, usage),
|
|
143
|
+
...args.includes("--full-page") ? { fullPage: true } : {}
|
|
144
|
+
})
|
|
145
|
+
},
|
|
146
|
+
"read-console": {
|
|
147
|
+
action: "read_console",
|
|
148
|
+
usage: "nolo chrome read-console --tab <id> [--limit N]",
|
|
149
|
+
payload: (args, usage) => {
|
|
150
|
+
const payload = { tabId: requireTabId(args, usage) };
|
|
151
|
+
const limit = readIntOption(args, "--limit", usage);
|
|
152
|
+
if (limit !== void 0) payload.limit = limit;
|
|
153
|
+
return payload;
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"read-network": {
|
|
157
|
+
action: "read_network",
|
|
158
|
+
usage: "nolo chrome read-network --tab <id> [--limit N] [--include-assets]",
|
|
159
|
+
payload: (args, usage) => {
|
|
160
|
+
const payload = { tabId: requireTabId(args, usage) };
|
|
161
|
+
const limit = readIntOption(args, "--limit", usage);
|
|
162
|
+
if (limit !== void 0) payload.limit = limit;
|
|
163
|
+
if (args.includes("--include-assets")) payload.includeAssets = true;
|
|
164
|
+
return payload;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
function renderChromeOpsHelp() {
|
|
169
|
+
const lines = [
|
|
170
|
+
"Operate the user's Chrome through the Nolo Chrome connector (the desktop bridge;",
|
|
171
|
+
"the same RPC the chrome_* agent tools use).",
|
|
172
|
+
"",
|
|
173
|
+
"Usage:",
|
|
174
|
+
" nolo chrome <subcommand> [flags]",
|
|
175
|
+
"",
|
|
176
|
+
"Subcommands:",
|
|
177
|
+
...Object.values(CHROME_OPS_SUBCOMMANDS).map(
|
|
178
|
+
(spec) => ` ${spec.usage.replace(/^nolo chrome /, "")}`
|
|
179
|
+
),
|
|
180
|
+
"",
|
|
181
|
+
"Notes:",
|
|
182
|
+
" --ref takes an elementRef copied from `nolo chrome read-page` (revision-scoped,",
|
|
183
|
+
" preferred over --selector); --selector takes a CSS selector.",
|
|
184
|
+
" Actions the connector classifies as irreversible (Submit / Delete / Pay ...)",
|
|
185
|
+
" are refused with CONFIRMATION_REQUIRED \u2014 ask the user to perform them.",
|
|
186
|
+
" Every subcommand prints the connector's raw JSON result; failures exit 1.",
|
|
187
|
+
" Endpoint: NOLO_CHROME_CONNECTOR_RPC_URL or http://127.0.0.1:38947/rpc."
|
|
188
|
+
];
|
|
189
|
+
return lines.join("\n");
|
|
190
|
+
}
|
|
191
|
+
var CHROME_OPS_HELP_TEXT = renderChromeOpsHelp();
|
|
192
|
+
async function runChromeOpsCommand(subcommand, args, deps = {}) {
|
|
193
|
+
const io = {
|
|
194
|
+
stdout: (text) => console.log(text),
|
|
195
|
+
stderr: (text) => console.error(text),
|
|
196
|
+
...deps.io
|
|
197
|
+
};
|
|
198
|
+
const spec = CHROME_OPS_SUBCOMMANDS[subcommand];
|
|
199
|
+
if (!spec) {
|
|
200
|
+
io.stderr(`Unknown chrome subcommand: ${subcommand}
|
|
201
|
+
|
|
202
|
+
${CHROME_OPS_HELP_TEXT}`);
|
|
203
|
+
return 1;
|
|
204
|
+
}
|
|
205
|
+
if (wantsHelp(args)) {
|
|
206
|
+
io.stdout(CHROME_OPS_HELP_TEXT);
|
|
207
|
+
return 0;
|
|
208
|
+
}
|
|
209
|
+
let payload;
|
|
210
|
+
try {
|
|
211
|
+
payload = spec.payload(args, spec.usage);
|
|
212
|
+
} catch (error) {
|
|
213
|
+
io.stderr(toErrorMessage(error));
|
|
214
|
+
return 1;
|
|
215
|
+
}
|
|
216
|
+
let result;
|
|
217
|
+
try {
|
|
218
|
+
const client = deps.client ?? createChromeConnectorClient();
|
|
219
|
+
result = await client.request(spec.action, payload);
|
|
220
|
+
} catch (error) {
|
|
221
|
+
const code = typeof error?.code === "string" ? error.code : "CHROME_COMMAND_FAILED";
|
|
222
|
+
io.stderr(JSON.stringify({ ok: false, error: { code, message: toErrorMessage(error) } }, null, 2));
|
|
223
|
+
return 1;
|
|
224
|
+
}
|
|
225
|
+
if (subcommand === "screenshot") {
|
|
226
|
+
const out = readTrimmedOption(args, "--out");
|
|
227
|
+
const dataUrl = result?.dataUrl;
|
|
228
|
+
if (out && typeof dataUrl === "string") {
|
|
229
|
+
const base64 = dataUrl.includes(",") ? dataUrl.slice(dataUrl.indexOf(",") + 1) : dataUrl;
|
|
230
|
+
const bytes = Buffer.from(base64, "base64");
|
|
231
|
+
try {
|
|
232
|
+
await writeFile(out, bytes);
|
|
233
|
+
} catch (error) {
|
|
234
|
+
io.stderr(
|
|
235
|
+
JSON.stringify(
|
|
236
|
+
{
|
|
237
|
+
ok: false,
|
|
238
|
+
error: { code: "SCREENSHOT_WRITE_FAILED", message: toErrorMessage(error) }
|
|
239
|
+
},
|
|
240
|
+
null,
|
|
241
|
+
2
|
|
242
|
+
)
|
|
243
|
+
);
|
|
244
|
+
return 1;
|
|
245
|
+
}
|
|
246
|
+
io.stdout(JSON.stringify({ ok: true, result: { savedTo: out, bytes: bytes.byteLength } }, null, 2));
|
|
247
|
+
return 0;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
io.stdout(JSON.stringify({ ok: true, result }, null, 2));
|
|
251
|
+
return 0;
|
|
252
|
+
}
|
|
253
|
+
export {
|
|
254
|
+
CHROME_OPS_HELP_TEXT,
|
|
255
|
+
CHROME_OPS_SUBCOMMANDS,
|
|
256
|
+
renderChromeOpsHelp,
|
|
257
|
+
runChromeOpsCommand
|
|
258
|
+
};
|
|
@@ -304,7 +304,7 @@ var slice = createSliceWithThunks({
|
|
|
304
304
|
const overrides = {};
|
|
305
305
|
if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
|
|
306
306
|
if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
|
|
307
|
-
const { _executeModel } = await import("./_executeModel-
|
|
307
|
+
const { _executeModel } = await import("./_executeModel-WEZ3PEQX.js");
|
|
308
308
|
return _executeModel(
|
|
309
309
|
{
|
|
310
310
|
isStreaming: args.isStreaming ?? false,
|
|
@@ -325,7 +325,7 @@ var slice = createSliceWithThunks({
|
|
|
325
325
|
* - 循环直到无工具调用或触发其他运行时停止条件
|
|
326
326
|
*/
|
|
327
327
|
runAgent: create.asyncThunk(async (args, thunkApi) => {
|
|
328
|
-
const { runAgentClientLoop } = await import("./runAgentClientLoop-
|
|
328
|
+
const { runAgentClientLoop } = await import("./runAgentClientLoop-3XIXREHM.js");
|
|
329
329
|
const { content: loopContent, toolCallCount } = await runAgentClientLoop(
|
|
330
330
|
{
|
|
331
331
|
agentKey: args.agentKey,
|
|
@@ -341,7 +341,7 @@ var slice = createSliceWithThunks({
|
|
|
341
341
|
* 聊天轮次流式 Agent 调用
|
|
342
342
|
*/
|
|
343
343
|
streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
|
|
344
|
-
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-
|
|
344
|
+
const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-J27A54UC.js");
|
|
345
345
|
return streamAgentChatTurnHandler(args, thunkApi);
|
|
346
346
|
}),
|
|
347
347
|
/**
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
resolveLocalUserId,
|
|
28
28
|
t,
|
|
29
29
|
toolLabel
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-73Z4HXBB.js";
|
|
31
31
|
import {
|
|
32
32
|
createRunActivityTracker,
|
|
33
33
|
popSingleQueueMessage,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
} from "./chunk-LTRXGFMS.js";
|
|
64
64
|
import {
|
|
65
65
|
formatAgentListCard
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-KTCEAOB7.js";
|
|
67
67
|
import {
|
|
68
68
|
isTransientFetchError
|
|
69
69
|
} from "./chunk-5XTOKQLW.js";
|
|
@@ -84,11 +84,11 @@ import {
|
|
|
84
84
|
chooseMemoryOwners,
|
|
85
85
|
loadMemoryCandidatesFromDb,
|
|
86
86
|
resolveAgentMemoryPolicy
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-ESNV5ZH6.js";
|
|
88
88
|
import {
|
|
89
89
|
API_REPORTED_COST_MULTIPLIER,
|
|
90
90
|
parseUiAskChoiceContent
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-6VHEHZ3O.js";
|
|
92
92
|
import {
|
|
93
93
|
isOAuthApiKeyRef
|
|
94
94
|
} from "./chunk-YYLHWIW6.js";
|
|
@@ -10407,7 +10407,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
|
|
|
10407
10407
|
// packages/cli/client/agentRun.ts
|
|
10408
10408
|
import { ulid } from "ulid";
|
|
10409
10409
|
async function loadRunLocalAgentTurn() {
|
|
10410
|
-
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-
|
|
10410
|
+
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-ZSUEMWRL.js");
|
|
10411
10411
|
return runLocalAgentTurn;
|
|
10412
10412
|
}
|
|
10413
10413
|
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();
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-AGGIDPCZ.js";
|
|
14
14
|
import {
|
|
15
15
|
runLlm
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2BA5B35E.js";
|
|
17
17
|
import {
|
|
18
18
|
cleanupCliSessionForDialog
|
|
19
19
|
} from "./chunk-BJCWNHVU.js";
|
|
@@ -17122,7 +17122,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
17122
17122
|
runtimeOptions: args.runtimeOptions
|
|
17123
17123
|
});
|
|
17124
17124
|
if (agentKeyToUse) {
|
|
17125
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
17125
|
+
const { streamAgentChatTurn } = await import("./agentSlice-J6B5FD5T.js");
|
|
17126
17126
|
await dispatch(
|
|
17127
17127
|
streamAgentChatTurn({
|
|
17128
17128
|
agentKey: agentKeyToUse,
|
|
@@ -18255,7 +18255,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
18255
18255
|
}
|
|
18256
18256
|
if (isCurrentDialog) {
|
|
18257
18257
|
await thunkApi.dispatch(resetMsgs());
|
|
18258
|
-
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-
|
|
18258
|
+
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-IA4AYIZT.js");
|
|
18259
18259
|
dispatch(clearPendingAttachments2());
|
|
18260
18260
|
}
|
|
18261
18261
|
return { dialogKey, isCurrentDialog, attachmentPlan };
|
|
@@ -18263,15 +18263,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
18263
18263
|
|
|
18264
18264
|
// packages/chat/dialog/dialogSlice.ts
|
|
18265
18265
|
var runCreateDialogAction = async (args, thunkApi) => {
|
|
18266
|
-
const { createDialogAction } = await import("./createDialogAction-
|
|
18266
|
+
const { createDialogAction } = await import("./createDialogAction-46TNX2KI.js");
|
|
18267
18267
|
return createDialogAction(args, thunkApi);
|
|
18268
18268
|
};
|
|
18269
18269
|
var runCreateAgentAutomationAction = async (args, thunkApi) => {
|
|
18270
|
-
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-
|
|
18270
|
+
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-NKJB4ZUJ.js");
|
|
18271
18271
|
return createAgentAutomationAction(args, thunkApi);
|
|
18272
18272
|
};
|
|
18273
18273
|
var runUpdateDialogTitleAction = async (args, thunkApi) => {
|
|
18274
|
-
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-
|
|
18274
|
+
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-QUU6G7SD.js");
|
|
18275
18275
|
return updateDialogTitleAction(args, thunkApi);
|
|
18276
18276
|
};
|
|
18277
18277
|
var runAddDialogAgentAction = async (args, thunkApi) => {
|
|
@@ -18295,7 +18295,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
|
|
|
18295
18295
|
return setDialogExtraReferencesAction(args, thunkApi);
|
|
18296
18296
|
};
|
|
18297
18297
|
var runHandleSendMessageAction = async (args, thunkApi) => {
|
|
18298
|
-
const { handleSendMessageAction } = await import("./handleSendMessageAction-
|
|
18298
|
+
const { handleSendMessageAction } = await import("./handleSendMessageAction-EVLVKKX5.js");
|
|
18299
18299
|
return handleSendMessageAction(args, thunkApi);
|
|
18300
18300
|
};
|
|
18301
18301
|
function clearDialogState() {
|
|
@@ -18308,7 +18308,7 @@ var createPageAndAddReference = createAsyncThunk(
|
|
|
18308
18308
|
async (payload, { dispatch, getState, rejectWithValue }) => {
|
|
18309
18309
|
const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
|
|
18310
18310
|
try {
|
|
18311
|
-
const { createDocState } = await import("./docStore-
|
|
18311
|
+
const { createDocState } = await import("./docStore-BTPXEBOF.js");
|
|
18312
18312
|
const pageKey = await createDocState(
|
|
18313
18313
|
{ slateData, title },
|
|
18314
18314
|
{ dispatch, getState }
|
|
@@ -5,6 +5,11 @@ import {
|
|
|
5
5
|
refreshOpenAiCodexToken,
|
|
6
6
|
xaiRefresh
|
|
7
7
|
} from "./chunk-GBPZKFYK.js";
|
|
8
|
+
import {
|
|
9
|
+
createChromeConnectorClient,
|
|
10
|
+
createVerifiedChromeConnectorClient,
|
|
11
|
+
executeChromeConnectorTool
|
|
12
|
+
} from "./chunk-QCZX4FTW.js";
|
|
8
13
|
import {
|
|
9
14
|
defaultLoopbackRequest
|
|
10
15
|
} from "./chunk-EADNWBAZ.js";
|
|
@@ -55,11 +60,12 @@ import {
|
|
|
55
60
|
import {
|
|
56
61
|
inlineImageUrlsForCustomProvider,
|
|
57
62
|
prepareTools
|
|
58
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-3WR7AKML.js";
|
|
59
64
|
import {
|
|
60
65
|
getServerProviderSecret
|
|
61
66
|
} from "./chunk-HS7MLR74.js";
|
|
62
67
|
import {
|
|
68
|
+
CHROME_CONNECTOR_TOOL_NAMES,
|
|
63
69
|
CONTROL_AGENT_RUN_ACTIONS,
|
|
64
70
|
buildControlAgentRunFunctionSchema,
|
|
65
71
|
buildStartAgentRunFunctionSchema,
|
|
@@ -72,7 +78,7 @@ import {
|
|
|
72
78
|
rememberMemoryFunctionSchema,
|
|
73
79
|
resolveAgentRequiredPackIds,
|
|
74
80
|
setTodoListFunc
|
|
75
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-KTCEAOB7.js";
|
|
76
82
|
import {
|
|
77
83
|
fetchWithTransientRetry,
|
|
78
84
|
isTransientFetchError
|
|
@@ -95,13 +101,13 @@ import {
|
|
|
95
101
|
prepareTokenUsageData,
|
|
96
102
|
resolveBuiltinPlatformAgentConfig,
|
|
97
103
|
runKeyed
|
|
98
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-6VHEHZ3O.js";
|
|
99
105
|
import {
|
|
100
106
|
BUILTIN_TITLE_LLM_CONFIG
|
|
101
107
|
} from "./chunk-EVBFYPDC.js";
|
|
102
108
|
import {
|
|
103
109
|
fetchServerSyncedCredential
|
|
104
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-2BA5B35E.js";
|
|
105
111
|
import {
|
|
106
112
|
require_date_fns
|
|
107
113
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -1672,6 +1678,17 @@ var LOCAL_SERVER_MEMORY_TOOL_NAME_SET = new Set(
|
|
|
1672
1678
|
);
|
|
1673
1679
|
|
|
1674
1680
|
// packages/cli/client/localRuntimeTools.ts
|
|
1681
|
+
var CLI_CHROME_CONNECTOR_TOOL_NAME_SET = new Set(
|
|
1682
|
+
CHROME_CONNECTOR_TOOL_NAMES
|
|
1683
|
+
);
|
|
1684
|
+
function filterCliChromeConnectorToolNames(toolNames) {
|
|
1685
|
+
return (toolNames ?? []).filter(
|
|
1686
|
+
(name) => CLI_CHROME_CONNECTOR_TOOL_NAME_SET.has(name)
|
|
1687
|
+
);
|
|
1688
|
+
}
|
|
1689
|
+
function buildCliChromeConnectorOpenAiTools(args) {
|
|
1690
|
+
return prepareTools(filterCliChromeConnectorToolNames(args.toolNames));
|
|
1691
|
+
}
|
|
1675
1692
|
function buildOpenAiTools(args) {
|
|
1676
1693
|
const toolset = buildLocalWorkspaceToolsetForEnv(args);
|
|
1677
1694
|
const workspaceToolNames = toolset.toolNames;
|
|
@@ -1719,6 +1736,7 @@ function buildOpenAiTools(args) {
|
|
|
1719
1736
|
toolNames: args.effectiveToolNames ?? workspaceToolNames,
|
|
1720
1737
|
exposeShellTools: toolset.exposeShellTools
|
|
1721
1738
|
}),
|
|
1739
|
+
...buildCliChromeConnectorOpenAiTools({ toolNames: args.toolNames }),
|
|
1722
1740
|
...buildServerPlatformOpenAiTools({ toolNames: args.toolNames }),
|
|
1723
1741
|
...buildNoloWorkspaceOpenAiTools({ toolNames: args.toolNames }),
|
|
1724
1742
|
...buildOrchestrationOpenAiTools({
|
|
@@ -11317,6 +11335,19 @@ function createCliControlAgentRunExecutor(deps = {}) {
|
|
|
11317
11335
|
};
|
|
11318
11336
|
}
|
|
11319
11337
|
|
|
11338
|
+
// packages/cli/client/cliChromeConnectorToolExecutors.ts
|
|
11339
|
+
function buildCliChromeConnectorToolExecutors(args) {
|
|
11340
|
+
const client = createVerifiedChromeConnectorClient({
|
|
11341
|
+
client: args?.client ?? createChromeConnectorClient()
|
|
11342
|
+
});
|
|
11343
|
+
return Object.fromEntries(
|
|
11344
|
+
CHROME_CONNECTOR_TOOL_NAMES.map((toolName) => [
|
|
11345
|
+
toolName,
|
|
11346
|
+
(call) => executeChromeConnectorTool({ client, call })
|
|
11347
|
+
])
|
|
11348
|
+
);
|
|
11349
|
+
}
|
|
11350
|
+
|
|
11320
11351
|
// packages/cli/client/cliLocalToolExecutors.ts
|
|
11321
11352
|
var MAX_PASTED_TEXT_LINES_PER_READ = 200;
|
|
11322
11353
|
var PASTED_TEXT_EXPLICIT_OVERSHOOT_LINES = 20;
|
|
@@ -11603,6 +11634,12 @@ function buildLocalToolExecutors(args) {
|
|
|
11603
11634
|
};
|
|
11604
11635
|
},
|
|
11605
11636
|
...args.pastedTextStore ? { readPastedText: createReadPastedTextExecutor(args.pastedTextStore) } : {},
|
|
11637
|
+
// Nolo Browser Connector: the CLI drives the user's real Chrome through the same verified
|
|
11638
|
+
// client + executor as the desktop runtime (before this, every chrome_* call answered
|
|
11639
|
+
// "only executable in the Nolo desktop local runtime").
|
|
11640
|
+
...buildCliChromeConnectorToolExecutors(
|
|
11641
|
+
args.chromeConnectorClient ? { client: args.chromeConnectorClient } : {}
|
|
11642
|
+
),
|
|
11606
11643
|
...args.localToolExecutors ?? {}
|
|
11607
11644
|
};
|
|
11608
11645
|
}
|
|
@@ -12435,6 +12472,7 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12435
12472
|
workspaceRoot,
|
|
12436
12473
|
env: deps.env,
|
|
12437
12474
|
fetchImpl,
|
|
12475
|
+
...deps.chromeConnectorClient ? { chromeConnectorClient: deps.chromeConnectorClient } : {},
|
|
12438
12476
|
localToolExecutors: deps.localToolExecutors,
|
|
12439
12477
|
readXPost: deps.readXPost,
|
|
12440
12478
|
readXhsProfile: deps.readXhsProfile,
|
|
@@ -12511,6 +12549,7 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
12511
12549
|
workspaceRoot,
|
|
12512
12550
|
env: deps.env,
|
|
12513
12551
|
fetchImpl,
|
|
12552
|
+
...deps.chromeConnectorClient ? { chromeConnectorClient: deps.chromeConnectorClient } : {},
|
|
12514
12553
|
localToolExecutors: deps.localToolExecutors,
|
|
12515
12554
|
readXPost: deps.readXPost,
|
|
12516
12555
|
readXhsProfile: deps.readXhsProfile,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
clipMultilineText,
|
|
9
9
|
fetchAndSerializeTable,
|
|
10
10
|
resolveBuiltinSkillPage
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KTCEAOB7.js";
|
|
12
12
|
import {
|
|
13
13
|
isGatewayHttpStatus
|
|
14
14
|
} from "./chunk-NF64D32W.js";
|
|
@@ -29,13 +29,13 @@ import {
|
|
|
29
29
|
} from "./chunk-MEYIRKDN.js";
|
|
30
30
|
import {
|
|
31
31
|
fetchAndCacheMessages
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-6VHEHZ3O.js";
|
|
33
33
|
import {
|
|
34
34
|
shouldUseServerProxy
|
|
35
35
|
} from "./chunk-YYLHWIW6.js";
|
|
36
36
|
import {
|
|
37
37
|
fetchServerSyncedCredential
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-2BA5B35E.js";
|
|
39
39
|
import {
|
|
40
40
|
buildSkillGuidancePromptBlock,
|
|
41
41
|
extractRuntimePageCapabilities,
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3WR7AKML.js";
|
|
9
9
|
import {
|
|
10
10
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
11
11
|
buildInvalidToolCallSelfHealResult,
|
|
12
12
|
parseToolCallArguments,
|
|
13
13
|
performFetchRequest,
|
|
14
14
|
sanitizeOutboundMessages
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7SM7OIAA.js";
|
|
16
16
|
import {
|
|
17
17
|
createSSEParser,
|
|
18
18
|
createToolRunId,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
toolRunSetPending,
|
|
24
24
|
toolRunStarted,
|
|
25
25
|
toolRunSucceeded
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-KTCEAOB7.js";
|
|
27
27
|
import {
|
|
28
28
|
getPublicImageAgentMode
|
|
29
29
|
} from "./chunk-VIDPVFP3.js";
|
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
messageStreamEnd,
|
|
36
36
|
messageStreaming,
|
|
37
37
|
updateToolMessage
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-6VHEHZ3O.js";
|
|
39
39
|
import {
|
|
40
40
|
streamAgentChatTurn
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-2BA5B35E.js";
|
|
42
42
|
import {
|
|
43
43
|
addActiveController,
|
|
44
44
|
removeActiveController,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X4J6SLM7.js";
|
|
4
4
|
import {
|
|
5
5
|
prepareAndPersistMessage,
|
|
6
6
|
uiAskChoiceFunc,
|
|
7
7
|
uiAskChoiceFunctionSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6VHEHZ3O.js";
|
|
9
9
|
import {
|
|
10
10
|
require_date_fns
|
|
11
11
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -326,7 +326,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
326
326
|
).unwrap();
|
|
327
327
|
if (dbSpaceId) {
|
|
328
328
|
try {
|
|
329
|
-
const { updateContentTitle } = await import("./contentThunks-
|
|
329
|
+
const { updateContentTitle } = await import("./contentThunks-YTGI4QHN.js");
|
|
330
330
|
await dispatch(
|
|
331
331
|
updateContentTitle({
|
|
332
332
|
spaceId: dbSpaceId,
|
|
@@ -365,7 +365,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
async function createDocState(args, thunkApi) {
|
|
368
|
-
const { createPageAction } = await import("./createPageAction-
|
|
368
|
+
const { createPageAction } = await import("./createPageAction-XKCTX2L5.js");
|
|
369
369
|
return createPageAction(args, thunkApi);
|
|
370
370
|
}
|
|
371
371
|
function subscribe(listener) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-73Z4HXBB.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KTCEAOB7.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
10
|
} from "./chunk-CJ23A7U4.js";
|