openfox 1.6.77 → 1.6.78
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/dist/{auto-compaction-GOHNI2R2.js → auto-compaction-AN3U2AD5.js} +5 -5
- package/dist/{chat-handler-K2RDXBO6.js → chat-handler-AIBOSHAQ.js} +8 -8
- package/dist/{chunk-I7JVS7V5.js → chunk-2IZMUXMP.js} +3 -3
- package/dist/{chunk-XSUQDB6R.js → chunk-DKKDNJT7.js} +36 -22
- package/dist/{chunk-XKIEDGQF.js → chunk-DL6ZILAF.js} +1 -2
- package/dist/{chunk-EBQYRNNU.js → chunk-GLVNO4DS.js} +167 -92
- package/dist/{chunk-6SYNGMU4.js → chunk-NWXLRRDD.js} +4 -4
- package/dist/{chunk-UVN6AKIO.js → chunk-RJRG2VER.js} +33 -2
- package/dist/{chunk-BBC46FN4.js → chunk-TS5XFQ2D.js} +88 -48
- package/dist/{chunk-OJBFC6ER.js → chunk-VSYJIPRI.js} +3 -3
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{events-5RIXWI5Y.js → events-ND5GZBT2.js} +7 -5
- package/dist/{folding-JNOUTI5Z.js → folding-XIKR6AFM.js} +14 -4
- package/dist/{inspect-proxy-Y75AXMRX.js → inspect-proxy-42ZXL2R5.js} +2 -2
- package/dist/{orchestrator-TW5II347.js → orchestrator-5BY2MH72.js} +6 -6
- package/dist/package.json +1 -1
- package/dist/{processor-MZ3QIUED.js → processor-PV446N55.js} +5 -5
- package/dist/{serve-FTTLGRAO.js → serve-6ME66XOO.js} +7 -7
- package/dist/server/index.js +6 -6
- package/dist/{service-D6LC3CAM.js → service-TU4XSXYJ.js} +33 -2
- package/dist/{tools-QJ5K5IJP.js → tools-6DXPHBUV.js} +5 -5
- package/dist/web/assets/{index-FjLp1t6r.js → index-0igqGWob.js} +49 -49
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
getToolRegistryForAgent,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
runTopLevelAgentLoop
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GLVNO4DS.js";
|
|
17
17
|
import {
|
|
18
18
|
getCurrentContextWindowId,
|
|
19
19
|
getEventStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RJRG2VER.js";
|
|
21
21
|
import {
|
|
22
22
|
buildSnapshotFromSessionState
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TS5XFQ2D.js";
|
|
24
24
|
import {
|
|
25
25
|
logger
|
|
26
26
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -327,4 +327,4 @@ export {
|
|
|
327
327
|
runBuilderTurn,
|
|
328
328
|
runVerifierTurn
|
|
329
329
|
};
|
|
330
|
-
//# sourceMappingURL=chunk-
|
|
330
|
+
//# sourceMappingURL=chunk-NWXLRRDD.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
foldSessionState,
|
|
10
10
|
spreadOptionalMessageFields,
|
|
11
11
|
stripPromptContextMessages
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TS5XFQ2D.js";
|
|
13
13
|
import {
|
|
14
14
|
getRuntimeConfig
|
|
15
15
|
} from "./chunk-B5AP3RSV.js";
|
|
@@ -316,6 +316,19 @@ var EventStore = class {
|
|
|
316
316
|
const result = this.db.prepare(`DELETE FROM events WHERE session_id = ? AND seq <= ?`).run(sessionId, upToSeq);
|
|
317
317
|
return result.changes;
|
|
318
318
|
}
|
|
319
|
+
/**
|
|
320
|
+
* Delete all events after a given sequence number (exclusive).
|
|
321
|
+
* Retains session.initialized (seq 1) and any events at/below fromSeq.
|
|
322
|
+
* Used when truncating session history.
|
|
323
|
+
*
|
|
324
|
+
* @param sessionId - The session ID
|
|
325
|
+
* @param fromSeq - Events with seq > fromSeq will be deleted
|
|
326
|
+
* @returns The number of events deleted
|
|
327
|
+
*/
|
|
328
|
+
deleteEventsAfterSeq(sessionId, fromSeq) {
|
|
329
|
+
const result = this.db.prepare(`DELETE FROM events WHERE session_id = ? AND seq > ?`).run(sessionId, fromSeq);
|
|
330
|
+
return result.changes;
|
|
331
|
+
}
|
|
319
332
|
/**
|
|
320
333
|
* Clean up old events, keeping only:
|
|
321
334
|
* - session.initialized event (seq 1)
|
|
@@ -1089,6 +1102,23 @@ function emitTurnSnapshot(sessionId, snapshot) {
|
|
|
1089
1102
|
data: snapshot
|
|
1090
1103
|
});
|
|
1091
1104
|
}
|
|
1105
|
+
function truncateSessionMessages(sessionId, messageIndex) {
|
|
1106
|
+
const eventStore = getEventStore();
|
|
1107
|
+
const snapshotEvent = eventStore.getLatestSnapshot(sessionId);
|
|
1108
|
+
if (!snapshotEvent) return;
|
|
1109
|
+
const snapshot = snapshotEvent.data;
|
|
1110
|
+
const messages = snapshot.messages;
|
|
1111
|
+
const lastKept = messageIndex + 1;
|
|
1112
|
+
if (lastKept < 1 || lastKept >= messages.length) return;
|
|
1113
|
+
snapshot.messages = messages.slice(0, lastKept);
|
|
1114
|
+
eventStore.deleteEventsAfterSeq(sessionId, snapshotEvent.seq);
|
|
1115
|
+
eventStore.append(sessionId, {
|
|
1116
|
+
type: "turn.snapshot",
|
|
1117
|
+
data: snapshot
|
|
1118
|
+
});
|
|
1119
|
+
const removed = messages.length - messageIndex;
|
|
1120
|
+
updateSessionMessageCount(sessionId, -removed);
|
|
1121
|
+
}
|
|
1092
1122
|
function compactContext(sessionId, summary, beforeTokens) {
|
|
1093
1123
|
const state = getSessionState(sessionId);
|
|
1094
1124
|
if (!state) {
|
|
@@ -1218,7 +1248,8 @@ export {
|
|
|
1218
1248
|
emitChatError,
|
|
1219
1249
|
emitFormatRetry,
|
|
1220
1250
|
emitTurnSnapshot,
|
|
1251
|
+
truncateSessionMessages,
|
|
1221
1252
|
compactContext,
|
|
1222
1253
|
getRecentUserPromptsForSession
|
|
1223
1254
|
};
|
|
1224
|
-
//# sourceMappingURL=chunk-
|
|
1255
|
+
//# sourceMappingURL=chunk-RJRG2VER.js.map
|
|
@@ -38,6 +38,9 @@ function updateMessageDone(msg, data) {
|
|
|
38
38
|
if (data.partial) msg.partial = true;
|
|
39
39
|
if (data.promptContext) msg.promptContext = data.promptContext;
|
|
40
40
|
if (data.tokenCount !== void 0) msg.tokenCount = data.tokenCount;
|
|
41
|
+
if ("preparingToolCalls" in msg) {
|
|
42
|
+
msg.preparingToolCalls = [];
|
|
43
|
+
}
|
|
41
44
|
}
|
|
42
45
|
function applyEvents(initialMessages, events, options) {
|
|
43
46
|
const messages = new Map(initialMessages.map((message) => [message.id, deepCloneMessage(message)]));
|
|
@@ -247,7 +250,7 @@ function cloneMessage(message) {
|
|
|
247
250
|
}))
|
|
248
251
|
} : {},
|
|
249
252
|
...message.segments ? { segments: [...message.segments] } : {},
|
|
250
|
-
...message.preparingToolCalls ? { preparingToolCalls: [...message.preparingToolCalls] } : {}
|
|
253
|
+
...message.preparingToolCalls && message.preparingToolCalls.length > 0 ? { preparingToolCalls: [...message.preparingToolCalls] } : {}
|
|
251
254
|
};
|
|
252
255
|
}
|
|
253
256
|
function spreadOptionalMessageFields(message) {
|
|
@@ -267,6 +270,7 @@ function spreadOptionalMessageFields(message) {
|
|
|
267
270
|
...message.isCompactionSummary !== void 0 && { isCompactionSummary: message.isCompactionSummary },
|
|
268
271
|
...message.promptContext !== void 0 && { promptContext: message.promptContext },
|
|
269
272
|
...message.attachments !== void 0 && { attachments: message.attachments },
|
|
273
|
+
...message.preparingToolCalls !== void 0 && message.preparingToolCalls.length > 0 && { preparingToolCalls: message.preparingToolCalls },
|
|
270
274
|
...message.metadata !== void 0 && { metadata: message.metadata }
|
|
271
275
|
};
|
|
272
276
|
}
|
|
@@ -292,11 +296,14 @@ function appendSnapshotMessageContext(result, message) {
|
|
|
292
296
|
contextMsg.thinkingContent = message.thinkingContent;
|
|
293
297
|
}
|
|
294
298
|
if (message.toolCalls && message.toolCalls.length > 0) {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
299
|
+
const fulfilledToolCalls = message.toolCalls.filter((tc) => tc.result);
|
|
300
|
+
if (fulfilledToolCalls.length > 0) {
|
|
301
|
+
contextMsg.toolCalls = fulfilledToolCalls.map((toolCall) => ({
|
|
302
|
+
id: toolCall.id,
|
|
303
|
+
name: toolCall.name,
|
|
304
|
+
arguments: toolCall.arguments
|
|
305
|
+
}));
|
|
306
|
+
}
|
|
300
307
|
}
|
|
301
308
|
if (message.attachments !== void 0) {
|
|
302
309
|
contextMsg.attachments = message.attachments;
|
|
@@ -346,6 +353,7 @@ function buildContextMessagesFromStoredEvents(events, windowId, options) {
|
|
|
346
353
|
const includeVerifier = options?.includeVerifier ?? true;
|
|
347
354
|
const messages = [];
|
|
348
355
|
const messageMap = /* @__PURE__ */ new Map();
|
|
356
|
+
const fulfilledToolCallIds = /* @__PURE__ */ new Set();
|
|
349
357
|
for (const event of events) {
|
|
350
358
|
switch (event.type) {
|
|
351
359
|
case "message.start": {
|
|
@@ -363,62 +371,89 @@ function buildContextMessagesFromStoredEvents(events, windowId, options) {
|
|
|
363
371
|
break;
|
|
364
372
|
}
|
|
365
373
|
case "message.thinking": {
|
|
366
|
-
|
|
367
|
-
const msg = messageMap.get(data.messageId);
|
|
368
|
-
if (msg) {
|
|
369
|
-
msg.thinkingContent = (msg.thinkingContent ?? "") + data.content;
|
|
370
|
-
}
|
|
374
|
+
handleMessageThinking(messageMap, event.data);
|
|
371
375
|
break;
|
|
372
376
|
}
|
|
373
377
|
case "message.delta": {
|
|
374
|
-
|
|
375
|
-
const msg = messageMap.get(data.messageId);
|
|
376
|
-
if (msg) {
|
|
377
|
-
msg.content += data.content;
|
|
378
|
-
}
|
|
378
|
+
handleMessageDelta(messageMap, event.data);
|
|
379
379
|
break;
|
|
380
380
|
}
|
|
381
381
|
case "tool.call": {
|
|
382
|
-
|
|
383
|
-
const msg = messageMap.get(data.messageId);
|
|
384
|
-
if (msg) {
|
|
385
|
-
if (!msg.toolCalls) msg.toolCalls = [];
|
|
386
|
-
msg.toolCalls.push(data.toolCall);
|
|
387
|
-
}
|
|
382
|
+
handleToolCall(messageMap, event.data);
|
|
388
383
|
break;
|
|
389
384
|
}
|
|
390
385
|
case "tool.result": {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
386
|
+
handleToolResult(
|
|
387
|
+
messages,
|
|
388
|
+
messageMap,
|
|
389
|
+
fulfilledToolCallIds,
|
|
390
|
+
event.data
|
|
391
|
+
);
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
stripOrphanedToolCalls(messages, fulfilledToolCallIds);
|
|
397
|
+
return messages.map(({ id: _id, ...message }) => message);
|
|
398
|
+
}
|
|
399
|
+
function handleMessageThinking(messageMap, data) {
|
|
400
|
+
const msg = messageMap.get(data.messageId);
|
|
401
|
+
if (msg) {
|
|
402
|
+
msg.thinkingContent = (msg.thinkingContent ?? "") + data.content;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
function handleMessageDelta(messageMap, data) {
|
|
406
|
+
const msg = messageMap.get(data.messageId);
|
|
407
|
+
if (msg) {
|
|
408
|
+
msg.content += data.content;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
function handleToolCall(messageMap, data) {
|
|
412
|
+
const msg = messageMap.get(data.messageId);
|
|
413
|
+
if (msg) {
|
|
414
|
+
if (!msg.toolCalls) msg.toolCalls = [];
|
|
415
|
+
msg.toolCalls.push(data.toolCall);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
function handleToolResult(messages, messageMap, fulfilled, data) {
|
|
419
|
+
fulfilled.add(data.toolCallId);
|
|
420
|
+
if (messageMap.has(data.messageId)) {
|
|
421
|
+
const imageMeta = data.result.metadata;
|
|
422
|
+
const toolMsg = {
|
|
423
|
+
id: `tool-${data.toolCallId}`,
|
|
424
|
+
role: "tool",
|
|
425
|
+
content: stripAnsi(
|
|
426
|
+
data.result.success ? data.result.output ?? "Success" : data.result.output ? `${data.result.output}
|
|
399
427
|
|
|
400
428
|
Error: ${data.result.error}` : `Error: ${data.result.error}`
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}
|
|
413
|
-
];
|
|
414
|
-
}
|
|
415
|
-
messages.push(msg);
|
|
429
|
+
),
|
|
430
|
+
toolCallId: data.toolCallId
|
|
431
|
+
};
|
|
432
|
+
if (imageMeta?.dataUrl && imageMeta?.mimeType?.startsWith("image/")) {
|
|
433
|
+
toolMsg.attachments = [
|
|
434
|
+
{
|
|
435
|
+
id: crypto.randomUUID(),
|
|
436
|
+
filename: imageMeta.path ?? "image",
|
|
437
|
+
mimeType: imageMeta.mimeType,
|
|
438
|
+
size: imageMeta.size ?? 0,
|
|
439
|
+
data: imageMeta.dataUrl
|
|
416
440
|
}
|
|
417
|
-
|
|
441
|
+
];
|
|
442
|
+
}
|
|
443
|
+
messages.push(toolMsg);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
function stripOrphanedToolCalls(messages, fulfilledToolCallIds) {
|
|
447
|
+
for (const msg of messages) {
|
|
448
|
+
if (msg.role === "assistant" && msg.toolCalls) {
|
|
449
|
+
const fulfilled = msg.toolCalls.filter((tc) => fulfilledToolCallIds.has(tc.id));
|
|
450
|
+
if (fulfilled.length === 0) {
|
|
451
|
+
delete msg.toolCalls;
|
|
452
|
+
} else {
|
|
453
|
+
msg.toolCalls = fulfilled;
|
|
418
454
|
}
|
|
419
455
|
}
|
|
420
456
|
}
|
|
421
|
-
return messages.map(({ id: _id, ...message }) => message);
|
|
422
457
|
}
|
|
423
458
|
function buildContextMessagesFromEventHistory(events, windowId, options) {
|
|
424
459
|
const snapshotEvent = [...events].reverse().find((event) => event.type === "turn.snapshot");
|
|
@@ -824,6 +859,11 @@ export {
|
|
|
824
859
|
spreadOptionalMessageFields,
|
|
825
860
|
buildMessagesFromStoredEvents,
|
|
826
861
|
buildContextMessagesFromStoredEvents,
|
|
862
|
+
handleMessageThinking,
|
|
863
|
+
handleMessageDelta,
|
|
864
|
+
handleToolCall,
|
|
865
|
+
handleToolResult,
|
|
866
|
+
stripOrphanedToolCalls,
|
|
827
867
|
buildContextMessagesFromEventHistory,
|
|
828
868
|
foldTurnEventsToSnapshotMessages,
|
|
829
869
|
foldTurnEventsToSnapshotMessagesFromInitial,
|
|
@@ -840,4 +880,4 @@ export {
|
|
|
840
880
|
getMessagesForWindow,
|
|
841
881
|
buildContextMessagesFromMessages
|
|
842
882
|
};
|
|
843
|
-
//# sourceMappingURL=chunk-
|
|
883
|
+
//# sourceMappingURL=chunk-TS5XFQ2D.js.map
|
|
@@ -155,7 +155,7 @@ async function runCli(options) {
|
|
|
155
155
|
break;
|
|
156
156
|
}
|
|
157
157
|
case "service": {
|
|
158
|
-
const { runServiceCommand } = await import("./service-
|
|
158
|
+
const { runServiceCommand } = await import("./service-TU4XSXYJ.js");
|
|
159
159
|
const [, subcommand] = positionals;
|
|
160
160
|
if (subcommand === "--help" || subcommand === "-h" || values.help) {
|
|
161
161
|
runServiceCommand(mode, void 0);
|
|
@@ -190,7 +190,7 @@ async function runCli(options) {
|
|
|
190
190
|
if (!configExists) {
|
|
191
191
|
await runNetworkSetup(mode);
|
|
192
192
|
}
|
|
193
|
-
const { runServe } = await import("./serve-
|
|
193
|
+
const { runServe } = await import("./serve-6ME66XOO.js");
|
|
194
194
|
const serveOptions = { mode };
|
|
195
195
|
if (values.port) serveOptions.port = parseInt(values.port);
|
|
196
196
|
if (values["no-browser"] === true) serveOptions.openBrowser = false;
|
|
@@ -202,4 +202,4 @@ async function runCli(options) {
|
|
|
202
202
|
export {
|
|
203
203
|
runCli
|
|
204
204
|
};
|
|
205
|
-
//# sourceMappingURL=chunk-
|
|
205
|
+
//# sourceMappingURL=chunk-VSYJIPRI.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -35,8 +35,9 @@ import {
|
|
|
35
35
|
initEventStore,
|
|
36
36
|
isFileInCache,
|
|
37
37
|
isStoredEvent,
|
|
38
|
-
isTurnEvent
|
|
39
|
-
|
|
38
|
+
isTurnEvent,
|
|
39
|
+
truncateSessionMessages
|
|
40
|
+
} from "./chunk-RJRG2VER.js";
|
|
40
41
|
import "./chunk-KIOUKC3Z.js";
|
|
41
42
|
import {
|
|
42
43
|
buildContextMessagesFromEventHistory,
|
|
@@ -54,7 +55,7 @@ import {
|
|
|
54
55
|
foldTodos,
|
|
55
56
|
foldTurnEventsToSnapshotMessages,
|
|
56
57
|
getMessagesForWindow
|
|
57
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-TS5XFQ2D.js";
|
|
58
59
|
import "./chunk-B5AP3RSV.js";
|
|
59
60
|
import "./chunk-K44MW7JJ.js";
|
|
60
61
|
export {
|
|
@@ -109,6 +110,7 @@ export {
|
|
|
109
110
|
initEventStore,
|
|
110
111
|
isFileInCache,
|
|
111
112
|
isStoredEvent,
|
|
112
|
-
isTurnEvent
|
|
113
|
+
isTurnEvent,
|
|
114
|
+
truncateSessionMessages
|
|
113
115
|
};
|
|
114
|
-
//# sourceMappingURL=events-
|
|
116
|
+
//# sourceMappingURL=events-ND5GZBT2.js.map
|
|
@@ -16,8 +16,13 @@ import {
|
|
|
16
16
|
foldTurnEventsToSnapshotMessages,
|
|
17
17
|
foldTurnEventsToSnapshotMessagesFromInitial,
|
|
18
18
|
getMessagesForWindow,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
handleMessageDelta,
|
|
20
|
+
handleMessageThinking,
|
|
21
|
+
handleToolCall,
|
|
22
|
+
handleToolResult,
|
|
23
|
+
spreadOptionalMessageFields,
|
|
24
|
+
stripOrphanedToolCalls
|
|
25
|
+
} from "./chunk-TS5XFQ2D.js";
|
|
21
26
|
export {
|
|
22
27
|
buildContextMessagesFromEventHistory,
|
|
23
28
|
buildContextMessagesFromMessages,
|
|
@@ -36,6 +41,11 @@ export {
|
|
|
36
41
|
foldTurnEventsToSnapshotMessages,
|
|
37
42
|
foldTurnEventsToSnapshotMessagesFromInitial,
|
|
38
43
|
getMessagesForWindow,
|
|
39
|
-
|
|
44
|
+
handleMessageDelta,
|
|
45
|
+
handleMessageThinking,
|
|
46
|
+
handleToolCall,
|
|
47
|
+
handleToolResult,
|
|
48
|
+
spreadOptionalMessageFields,
|
|
49
|
+
stripOrphanedToolCalls
|
|
40
50
|
};
|
|
41
|
-
//# sourceMappingURL=folding-
|
|
51
|
+
//# sourceMappingURL=folding-XIKR6AFM.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
startInspectProxy,
|
|
3
3
|
stopAllInspectProxies
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-DL6ZILAF.js";
|
|
5
5
|
import "./chunk-K44MW7JJ.js";
|
|
6
6
|
export {
|
|
7
7
|
startInspectProxy,
|
|
8
8
|
stopAllInspectProxies
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=inspect-proxy-
|
|
10
|
+
//# sourceMappingURL=inspect-proxy-42ZXL2R5.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
runBuilderTurn,
|
|
4
4
|
runChatTurn,
|
|
5
5
|
runVerifierTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NWXLRRDD.js";
|
|
7
7
|
import {
|
|
8
8
|
TurnMetrics,
|
|
9
9
|
createChatDoneEvent,
|
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
createMessageStartEvent,
|
|
12
12
|
createToolCallEvent,
|
|
13
13
|
createToolResultEvent
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GLVNO4DS.js";
|
|
15
15
|
import "./chunk-OXI26S7U.js";
|
|
16
16
|
import "./chunk-CMQCO27Y.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-DL6ZILAF.js";
|
|
18
18
|
import "./chunk-PBGOZMVY.js";
|
|
19
19
|
import "./chunk-VRGRAQDG.js";
|
|
20
20
|
import "./chunk-CUDAT6SS.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-RJRG2VER.js";
|
|
22
22
|
import "./chunk-KIOUKC3Z.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-TS5XFQ2D.js";
|
|
24
24
|
import "./chunk-STYHKCG7.js";
|
|
25
25
|
import "./chunk-BJYPTN5S.js";
|
|
26
26
|
import "./chunk-NDJ6FKSP.js";
|
|
@@ -40,4 +40,4 @@ export {
|
|
|
40
40
|
runChatTurn,
|
|
41
41
|
runVerifierTurn
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=orchestrator-
|
|
43
|
+
//# sourceMappingURL=orchestrator-5BY2MH72.js.map
|
package/dist/package.json
CHANGED
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
generateSessionName,
|
|
6
6
|
getSessionMessageCount,
|
|
7
7
|
needsNameGenerationCheck
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2IZMUXMP.js";
|
|
9
9
|
import {
|
|
10
10
|
getEventStore
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RJRG2VER.js";
|
|
12
12
|
import "./chunk-KIOUKC3Z.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-TS5XFQ2D.js";
|
|
14
14
|
import {
|
|
15
15
|
createChatMessageMessage,
|
|
16
16
|
createSessionRunningMessage
|
|
@@ -177,7 +177,7 @@ var QueueProcessor = class {
|
|
|
177
177
|
backend: provider?.backend ?? llmClient.getBackend(),
|
|
178
178
|
model: llmClient.getModel()
|
|
179
179
|
};
|
|
180
|
-
const { runChatTurn } = await import("./orchestrator-
|
|
180
|
+
const { runChatTurn } = await import("./orchestrator-5BY2MH72.js");
|
|
181
181
|
const runChatTurnParams = buildRunChatTurnParams({
|
|
182
182
|
sessionManager,
|
|
183
183
|
sessionId,
|
|
@@ -214,4 +214,4 @@ var QueueProcessor = class {
|
|
|
214
214
|
export {
|
|
215
215
|
QueueProcessor
|
|
216
216
|
};
|
|
217
|
-
//# sourceMappingURL=processor-
|
|
217
|
+
//# sourceMappingURL=processor-PV446N55.js.map
|
|
@@ -6,20 +6,20 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
createServer
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-DKKDNJT7.js";
|
|
10
|
+
import "./chunk-NWXLRRDD.js";
|
|
11
|
+
import "./chunk-GLVNO4DS.js";
|
|
12
12
|
import "./chunk-OXI26S7U.js";
|
|
13
13
|
import "./chunk-CMQCO27Y.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-DL6ZILAF.js";
|
|
15
15
|
import "./chunk-PBGOZMVY.js";
|
|
16
16
|
import "./chunk-VRGRAQDG.js";
|
|
17
17
|
import "./chunk-WR6QCJJO.js";
|
|
18
18
|
import "./chunk-TGWEH2BC.js";
|
|
19
19
|
import "./chunk-CUDAT6SS.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-RJRG2VER.js";
|
|
21
21
|
import "./chunk-KIOUKC3Z.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-TS5XFQ2D.js";
|
|
23
23
|
import "./chunk-STYHKCG7.js";
|
|
24
24
|
import "./chunk-BJYPTN5S.js";
|
|
25
25
|
import "./chunk-RGRBWDZP.js";
|
|
@@ -190,4 +190,4 @@ async function runServe(options) {
|
|
|
190
190
|
export {
|
|
191
191
|
runServe
|
|
192
192
|
};
|
|
193
|
-
//# sourceMappingURL=serve-
|
|
193
|
+
//# sourceMappingURL=serve-6ME66XOO.js.map
|
package/dist/server/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer,
|
|
3
3
|
createServerHandle
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-DKKDNJT7.js";
|
|
5
|
+
import "../chunk-NWXLRRDD.js";
|
|
6
|
+
import "../chunk-GLVNO4DS.js";
|
|
7
7
|
import "../chunk-OXI26S7U.js";
|
|
8
8
|
import "../chunk-CMQCO27Y.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-DL6ZILAF.js";
|
|
10
10
|
import "../chunk-PBGOZMVY.js";
|
|
11
11
|
import "../chunk-VRGRAQDG.js";
|
|
12
12
|
import "../chunk-WR6QCJJO.js";
|
|
13
13
|
import "../chunk-TGWEH2BC.js";
|
|
14
14
|
import "../chunk-CUDAT6SS.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-RJRG2VER.js";
|
|
16
16
|
import "../chunk-KIOUKC3Z.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-TS5XFQ2D.js";
|
|
18
18
|
import "../chunk-STYHKCG7.js";
|
|
19
19
|
import "../chunk-BJYPTN5S.js";
|
|
20
20
|
import "../chunk-RGRBWDZP.js";
|
|
@@ -46,6 +46,35 @@ async function createWrapperScript() {
|
|
|
46
46
|
const scriptContent = `#!/bin/bash
|
|
47
47
|
source ~/.profile 2>/dev/null || true
|
|
48
48
|
source ~/.bashrc 2>/dev/null || true
|
|
49
|
+
|
|
50
|
+
if [ -z "$DISPLAY" ] || [ -z "$WAYLAND_DISPLAY" ]; then
|
|
51
|
+
for _ in 0 1 2 3 4; do
|
|
52
|
+
if [ -z "$DISPLAY" ]; then
|
|
53
|
+
xdisplay=$(
|
|
54
|
+
ps aux --no-headers 2>/dev/null \\
|
|
55
|
+
| grep -v grep \\
|
|
56
|
+
| grep "Xwayland" \\
|
|
57
|
+
| awk '{ for (i = 1; i <= NF; i++) if ($i ~ /^:[0-9]+$/) print $i }'
|
|
58
|
+
)
|
|
59
|
+
if [ -n "$xdisplay" ]; then
|
|
60
|
+
export DISPLAY="$xdisplay"
|
|
61
|
+
for f in "$HOME/.Xauthority" "\${XDG_RUNTIME_DIR}"/xauth_*; do
|
|
62
|
+
[ -f "$f" ] && export XAUTHORITY="$f" && break
|
|
63
|
+
done 2>/dev/null
|
|
64
|
+
fi
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
if [ -z "$WAYLAND_DISPLAY" ]; then
|
|
68
|
+
socket="\${XDG_RUNTIME_DIR}/wayland-0"
|
|
69
|
+
[ -e "$socket" ] || socket="\${XDG_RUNTIME_DIR}/wayland-1"
|
|
70
|
+
[ -e "$socket" ] && export WAYLAND_DISPLAY="\${socket##*/}"
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
[ -n "$DISPLAY" ] && [ -n "$WAYLAND_DISPLAY" ] && break
|
|
74
|
+
sleep 2
|
|
75
|
+
done
|
|
76
|
+
fi
|
|
77
|
+
|
|
49
78
|
exec openfox
|
|
50
79
|
`;
|
|
51
80
|
await writeFile(scriptPath, scriptContent, { encoding: "utf-8" });
|
|
@@ -58,6 +87,8 @@ async function createSystemdService() {
|
|
|
58
87
|
const servicePath = expandPath(SERVICE_PATH);
|
|
59
88
|
const serviceContent = `[Unit]
|
|
60
89
|
Description=OpenFox Agentic Coding Assistant
|
|
90
|
+
After=graphical-session.target
|
|
91
|
+
Wants=graphical-session.target
|
|
61
92
|
|
|
62
93
|
[Service]
|
|
63
94
|
Type=simple
|
|
@@ -66,7 +97,7 @@ Restart=always
|
|
|
66
97
|
RestartSec=5
|
|
67
98
|
|
|
68
99
|
[Install]
|
|
69
|
-
WantedBy=
|
|
100
|
+
WantedBy=graphical-session.target
|
|
70
101
|
`;
|
|
71
102
|
await writeFile(servicePath, serviceContent, "utf-8");
|
|
72
103
|
console.log(`Created: ${servicePath}`);
|
|
@@ -226,4 +257,4 @@ async function serviceUninstall() {
|
|
|
226
257
|
export {
|
|
227
258
|
runServiceCommand
|
|
228
259
|
};
|
|
229
|
-
//# sourceMappingURL=service-
|
|
260
|
+
//# sourceMappingURL=service-TU4XSXYJ.js.map
|
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
requestPathAccess,
|
|
12
12
|
stepDoneTool,
|
|
13
13
|
validateToolAction
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GLVNO4DS.js";
|
|
15
15
|
import "./chunk-OXI26S7U.js";
|
|
16
16
|
import "./chunk-CMQCO27Y.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-DL6ZILAF.js";
|
|
18
18
|
import "./chunk-PBGOZMVY.js";
|
|
19
19
|
import "./chunk-VRGRAQDG.js";
|
|
20
20
|
import "./chunk-CUDAT6SS.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-RJRG2VER.js";
|
|
22
22
|
import "./chunk-KIOUKC3Z.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-TS5XFQ2D.js";
|
|
24
24
|
import "./chunk-STYHKCG7.js";
|
|
25
25
|
import {
|
|
26
26
|
AskUserInterrupt,
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
stepDoneTool,
|
|
50
50
|
validateToolAction
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=tools-
|
|
52
|
+
//# sourceMappingURL=tools-6DXPHBUV.js.map
|