openfox 1.6.78 → 1.6.80
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-AN3U2AD5.js → auto-compaction-Q3GRX7T5.js} +4 -4
- package/dist/{chat-handler-AIBOSHAQ.js → chat-handler-PO5OBBJE.js} +12 -9
- package/dist/{chunk-GLVNO4DS.js → chunk-7DOKXSMI.js} +47 -24
- package/dist/{chunk-2IZMUXMP.js → chunk-A5W6JUYZ.js} +3 -3
- package/dist/{chunk-VSYJIPRI.js → chunk-GFLXCEZA.js} +2 -2
- package/dist/{chunk-NWXLRRDD.js → chunk-HPTMW2FT.js} +3 -3
- package/dist/{chunk-RJRG2VER.js → chunk-LHKXWUEK.js} +7 -1
- package/dist/{chunk-STYHKCG7.js → chunk-UF6D2IPO.js} +25 -1
- package/dist/{chunk-DKKDNJT7.js → chunk-YLLWWYDA.js} +135 -80
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{events-ND5GZBT2.js → events-QDUOJQML.js} +2 -2
- package/dist/{orchestrator-5BY2MH72.js → orchestrator-LVD4YU54.js} +5 -5
- package/dist/package.json +1 -1
- package/dist/permissions-Z2IIV2V7.js +109 -0
- package/dist/{processor-PV446N55.js → processor-SAS6Z2XZ.js} +23 -16
- package/dist/project-creator-GPOIXKX4.js +111 -0
- package/dist/{protocol-4CTV7OZC.js → protocol-IXFNYZEX.js} +2 -2
- package/dist/{serve-6ME66XOO.js → serve-U5FU7YWD.js} +6 -6
- package/dist/server/index.js +5 -5
- package/dist/{tools-6DXPHBUV.js → tools-B4KSCOWC.js} +4 -4
- package/dist/web/assets/{index-0igqGWob.js → index-DuIE79t4.js} +55 -53
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/project-creator-VD7MLOWE.js +0 -65
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
maybeAutoCompactContext,
|
|
3
3
|
performManualContextCompaction,
|
|
4
4
|
resolveCompactionStatsIdentity
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7DOKXSMI.js";
|
|
6
6
|
import "./chunk-OXI26S7U.js";
|
|
7
7
|
import "./chunk-CMQCO27Y.js";
|
|
8
8
|
import "./chunk-DL6ZILAF.js";
|
|
9
9
|
import "./chunk-PBGOZMVY.js";
|
|
10
10
|
import "./chunk-VRGRAQDG.js";
|
|
11
11
|
import "./chunk-CUDAT6SS.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-LHKXWUEK.js";
|
|
13
13
|
import "./chunk-KIOUKC3Z.js";
|
|
14
14
|
import "./chunk-TS5XFQ2D.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-UF6D2IPO.js";
|
|
16
16
|
import "./chunk-BJYPTN5S.js";
|
|
17
17
|
import "./chunk-NDJ6FKSP.js";
|
|
18
18
|
import "./chunk-CQGTEGKL.js";
|
|
@@ -24,4 +24,4 @@ export {
|
|
|
24
24
|
performManualContextCompaction,
|
|
25
25
|
resolveCompactionStatsIdentity
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=auto-compaction-
|
|
27
|
+
//# sourceMappingURL=auto-compaction-Q3GRX7T5.js.map
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
generateSessionName,
|
|
6
6
|
getSessionMessageCount,
|
|
7
7
|
needsNameGenerationCheck
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-A5W6JUYZ.js";
|
|
9
9
|
import {
|
|
10
10
|
runChatTurn
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-HPTMW2FT.js";
|
|
12
|
+
import "./chunk-7DOKXSMI.js";
|
|
13
13
|
import "./chunk-OXI26S7U.js";
|
|
14
14
|
import "./chunk-CMQCO27Y.js";
|
|
15
15
|
import "./chunk-DL6ZILAF.js";
|
|
@@ -18,14 +18,14 @@ import "./chunk-VRGRAQDG.js";
|
|
|
18
18
|
import "./chunk-CUDAT6SS.js";
|
|
19
19
|
import {
|
|
20
20
|
getEventStore
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-LHKXWUEK.js";
|
|
22
22
|
import "./chunk-KIOUKC3Z.js";
|
|
23
23
|
import "./chunk-TS5XFQ2D.js";
|
|
24
24
|
import {
|
|
25
25
|
createChatMessageMessage,
|
|
26
26
|
createPhaseChangedMessage,
|
|
27
27
|
createSessionRunningMessage
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-UF6D2IPO.js";
|
|
29
29
|
import "./chunk-BJYPTN5S.js";
|
|
30
30
|
import "./chunk-NDJ6FKSP.js";
|
|
31
31
|
import "./chunk-CQGTEGKL.js";
|
|
@@ -61,7 +61,7 @@ async function startChatSession(sessionId, content, deps, options) {
|
|
|
61
61
|
sessionManager.setRunning(sessionId, true);
|
|
62
62
|
broadcastForSession(sessionId, createSessionRunningMessage(true));
|
|
63
63
|
try {
|
|
64
|
-
const { maybeAutoCompactContext } = await import("./auto-compaction-
|
|
64
|
+
const { maybeAutoCompactContext } = await import("./auto-compaction-Q3GRX7T5.js");
|
|
65
65
|
await maybeAutoCompactContext({
|
|
66
66
|
sessionManager,
|
|
67
67
|
sessionId,
|
|
@@ -113,8 +113,11 @@ async function startChatSession(sessionId, content, deps, options) {
|
|
|
113
113
|
if (activeAgents.get(sessionId) === controller) {
|
|
114
114
|
activeAgents.delete(sessionId);
|
|
115
115
|
}
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
try {
|
|
117
|
+
sessionManager.setRunning(sessionId, false);
|
|
118
|
+
broadcastForSession(sessionId, createSessionRunningMessage(false));
|
|
119
|
+
} catch {
|
|
120
|
+
}
|
|
118
121
|
finalizeTurnCompletion(sessionId, sessionManager, broadcastForSession);
|
|
119
122
|
throw error;
|
|
120
123
|
}
|
|
@@ -172,4 +175,4 @@ export {
|
|
|
172
175
|
startChatSession,
|
|
173
176
|
stopSessionExecution
|
|
174
177
|
};
|
|
175
|
-
//# sourceMappingURL=chat-handler-
|
|
178
|
+
//# sourceMappingURL=chat-handler-PO5OBBJE.js.map
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
getCurrentContextWindowId,
|
|
34
34
|
getEventStore
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-LHKXWUEK.js";
|
|
36
36
|
import {
|
|
37
37
|
buildContextMessagesFromEventHistory,
|
|
38
38
|
foldContextState,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
createChatToolOutputMessage,
|
|
51
51
|
createChatVisionFallbackMessage,
|
|
52
52
|
createQueueStateMessage
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-UF6D2IPO.js";
|
|
54
54
|
import {
|
|
55
55
|
AskUserInterrupt,
|
|
56
56
|
askUserTool
|
|
@@ -2946,12 +2946,17 @@ async function executeToolBatch(assistantMsgId, toolCalls, ctx) {
|
|
|
2946
2946
|
let criteriaChanged = false;
|
|
2947
2947
|
let returnValueContent;
|
|
2948
2948
|
let returnValueResult;
|
|
2949
|
-
|
|
2949
|
+
const session = ctx.sessionManager.requireSession(ctx.sessionId);
|
|
2950
|
+
if (ctx.signal?.aborted) {
|
|
2951
|
+
throw new Error("Aborted");
|
|
2952
|
+
}
|
|
2950
2953
|
for (const toolCall of toolCalls) {
|
|
2954
|
+
eventStore.append(ctx.sessionId, createToolCallEvent(assistantMsgId, toolCall));
|
|
2955
|
+
}
|
|
2956
|
+
const executeTool = async (toolCall, index) => {
|
|
2951
2957
|
if (ctx.signal?.aborted) {
|
|
2952
2958
|
throw new Error("Aborted");
|
|
2953
2959
|
}
|
|
2954
|
-
eventStore.append(ctx.sessionId, createToolCallEvent(assistantMsgId, toolCall));
|
|
2955
2960
|
if (toolCall.parseError) {
|
|
2956
2961
|
const toolResult2 = {
|
|
2957
2962
|
success: false,
|
|
@@ -2961,13 +2966,12 @@ async function executeToolBatch(assistantMsgId, toolCalls, ctx) {
|
|
|
2961
2966
|
};
|
|
2962
2967
|
ctx.turnMetrics.addToolTime(toolResult2.durationMs);
|
|
2963
2968
|
eventStore.append(ctx.sessionId, createToolResultEvent(assistantMsgId, toolCall.id, toolResult2));
|
|
2964
|
-
|
|
2965
|
-
|
|
2969
|
+
return {
|
|
2970
|
+
toolCall,
|
|
2971
|
+
toolResult: toolResult2,
|
|
2966
2972
|
content: `Error: ${toolResult2.error}`,
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
});
|
|
2970
|
-
continue;
|
|
2973
|
+
index
|
|
2974
|
+
};
|
|
2971
2975
|
}
|
|
2972
2976
|
const onProgress = ctx.onMessage ? createToolProgressHandler(assistantMsgId, toolCall.id, ctx.onMessage) : void 0;
|
|
2973
2977
|
const toolContext = {
|
|
@@ -3024,22 +3028,32 @@ async function executeToolBatch(assistantMsgId, toolCalls, ctx) {
|
|
|
3024
3028
|
returnValueContent = toolCall.arguments["content"];
|
|
3025
3029
|
returnValueResult = toolCall.arguments["result"];
|
|
3026
3030
|
}
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
content: stripAnsi(
|
|
3030
|
-
toolResult.success ? toolResult.output ?? "Success" : toolResult.output ? `${toolResult.output}
|
|
3031
|
+
const content = stripAnsi(
|
|
3032
|
+
toolResult.success ? toolResult.output ?? "Success" : toolResult.output ? `${toolResult.output}
|
|
3031
3033
|
|
|
3032
3034
|
Error: ${toolResult.error}` : `Error: ${toolResult.error}`
|
|
3033
|
-
|
|
3035
|
+
);
|
|
3036
|
+
return {
|
|
3037
|
+
toolCall,
|
|
3038
|
+
toolResult,
|
|
3039
|
+
content,
|
|
3040
|
+
index
|
|
3041
|
+
};
|
|
3042
|
+
};
|
|
3043
|
+
const executionPromises = toolCalls.map((toolCall, index) => executeTool(toolCall, index));
|
|
3044
|
+
const results = await Promise.all(executionPromises);
|
|
3045
|
+
for (const result of results) {
|
|
3046
|
+
toolMessages.push({
|
|
3047
|
+
role: "tool",
|
|
3048
|
+
content: result.content,
|
|
3034
3049
|
source: "history",
|
|
3035
|
-
toolCallId: toolCall.id
|
|
3050
|
+
toolCallId: result.toolCall.id
|
|
3036
3051
|
});
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
}
|
|
3052
|
+
}
|
|
3053
|
+
const updatedSession = ctx.sessionManager.requireSession(ctx.sessionId);
|
|
3054
|
+
if (JSON.stringify(updatedSession.criteria) !== JSON.stringify(session.criteria)) {
|
|
3055
|
+
eventStore.append(ctx.sessionId, { type: "criteria.set", data: { criteria: updatedSession.criteria } });
|
|
3056
|
+
criteriaChanged = true;
|
|
3043
3057
|
}
|
|
3044
3058
|
return { toolMessages, criteriaChanged, returnValueContent, returnValueResult };
|
|
3045
3059
|
}
|
|
@@ -3250,6 +3264,15 @@ async function runTopLevelAgentLoop(config, turnMetrics) {
|
|
|
3250
3264
|
})
|
|
3251
3265
|
);
|
|
3252
3266
|
eventStore.append(sessionId, { type: "message.done", data: { messageId: asapMsgId } });
|
|
3267
|
+
const message = {
|
|
3268
|
+
id: asapMsgId,
|
|
3269
|
+
role: "user",
|
|
3270
|
+
content: asap.content,
|
|
3271
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3272
|
+
...asap.attachments ? { attachments: asap.attachments } : {}
|
|
3273
|
+
};
|
|
3274
|
+
onMessage?.(createChatMessageMessage(message));
|
|
3275
|
+
onMessage?.(createChatDoneMessage(asapMsgId, "complete"));
|
|
3253
3276
|
}
|
|
3254
3277
|
if (asapMessages.length > 0) {
|
|
3255
3278
|
onMessage?.(createQueueStateMessage(sessionManager.getQueueState(sessionId)));
|
|
@@ -3675,7 +3698,7 @@ var callSubAgentTool = {
|
|
|
3675
3698
|
};
|
|
3676
3699
|
}
|
|
3677
3700
|
try {
|
|
3678
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3701
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-B4KSCOWC.js");
|
|
3679
3702
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3680
3703
|
const turnMetrics = new TurnMetrics();
|
|
3681
3704
|
const result = await executeSubAgent({
|
|
@@ -4864,4 +4887,4 @@ export {
|
|
|
4864
4887
|
getToolRegistryForAgent,
|
|
4865
4888
|
createToolRegistry
|
|
4866
4889
|
};
|
|
4867
|
-
//# sourceMappingURL=chunk-
|
|
4890
|
+
//# sourceMappingURL=chunk-7DOKXSMI.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getEventStore,
|
|
3
3
|
updateSessionMetadata
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LHKXWUEK.js";
|
|
5
5
|
import {
|
|
6
6
|
buildMessagesFromStoredEvents,
|
|
7
7
|
foldPendingConfirmations
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
createContextStateMessage,
|
|
11
11
|
createSessionStateMessage
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UF6D2IPO.js";
|
|
13
13
|
import {
|
|
14
14
|
logger
|
|
15
15
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -143,4 +143,4 @@ export {
|
|
|
143
143
|
needsNameGenerationCheck,
|
|
144
144
|
applyGeneratedSessionName
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-A5W6JUYZ.js.map
|
|
@@ -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-U5FU7YWD.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-GFLXCEZA.js.map
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
getToolRegistryForAgent,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
runTopLevelAgentLoop
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7DOKXSMI.js";
|
|
17
17
|
import {
|
|
18
18
|
getCurrentContextWindowId,
|
|
19
19
|
getEventStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-LHKXWUEK.js";
|
|
21
21
|
import {
|
|
22
22
|
buildSnapshotFromSessionState
|
|
23
23
|
} from "./chunk-TS5XFQ2D.js";
|
|
@@ -327,4 +327,4 @@ export {
|
|
|
327
327
|
runBuilderTurn,
|
|
328
328
|
runVerifierTurn
|
|
329
329
|
};
|
|
330
|
-
//# sourceMappingURL=chunk-
|
|
330
|
+
//# sourceMappingURL=chunk-HPTMW2FT.js.map
|
|
@@ -452,6 +452,12 @@ var EventStore = class {
|
|
|
452
452
|
return transaction();
|
|
453
453
|
} catch (error) {
|
|
454
454
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
455
|
+
const errnoError = error;
|
|
456
|
+
const isFkError = errnoError.code === "SQLITE_CONSTRAINT_FOREIGNKEY";
|
|
457
|
+
if (isFkError || err.message.includes("FOREIGN KEY constraint failed")) {
|
|
458
|
+
logger.debug("Session no longer exists during consolidation", { sessionId });
|
|
459
|
+
return null;
|
|
460
|
+
}
|
|
455
461
|
logger.error("Failed to consolidate session", { sessionId, error: err.message, stack: err.stack });
|
|
456
462
|
return null;
|
|
457
463
|
}
|
|
@@ -1252,4 +1258,4 @@ export {
|
|
|
1252
1258
|
compactContext,
|
|
1253
1259
|
getRecentUserPromptsForSession
|
|
1254
1260
|
};
|
|
1255
|
-
//# sourceMappingURL=chunk-
|
|
1261
|
+
//# sourceMappingURL=chunk-LHKXWUEK.js.map
|
|
@@ -226,6 +226,30 @@ function storedEventToServerMessage(event) {
|
|
|
226
226
|
const data = event.data;
|
|
227
227
|
return createServerMessage("task.completed", data);
|
|
228
228
|
}
|
|
229
|
+
case "session.initialized": {
|
|
230
|
+
const data = event.data;
|
|
231
|
+
const session = {
|
|
232
|
+
id: event.sessionId,
|
|
233
|
+
projectId: data.projectId,
|
|
234
|
+
workdir: data.workdir,
|
|
235
|
+
mode: "planner",
|
|
236
|
+
phase: "plan",
|
|
237
|
+
isRunning: false,
|
|
238
|
+
criteria: [],
|
|
239
|
+
summary: data.title || "Untitled Session",
|
|
240
|
+
metadata: {
|
|
241
|
+
totalTokensUsed: 0,
|
|
242
|
+
totalToolCalls: 0,
|
|
243
|
+
iterationCount: 0
|
|
244
|
+
},
|
|
245
|
+
createdAt: new Date(event.timestamp).toISOString(),
|
|
246
|
+
updatedAt: new Date(event.timestamp).toISOString(),
|
|
247
|
+
messages: [],
|
|
248
|
+
contextWindows: [],
|
|
249
|
+
executionState: null
|
|
250
|
+
};
|
|
251
|
+
return createSessionStateMessage(session, [], []);
|
|
252
|
+
}
|
|
229
253
|
case "mode.changed": {
|
|
230
254
|
const data = event.data;
|
|
231
255
|
return createModeChangedMessage(data.mode, data.auto, data.reason);
|
|
@@ -319,4 +343,4 @@ export {
|
|
|
319
343
|
createQueueStateMessage,
|
|
320
344
|
storedEventToServerMessage
|
|
321
345
|
};
|
|
322
|
-
//# sourceMappingURL=chunk-
|
|
346
|
+
//# sourceMappingURL=chunk-UF6D2IPO.js.map
|