nolo-cli 0.146.0-alpha.5 → 0.147.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-PSFK7JFS.js → _executeModel-3OCR5R5P.js} +12 -12
- package/{agentEmailCommands-4IDFCQL5.js → agentEmailCommands-OAPYGNYC.js} +10 -10
- package/{agentMachineCommands-IGC4R5M3.js → agentMachineCommands-OWLOV5WO.js} +1 -1
- package/{agentRecordCommands-TIWPKZ3T.js → agentRecordCommands-BW7HM6VH.js} +10 -10
- package/{agentRunCommand-LWNLMKAC.js → agentRunCommand-O2F3NU2H.js} +10 -10
- package/{agentSlice-ZTFKNEHJ.js → agentSlice-ZOCKW66S.js} +1 -1
- package/{chatQueueReduxAdapter-PIK5M2U6.js → chatQueueReduxAdapter-DFZ6QB4K.js} +2 -2
- package/{chunk-LFD2V36M.js → chunk-27VHPPII.js} +1 -1
- package/{chunk-N6MHJ3VG.js → chunk-2B74TU77.js} +2 -2
- package/{chunk-4CWJSCX5.js → chunk-36HTQWBD.js} +2 -2
- package/{chunk-IOPSD2SG.js → chunk-BCJPO6SE.js} +4 -4
- package/{chunk-CEXP7INN.js → chunk-BFLSOVHN.js} +7 -5
- package/{chunk-GOMR6S5Z.js → chunk-BJ3KD73I.js} +72 -0
- package/{chunk-6OTOA5MH.js → chunk-JK5XW3NO.js} +1 -1
- package/{chunk-YOJHATGG.js → chunk-JORF7I7F.js} +1 -1
- package/{chunk-TITGPUWJ.js → chunk-JQ4LUB5I.js} +1 -1
- package/{chunk-2BAC5FZX.js → chunk-KRC6GI2Q.js} +2 -2
- package/{chunk-6XNOGDTR.js → chunk-LQ6P2MFG.js} +6 -6
- package/{chunk-2T4P3OTH.js → chunk-NU4DCNMR.js} +4 -4
- package/{chunk-FV6LUB6R.js → chunk-OXGHM2WW.js} +11 -75
- package/{chunk-C5CV4CLU.js → chunk-P4CRULYJ.js} +2 -2
- package/{chunk-O4RO527J.js → chunk-PZ3HKBET.js} +28 -16
- package/{chunk-5MCQDAD6.js → chunk-UC3Q7X3J.js} +3 -3
- package/{chunk-PWOXYPE6.js → chunk-YYKMFBK7.js} +112 -0
- package/{commandRegistry-JY2L75RT.js → commandRegistry-OPVCVVOQ.js} +14 -14
- package/{contentThunks-A3O35EO3.js → contentThunks-IWXWFN6P.js} +3 -3
- package/{createAgentAutomationAction-3WQROJFS.js → createAgentAutomationAction-ROWX5ZPK.js} +3 -3
- package/{createDialogAction-27LGAZTE.js → createDialogAction-WLVAITHA.js} +4 -4
- package/{createPageAction-FEOA765U.js → createPageAction-DAJL6GES.js} +3 -3
- package/{dialogSlice-HA7LO4KI.js → dialogSlice-WW75BKLO.js} +2 -2
- package/{docStore-5ZEQSBCJ.js → docStore-2SADZYLX.js} +1 -1
- package/{handleSendMessageAction-L773P53D.js → handleSendMessageAction-2M57WHLO.js} +136 -79
- package/index.js +2 -2
- package/{machineCommands-3PAJ3N4U.js → machineCommands-7JUTOZP2.js} +10 -10
- package/{machineWsRunDispatch-6TQU3KYJ.js → machineWsRunDispatch-6EETR3RV.js} +10 -10
- package/package.json +1 -1
- package/{readlineWorkspace-7QZ5V5G4.js → readlineWorkspace-LBLAGNGM.js} +10 -10
- package/{runAgentClientLoop-POZB5FTY.js → runAgentClientLoop-RPEULJFS.js} +10 -10
- package/{streamAgentChatTurn-HSJ7LAWE.js → streamAgentChatTurn-D5POCPVX.js} +18 -121
- package/{tools-HO6FDNB4.js → tools-I6D2B2G6.js} +7 -7
- package/{updateDialogTitleAction-YV5HMYZM.js → updateDialogTitleAction-7YZ7FNAK.js} +3 -3
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
switchDialogAgent,
|
|
21
21
|
updateDialogTitle,
|
|
22
22
|
updateTokens
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-PZ3HKBET.js";
|
|
24
24
|
import "./chunk-523DITKR.js";
|
|
25
25
|
import "./chunk-YYLHWIW6.js";
|
|
26
26
|
import "./chunk-6O4IK4V2.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-UC3Q7X3J.js";
|
|
28
28
|
import "./chunk-D76D3RTR.js";
|
|
29
29
|
import {
|
|
30
30
|
getActiveDialogAgentId
|
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
} from "./chunk-BMQ2MJUK.js";
|
|
4
4
|
import {
|
|
5
5
|
buildForegroundTurnAdmissionFetchInit,
|
|
6
|
-
consumeAgentRunStream
|
|
7
|
-
|
|
6
|
+
consumeAgentRunStream,
|
|
7
|
+
projectDesktopToolUiContent
|
|
8
|
+
} from "./chunk-YYKMFBK7.js";
|
|
8
9
|
import {
|
|
9
10
|
CONTEXT_OVERFLOW_ACTIONS,
|
|
10
11
|
CONTEXT_TOO_LARGE_ACTIONS,
|
|
@@ -12,11 +13,12 @@ import {
|
|
|
12
13
|
} from "./chunk-OCZKATRC.js";
|
|
13
14
|
import {
|
|
14
15
|
performServerProxyFetchWithRetry
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JK5XW3NO.js";
|
|
16
17
|
import {
|
|
17
18
|
createSSEParser,
|
|
19
|
+
resolveAgentRequiredPackIds,
|
|
18
20
|
waitForAbortableDelay
|
|
19
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BJ3KD73I.js";
|
|
20
22
|
import "./chunk-NF64D32W.js";
|
|
21
23
|
import "./chunk-3L2WKC3W.js";
|
|
22
24
|
import {
|
|
@@ -28,14 +30,15 @@ import {
|
|
|
28
30
|
resolveHandleSendMessageContext,
|
|
29
31
|
selectAllMsgs,
|
|
30
32
|
setMessages,
|
|
31
|
-
setStreamingMessageId
|
|
32
|
-
|
|
33
|
+
setStreamingMessageId,
|
|
34
|
+
updateToolMessage
|
|
35
|
+
} from "./chunk-PZ3HKBET.js";
|
|
33
36
|
import "./chunk-523DITKR.js";
|
|
34
37
|
import "./chunk-YYLHWIW6.js";
|
|
35
38
|
import "./chunk-6O4IK4V2.js";
|
|
36
39
|
import {
|
|
37
40
|
streamAgentChatTurn
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-UC3Q7X3J.js";
|
|
39
42
|
import "./chunk-D76D3RTR.js";
|
|
40
43
|
import "./chunk-5RGU3J7P.js";
|
|
41
44
|
import "./chunk-M76ECQRD.js";
|
|
@@ -47,6 +50,12 @@ import {
|
|
|
47
50
|
import "./chunk-YDH3FDFQ.js";
|
|
48
51
|
import "./chunk-MX574M24.js";
|
|
49
52
|
import "./chunk-AGGIDPCZ.js";
|
|
53
|
+
import "./chunk-B2XUQXQX.js";
|
|
54
|
+
import {
|
|
55
|
+
expandEnabledPacks
|
|
56
|
+
} from "./chunk-6TPOEJMQ.js";
|
|
57
|
+
import "./chunk-AUDNYVRC.js";
|
|
58
|
+
import "./chunk-KHCLMKZZ.js";
|
|
50
59
|
import "./chunk-ZSPC3ZTC.js";
|
|
51
60
|
import "./chunk-ELYEQNUI.js";
|
|
52
61
|
import "./chunk-PSCNXBYA.js";
|
|
@@ -109,22 +118,28 @@ import "./chunk-G3SUCT4W.js";
|
|
|
109
118
|
import "./chunk-4VNS5WPM.js";
|
|
110
119
|
|
|
111
120
|
// packages/ai/agent/serverOwnedWebForegroundEligibility.ts
|
|
112
|
-
var
|
|
121
|
+
var DURABLE_WEB_FOREGROUND_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
122
|
+
"ask_user",
|
|
123
|
+
"exa_search",
|
|
124
|
+
"fetchWebpage"
|
|
125
|
+
]);
|
|
113
126
|
function readToolName(value) {
|
|
114
127
|
if (typeof value === "string") {
|
|
115
|
-
const name2 = value.trim();
|
|
128
|
+
const name2 = canonicalizeToolName(value.trim());
|
|
116
129
|
return name2 || null;
|
|
117
130
|
}
|
|
118
131
|
if (!value || typeof value !== "object") return null;
|
|
119
132
|
const record = value;
|
|
120
133
|
const candidate = typeof record.name === "string" && record.name || typeof record.toolName === "string" && record.toolName || typeof record.function?.name === "string" && record.function.name || "";
|
|
121
|
-
const name = candidate.trim();
|
|
134
|
+
const name = canonicalizeToolName(candidate.trim());
|
|
122
135
|
return name || null;
|
|
123
136
|
}
|
|
124
137
|
function configuredToolNames(agent) {
|
|
125
138
|
const values = [];
|
|
126
139
|
if (Array.isArray(agent.tools)) values.push(...agent.tools);
|
|
127
140
|
if (Array.isArray(agent.toolNames)) values.push(...agent.toolNames);
|
|
141
|
+
const requiredPackIds = resolveAgentRequiredPackIds(agent);
|
|
142
|
+
values.push(...expandEnabledPacks(requiredPackIds));
|
|
128
143
|
const policies = [
|
|
129
144
|
agent.runtimeToolPolicy,
|
|
130
145
|
agent.runtimeBinding?.runtimeToolPolicy,
|
|
@@ -149,7 +164,7 @@ function hasSupportedDurableToolSurface(agent) {
|
|
|
149
164
|
return false;
|
|
150
165
|
}
|
|
151
166
|
const names = configuredToolNames(agent);
|
|
152
|
-
return names.length === 0 || names.every((name) => name
|
|
167
|
+
return names.length === 0 || names.every((name) => DURABLE_WEB_FOREGROUND_TOOL_NAMES.has(name));
|
|
153
168
|
}
|
|
154
169
|
function shouldUseServerOwnedWebForegroundTurn(input) {
|
|
155
170
|
if (input.surface !== "web") return false;
|
|
@@ -173,7 +188,7 @@ function shouldUseServerOwnedWebForegroundTurn(input) {
|
|
|
173
188
|
return true;
|
|
174
189
|
}
|
|
175
190
|
|
|
176
|
-
// packages/ai/agent/
|
|
191
|
+
// packages/ai/agent/serverOwnedToolProjection.ts
|
|
177
192
|
function parseToolArgs(raw) {
|
|
178
193
|
if (typeof raw !== "string" || !raw.trim()) return {};
|
|
179
194
|
try {
|
|
@@ -183,34 +198,50 @@ function parseToolArgs(raw) {
|
|
|
183
198
|
return {};
|
|
184
199
|
}
|
|
185
200
|
}
|
|
186
|
-
function
|
|
201
|
+
function normalizeToolSet(values) {
|
|
202
|
+
return new Set(
|
|
203
|
+
[...values].map((value) => canonicalizeToolName(value)).filter(Boolean)
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
function isToolResultFailure(content, metadata) {
|
|
207
|
+
if (metadata?.error) return true;
|
|
208
|
+
if (typeof content !== "string" || !content.trim()) return false;
|
|
209
|
+
try {
|
|
210
|
+
const parsed = JSON.parse(content);
|
|
211
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return false;
|
|
212
|
+
const record = parsed;
|
|
213
|
+
return Boolean(record.error) || record.ok === false || record.success === false || record.status === "error";
|
|
214
|
+
} catch {
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function createServerOwnedToolProjection(args) {
|
|
219
|
+
const supported = normalizeToolSet(args.supportedToolNames);
|
|
220
|
+
const keepReadOnly = normalizeToolSet(args.keepReadOnlyUntilCanonical ?? []);
|
|
187
221
|
const transientByCallId = /* @__PURE__ */ new Map();
|
|
188
222
|
const handlePayload = (payload) => {
|
|
189
223
|
if (!payload || typeof payload !== "object") return;
|
|
190
224
|
if (payload.type === "assistant_tool_calls") {
|
|
191
225
|
const calls = Array.isArray(payload.tool_calls) ? payload.tool_calls : [];
|
|
192
226
|
for (const call of calls) {
|
|
193
|
-
const
|
|
194
|
-
const
|
|
195
|
-
if (!
|
|
196
|
-
if (transientByCallId.has(
|
|
227
|
+
const callId2 = typeof call?.id === "string" ? call.id : "";
|
|
228
|
+
const toolName2 = canonicalizeToolName(call?.function?.name ?? "");
|
|
229
|
+
if (!callId2 || !toolName2 || !supported.has(toolName2)) continue;
|
|
230
|
+
if (transientByCallId.has(callId2)) continue;
|
|
197
231
|
const { key, messageId } = createDialogMessageKeyAndId(args.dialogId);
|
|
198
232
|
const input = parseToolArgs(call?.function?.arguments);
|
|
199
|
-
const
|
|
233
|
+
const content2 = toolName2 === "ask_user" ? JSON.stringify({ type: "ask_user", ...input }) : "";
|
|
234
|
+
const message2 = {
|
|
200
235
|
id: messageId,
|
|
201
236
|
dialogId: args.dialogId,
|
|
202
237
|
dbKey: key,
|
|
203
238
|
role: "tool",
|
|
204
|
-
|
|
205
|
-
// from `content`, so a single-question call (question + choices, no
|
|
206
|
-
// `questions`) would otherwise render as an empty row until the
|
|
207
|
-
// tool_result arrives. The canonical payload replaces this on done.
|
|
208
|
-
content: JSON.stringify({ type: "ask_user", ...input }),
|
|
239
|
+
content: content2,
|
|
209
240
|
isStreaming: true,
|
|
210
|
-
toolName:
|
|
211
|
-
toolCallId:
|
|
241
|
+
toolName: toolName2,
|
|
242
|
+
toolCallId: callId2,
|
|
212
243
|
toolPayload: {
|
|
213
|
-
toolName:
|
|
244
|
+
toolName: toolName2,
|
|
214
245
|
status: "running",
|
|
215
246
|
input,
|
|
216
247
|
rawToolCall: call,
|
|
@@ -218,36 +249,81 @@ function createServerOwnedAskUserProjection(args) {
|
|
|
218
249
|
},
|
|
219
250
|
...args.messageMetadata
|
|
220
251
|
};
|
|
221
|
-
transientByCallId.set(
|
|
222
|
-
args.dispatch(messageStreaming(
|
|
252
|
+
transientByCallId.set(callId2, message2);
|
|
253
|
+
args.dispatch(messageStreaming(message2));
|
|
223
254
|
}
|
|
224
255
|
return;
|
|
225
256
|
}
|
|
226
|
-
if (payload.type
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
257
|
+
if (payload.type !== "tool_result") return;
|
|
258
|
+
const callId = typeof payload.toolCallId === "string" ? payload.toolCallId : "";
|
|
259
|
+
if (!callId) return;
|
|
260
|
+
const existing = transientByCallId.get(callId);
|
|
261
|
+
const toolName = canonicalizeToolName(payload.toolName ?? existing?.toolName ?? "");
|
|
262
|
+
if (!toolName || !supported.has(toolName)) return;
|
|
263
|
+
const metadata = payload.metadata && typeof payload.metadata === "object" && !Array.isArray(payload.metadata) ? payload.metadata : void 0;
|
|
264
|
+
const failed = isToolResultFailure(payload.content, metadata);
|
|
265
|
+
const content = toolName === "ask_user" ? typeof payload.content === "string" ? payload.content : "" : projectDesktopToolUiContent({
|
|
266
|
+
toolName,
|
|
267
|
+
content: payload.content,
|
|
268
|
+
metadata
|
|
269
|
+
});
|
|
270
|
+
const base = existing ?? (() => {
|
|
271
|
+
const { key, messageId } = createDialogMessageKeyAndId(args.dialogId);
|
|
272
|
+
return {
|
|
273
|
+
id: messageId,
|
|
274
|
+
dialogId: args.dialogId,
|
|
275
|
+
dbKey: key,
|
|
276
|
+
role: "tool",
|
|
277
|
+
content: "",
|
|
236
278
|
isStreaming: true,
|
|
279
|
+
toolName,
|
|
280
|
+
toolCallId: callId,
|
|
237
281
|
toolPayload: {
|
|
238
|
-
|
|
239
|
-
status: "running"
|
|
240
|
-
|
|
282
|
+
toolName,
|
|
283
|
+
status: "running",
|
|
284
|
+
input: {},
|
|
285
|
+
summary: ""
|
|
286
|
+
},
|
|
287
|
+
...args.messageMetadata
|
|
241
288
|
};
|
|
242
|
-
|
|
289
|
+
})();
|
|
290
|
+
const staysReadOnly = keepReadOnly.has(toolName);
|
|
291
|
+
const toolPayload = {
|
|
292
|
+
...base.toolPayload ?? {},
|
|
293
|
+
toolName,
|
|
294
|
+
status: staysReadOnly ? "running" : failed ? "failed" : "succeeded"
|
|
295
|
+
};
|
|
296
|
+
const message = {
|
|
297
|
+
...base,
|
|
298
|
+
content,
|
|
299
|
+
isStreaming: staysReadOnly,
|
|
300
|
+
toolName,
|
|
301
|
+
toolPayload
|
|
302
|
+
};
|
|
303
|
+
transientByCallId.set(callId, message);
|
|
304
|
+
if (staysReadOnly) {
|
|
243
305
|
args.dispatch(messageStreaming(message));
|
|
306
|
+
return;
|
|
244
307
|
}
|
|
308
|
+
if (!existing) {
|
|
309
|
+
args.dispatch(messageStreaming(base));
|
|
310
|
+
}
|
|
311
|
+
args.dispatch(
|
|
312
|
+
updateToolMessage({
|
|
313
|
+
id: base.id,
|
|
314
|
+
dialogId: args.dialogId,
|
|
315
|
+
changes: {
|
|
316
|
+
content,
|
|
317
|
+
isStreaming: false,
|
|
318
|
+
toolName,
|
|
319
|
+
toolPayload
|
|
320
|
+
}
|
|
321
|
+
})
|
|
322
|
+
);
|
|
245
323
|
};
|
|
246
324
|
const cleanup = () => {
|
|
247
325
|
for (const message of transientByCallId.values()) {
|
|
248
|
-
args.dispatch(
|
|
249
|
-
removeTransientMessage({ id: message.id, dialogId: args.dialogId })
|
|
250
|
-
);
|
|
326
|
+
args.dispatch(removeTransientMessage({ id: message.id, dialogId: args.dialogId }));
|
|
251
327
|
}
|
|
252
328
|
transientByCallId.clear();
|
|
253
329
|
};
|
|
@@ -354,22 +430,18 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
|
|
|
354
430
|
const loopKey = `server-owned:${dialogId}:${transientId}`;
|
|
355
431
|
let accumulated = "";
|
|
356
432
|
let sawDone = false;
|
|
357
|
-
const
|
|
433
|
+
const toolProjection = createServerOwnedToolProjection({
|
|
358
434
|
dialogId,
|
|
359
435
|
dispatch: thunk.dispatch,
|
|
360
436
|
messageMetadata: {
|
|
361
437
|
cybotKey: args.agentKey,
|
|
362
438
|
agentKey: args.agentKey,
|
|
363
439
|
userId
|
|
364
|
-
}
|
|
440
|
+
},
|
|
441
|
+
supportedToolNames: DURABLE_WEB_FOREGROUND_TOOL_NAMES,
|
|
442
|
+
keepReadOnlyUntilCanonical: ["ask_user"]
|
|
365
443
|
});
|
|
366
|
-
thunk.dispatch(
|
|
367
|
-
addActiveController({
|
|
368
|
-
messageId: loopKey,
|
|
369
|
-
controller,
|
|
370
|
-
dialogKey
|
|
371
|
-
})
|
|
372
|
-
);
|
|
444
|
+
thunk.dispatch(addActiveController({ messageId: loopKey, controller, dialogKey }));
|
|
373
445
|
thunk.dispatch(
|
|
374
446
|
messageStreaming({
|
|
375
447
|
id: transientId,
|
|
@@ -398,7 +470,7 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
|
|
|
398
470
|
"dialog-ui",
|
|
399
471
|
"durable-foreground",
|
|
400
472
|
"client-user-prepersisted",
|
|
401
|
-
"
|
|
473
|
+
"durable-tool-cards"
|
|
402
474
|
],
|
|
403
475
|
...args.dialogConfig.agentMode === "auto" ? { dialogAgentMode: "auto" } : { dialogAgentMode: "fixed" }
|
|
404
476
|
},
|
|
@@ -421,8 +493,6 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
|
|
|
421
493
|
response = await performServerProxyFetchWithRetry({
|
|
422
494
|
execute: () => fetch(`${currentServer}/api/agent/run`, init),
|
|
423
495
|
signal: controller.signal,
|
|
424
|
-
// This is an at-most-once foreground admission. A network error is
|
|
425
|
-
// ambiguous: the server may already own the execution, so never POST it again.
|
|
426
496
|
retryNetworkErrors: false,
|
|
427
497
|
logPrefix: "[serverOwnedWebForegroundTurn]"
|
|
428
498
|
});
|
|
@@ -439,9 +509,7 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
|
|
|
439
509
|
throw new Error(text || `Agent run failed (${response.status})`);
|
|
440
510
|
}
|
|
441
511
|
const reader = response.body?.getReader();
|
|
442
|
-
if (!reader) {
|
|
443
|
-
return { serverOwned: true, detached: true };
|
|
444
|
-
}
|
|
512
|
+
if (!reader) return { serverOwned: true, detached: true };
|
|
445
513
|
const parseSSE = createSSEParser();
|
|
446
514
|
const decoder = new TextDecoder();
|
|
447
515
|
const outcome = await consumeAgentRunStream({
|
|
@@ -457,7 +525,7 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
|
|
|
457
525
|
if (payload?.type === "error") {
|
|
458
526
|
return { reject: payload.message || "Agent execution failed" };
|
|
459
527
|
}
|
|
460
|
-
|
|
528
|
+
toolProjection.handlePayload(payload);
|
|
461
529
|
if (payload?.type === "text" && typeof payload.content === "string") {
|
|
462
530
|
accumulated += payload.content;
|
|
463
531
|
thunk.dispatch(
|
|
@@ -475,15 +543,9 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
|
|
|
475
543
|
}
|
|
476
544
|
}
|
|
477
545
|
});
|
|
478
|
-
if (outcome.outcome === "aborted") {
|
|
479
|
-
|
|
480
|
-
}
|
|
481
|
-
if (outcome.outcome === "rejected") {
|
|
482
|
-
throw new Error(outcome.message);
|
|
483
|
-
}
|
|
484
|
-
if (!outcome.sawDone) {
|
|
485
|
-
return { serverOwned: true, detached: true };
|
|
486
|
-
}
|
|
546
|
+
if (outcome.outcome === "aborted") return { serverOwned: true, aborted: true };
|
|
547
|
+
if (outcome.outcome === "rejected") throw new Error(outcome.message);
|
|
548
|
+
if (!outcome.sawDone) return { serverOwned: true, detached: true };
|
|
487
549
|
sawDone = true;
|
|
488
550
|
let canonicalVisible = false;
|
|
489
551
|
try {
|
|
@@ -501,10 +563,10 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
|
|
|
501
563
|
});
|
|
502
564
|
}
|
|
503
565
|
if (canonicalVisible) {
|
|
504
|
-
|
|
566
|
+
toolProjection.cleanup();
|
|
505
567
|
thunk.dispatch(removeTransientMessage({ id: transientId, dialogId }));
|
|
506
568
|
} else {
|
|
507
|
-
|
|
569
|
+
toolProjection.cleanup();
|
|
508
570
|
const transient = selectAllMsgs(thunk.getState(), dialogId).find((message) => message?.id === transientId);
|
|
509
571
|
if (transient) {
|
|
510
572
|
thunk.dispatch(
|
|
@@ -522,14 +584,9 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
|
|
|
522
584
|
}
|
|
523
585
|
return { serverOwned: true };
|
|
524
586
|
} finally {
|
|
525
|
-
thunk.dispatch(
|
|
526
|
-
removeActiveController({
|
|
527
|
-
messageId: loopKey,
|
|
528
|
-
dialogKey
|
|
529
|
-
})
|
|
530
|
-
);
|
|
587
|
+
thunk.dispatch(removeActiveController({ messageId: loopKey, dialogKey }));
|
|
531
588
|
if (!sawDone) {
|
|
532
|
-
|
|
589
|
+
toolProjection.cleanup();
|
|
533
590
|
thunk.dispatch(removeTransientMessage({ id: transientId, dialogId }));
|
|
534
591
|
}
|
|
535
592
|
}
|
package/index.js
CHANGED
|
@@ -71,7 +71,7 @@ async function runScript(script, forwardedArgs, env) {
|
|
|
71
71
|
return proc.exited;
|
|
72
72
|
}
|
|
73
73
|
async function launchTuiWorkspace(args2) {
|
|
74
|
-
const { startTuiWorkspace } = await import("./readlineWorkspace-
|
|
74
|
+
const { startTuiWorkspace } = await import("./readlineWorkspace-LBLAGNGM.js");
|
|
75
75
|
const { createTuiSummaryLlmCaller } = await import("./tuiSummaryLlmCaller-RVW6CJSK.js");
|
|
76
76
|
return startTuiWorkspace({
|
|
77
77
|
...args2,
|
|
@@ -81,7 +81,7 @@ async function launchTuiWorkspace(args2) {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
async function main() {
|
|
84
|
-
const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-
|
|
84
|
+
const { createCliRuntimeContext, looksLikeDaemonShortcut, renderHelpText, resolveCommand, runResolvedCommand } = await import("./commandRegistry-OPVCVVOQ.js");
|
|
85
85
|
const { buildCliRuntimeEnv, loadProfileConfig } = await import("./profileConfig-ZGOFORWV.js");
|
|
86
86
|
const { resolveTuiLaunchMode } = await import("./runtimeModeArgs-2Y7BALTO.js");
|
|
87
87
|
const runtimeEnv = {
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
buildMachinePermissionPromptBlock,
|
|
3
3
|
handleConnectorRunMessage,
|
|
4
4
|
resolveMachineRunPermissionPolicy
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-36HTQWBD.js";
|
|
6
6
|
import {
|
|
7
7
|
isConnectorWebSocketAuthError,
|
|
8
8
|
isConnectorWebSocketRetryableError,
|
|
9
9
|
resolveConnectorWebSocketTarget
|
|
10
10
|
} from "./chunk-ALXHV7NK.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-BFLSOVHN.js";
|
|
12
12
|
import "./chunk-I4OPU5TK.js";
|
|
13
13
|
import "./chunk-YUNJN43V.js";
|
|
14
14
|
import "./chunk-62IL3KQV.js";
|
|
@@ -25,35 +25,35 @@ import "./chunk-4XEYAFLY.js";
|
|
|
25
25
|
import "./chunk-JBTJAPUF.js";
|
|
26
26
|
import "./chunk-QJLEMM2V.js";
|
|
27
27
|
import "./chunk-ATNTHIZI.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-KRC6GI2Q.js";
|
|
29
29
|
import "./chunk-HS7MLR74.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-OXGHM2WW.js";
|
|
31
31
|
import "./chunk-2EE5UD3N.js";
|
|
32
32
|
import "./chunk-5UTFL4QJ.js";
|
|
33
33
|
import "./chunk-KQHGZWSV.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-BJ3KD73I.js";
|
|
35
35
|
import "./chunk-NF64D32W.js";
|
|
36
36
|
import {
|
|
37
37
|
CORE_DRAIN_REASON
|
|
38
38
|
} from "./chunk-3L2WKC3W.js";
|
|
39
39
|
import "./chunk-4JMDLJAD.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-P4CRULYJ.js";
|
|
41
41
|
import "./chunk-HNRASX3X.js";
|
|
42
42
|
import "./chunk-YRRASA5Q.js";
|
|
43
43
|
import "./chunk-63W5N6P3.js";
|
|
44
44
|
import "./chunk-VF4K2QE6.js";
|
|
45
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-2B74TU77.js";
|
|
46
46
|
import "./chunk-Z7IZQF56.js";
|
|
47
47
|
import "./chunk-XPRWFQQK.js";
|
|
48
48
|
import "./chunk-BJUDYFV5.js";
|
|
49
49
|
import "./chunk-MEYIRKDN.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-27VHPPII.js";
|
|
51
51
|
import "./chunk-ZJ7UHBJS.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-PZ3HKBET.js";
|
|
53
53
|
import "./chunk-523DITKR.js";
|
|
54
54
|
import "./chunk-YYLHWIW6.js";
|
|
55
55
|
import "./chunk-6O4IK4V2.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-UC3Q7X3J.js";
|
|
57
57
|
import "./chunk-D76D3RTR.js";
|
|
58
58
|
import "./chunk-5RGU3J7P.js";
|
|
59
59
|
import "./chunk-M76ECQRD.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runtimeWorkspacePermissionPolicy,
|
|
12
12
|
scopePermissionPolicyToRuntimeWorkspace,
|
|
13
13
|
summarizeAgentConfigForLogs
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-36HTQWBD.js";
|
|
15
|
+
import "./chunk-BFLSOVHN.js";
|
|
16
16
|
import "./chunk-I4OPU5TK.js";
|
|
17
17
|
import "./chunk-YUNJN43V.js";
|
|
18
18
|
import "./chunk-62IL3KQV.js";
|
|
@@ -26,33 +26,33 @@ import "./chunk-4XEYAFLY.js";
|
|
|
26
26
|
import "./chunk-JBTJAPUF.js";
|
|
27
27
|
import "./chunk-QJLEMM2V.js";
|
|
28
28
|
import "./chunk-ATNTHIZI.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-KRC6GI2Q.js";
|
|
30
30
|
import "./chunk-HS7MLR74.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-OXGHM2WW.js";
|
|
32
32
|
import "./chunk-2EE5UD3N.js";
|
|
33
33
|
import "./chunk-5UTFL4QJ.js";
|
|
34
34
|
import "./chunk-KQHGZWSV.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-BJ3KD73I.js";
|
|
36
36
|
import "./chunk-NF64D32W.js";
|
|
37
37
|
import "./chunk-3L2WKC3W.js";
|
|
38
38
|
import "./chunk-4JMDLJAD.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-P4CRULYJ.js";
|
|
40
40
|
import "./chunk-HNRASX3X.js";
|
|
41
41
|
import "./chunk-YRRASA5Q.js";
|
|
42
42
|
import "./chunk-63W5N6P3.js";
|
|
43
43
|
import "./chunk-VF4K2QE6.js";
|
|
44
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-2B74TU77.js";
|
|
45
45
|
import "./chunk-Z7IZQF56.js";
|
|
46
46
|
import "./chunk-XPRWFQQK.js";
|
|
47
47
|
import "./chunk-BJUDYFV5.js";
|
|
48
48
|
import "./chunk-MEYIRKDN.js";
|
|
49
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-27VHPPII.js";
|
|
50
50
|
import "./chunk-ZJ7UHBJS.js";
|
|
51
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-PZ3HKBET.js";
|
|
52
52
|
import "./chunk-523DITKR.js";
|
|
53
53
|
import "./chunk-YYLHWIW6.js";
|
|
54
54
|
import "./chunk-6O4IK4V2.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-UC3Q7X3J.js";
|
|
56
56
|
import "./chunk-D76D3RTR.js";
|
|
57
57
|
import "./chunk-5RGU3J7P.js";
|
|
58
58
|
import "./chunk-M76ECQRD.js";
|
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@ import {
|
|
|
76
76
|
wrapTextToLines,
|
|
77
77
|
wrapTranscriptLine,
|
|
78
78
|
wrapTranscriptLineWithLayout
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-BCJPO6SE.js";
|
|
80
80
|
import "./chunk-VJVNU77E.js";
|
|
81
81
|
import "./chunk-BIDGLJQ3.js";
|
|
82
82
|
import {
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
readTimestamp,
|
|
89
89
|
setCliLocale,
|
|
90
90
|
t
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-BFLSOVHN.js";
|
|
92
92
|
import "./chunk-I4OPU5TK.js";
|
|
93
93
|
import "./chunk-YUNJN43V.js";
|
|
94
94
|
import "./chunk-62IL3KQV.js";
|
|
@@ -142,16 +142,16 @@ import "./chunk-ATNTHIZI.js";
|
|
|
142
142
|
import "./chunk-JEXVIMYZ.js";
|
|
143
143
|
import {
|
|
144
144
|
prepareTools
|
|
145
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-KRC6GI2Q.js";
|
|
146
146
|
import {
|
|
147
147
|
buildResponseGuidelines
|
|
148
148
|
} from "./chunk-EOARMOVD.js";
|
|
149
149
|
import "./chunk-HS7MLR74.js";
|
|
150
|
-
import "./chunk-
|
|
150
|
+
import "./chunk-OXGHM2WW.js";
|
|
151
151
|
import "./chunk-2EE5UD3N.js";
|
|
152
152
|
import "./chunk-5UTFL4QJ.js";
|
|
153
153
|
import "./chunk-KQHGZWSV.js";
|
|
154
|
-
import "./chunk-
|
|
154
|
+
import "./chunk-BJ3KD73I.js";
|
|
155
155
|
import "./chunk-NF64D32W.js";
|
|
156
156
|
import "./chunk-3L2WKC3W.js";
|
|
157
157
|
import {
|
|
@@ -164,12 +164,12 @@ import {
|
|
|
164
164
|
resolveRunLabel,
|
|
165
165
|
shortRunId
|
|
166
166
|
} from "./chunk-4JMDLJAD.js";
|
|
167
|
-
import "./chunk-
|
|
167
|
+
import "./chunk-P4CRULYJ.js";
|
|
168
168
|
import "./chunk-HNRASX3X.js";
|
|
169
169
|
import "./chunk-YRRASA5Q.js";
|
|
170
170
|
import "./chunk-63W5N6P3.js";
|
|
171
171
|
import "./chunk-VF4K2QE6.js";
|
|
172
|
-
import "./chunk-
|
|
172
|
+
import "./chunk-2B74TU77.js";
|
|
173
173
|
import "./chunk-Z7IZQF56.js";
|
|
174
174
|
import "./chunk-XPRWFQQK.js";
|
|
175
175
|
import {
|
|
@@ -179,15 +179,15 @@ import {
|
|
|
179
179
|
} from "./chunk-YPREESF4.js";
|
|
180
180
|
import "./chunk-BJUDYFV5.js";
|
|
181
181
|
import "./chunk-MEYIRKDN.js";
|
|
182
|
-
import "./chunk-
|
|
182
|
+
import "./chunk-27VHPPII.js";
|
|
183
183
|
import "./chunk-ZJ7UHBJS.js";
|
|
184
184
|
import {
|
|
185
185
|
extractReferenceKeysFromMessage
|
|
186
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-PZ3HKBET.js";
|
|
187
187
|
import "./chunk-523DITKR.js";
|
|
188
188
|
import "./chunk-YYLHWIW6.js";
|
|
189
189
|
import "./chunk-6O4IK4V2.js";
|
|
190
|
-
import "./chunk-
|
|
190
|
+
import "./chunk-UC3Q7X3J.js";
|
|
191
191
|
import "./chunk-D76D3RTR.js";
|
|
192
192
|
import "./chunk-5RGU3J7P.js";
|
|
193
193
|
import "./chunk-M76ECQRD.js";
|