openfox 2.0.74 → 2.0.76
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/README.md +5 -2
- package/dist/{chat-handler-ETKFIHUO.js → chat-handler-3BZ4PDL2.js} +17 -16
- package/dist/chunk-46RORSKU.js +495 -0
- package/dist/{chunk-S7O77CVO.js → chunk-4QHDQP2N.js} +2 -2
- package/dist/{chunk-YD6NDTKF.js → chunk-5GOOSZX7.js} +1 -1
- package/dist/{chunk-XWBNYU2L.js → chunk-7772ENZN.js} +4 -3
- package/dist/{chunk-I4RWK2L2.js → chunk-7QXRQ5ZL.js} +3 -3
- package/dist/{chunk-2VBETAU2.js → chunk-D6CI2B7B.js} +111 -539
- package/dist/{chunk-E5LLEO3C.js → chunk-DH3SSBZN.js} +2 -2
- package/dist/{chunk-CHPRGEY5.js → chunk-HAQV6AJP.js} +3 -3
- package/dist/{chunk-R6L2QXQ5.js → chunk-HHUIXHHX.js} +16 -6
- package/dist/{chunk-ZRQDCQ7R.js → chunk-HLHGNHMV.js} +10 -8
- package/dist/{chunk-QFR6JF32.js → chunk-J7VCI5EX.js} +205 -82
- package/dist/chunk-KQEVAO2Q.js +7 -0
- package/dist/{chunk-UN26GIQG.js → chunk-KVRSAC4Z.js} +1 -1
- package/dist/{chunk-UV3EMWL4.js → chunk-LXFLRM7M.js} +2 -2
- package/dist/{chunk-6XKM25OT.js → chunk-NGJ5XJ7D.js} +4 -4
- package/dist/{chunk-NOU2QIL5.js → chunk-O3NUNU4H.js} +5 -2
- package/dist/{chunk-PYB2UEC3.js → chunk-OBQPXUXI.js} +4 -4
- package/dist/{chunk-OHGQILRF.js → chunk-OCVRIPQP.js} +2 -2
- package/dist/{chunk-TMRFTWXP.js → chunk-OMWVB2XC.js} +38 -23
- package/dist/{chunk-6XOA2WPU.js → chunk-W4ZEG3LX.js} +5 -2
- package/dist/{chunk-2DCJERYX.js → chunk-XTK6E2QR.js} +4 -4
- package/dist/{chunk-QNKXZH3Z.js → chunk-YMFCFMMB.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-SC6X65GY.js → client-TDPQVBQ7.js} +2 -2
- package/dist/{compactor-4UKYWC5F.js → compactor-BB3YYVRP.js} +7 -7
- package/dist/{events-AEQ6GQXI.js → events-FLWRLM6V.js} +3 -3
- package/dist/{inspect-proxy-PHVZBZUO.js → inspect-proxy-JHZV34QR.js} +4 -4
- package/dist/install-CPOPMCSE.js +120 -0
- package/dist/{manager-24C2AXVF.js → manager-OPMCSYN2.js} +5 -5
- package/dist/{orchestrator-O2YAAZ3U.js → orchestrator-5IMCWX5P.js} +16 -15
- package/dist/package.json +1 -1
- package/dist/path-security-ZROWNL22.js +50 -0
- package/dist/{platform-XQ7BS3KQ.js → platform-QGXO3CNR.js} +4 -4
- package/dist/plugins-registry.json +6 -0
- package/dist/{processor-FKAS3K4L.js → processor-3R4GS6VB.js} +17 -16
- package/dist/{project-creator-FQRBN3RG.js → project-creator-C22J43BC.js} +3 -3
- package/dist/{projects-LHRNCUGW.js → projects-WSVINK2C.js} +3 -3
- package/dist/{protocol-4QFU7WAI.js → protocol-EWEVW65B.js} +3 -3
- package/dist/{protocol-DGQWVFcP.d.ts → protocol-Sr6Jr4ZS.d.ts} +5 -2
- package/dist/{provider-OJUCZ5RN.js → provider-G2YC2IC4.js} +3 -3
- package/dist/{provider-manager-MAKXSL6L.js → provider-manager-SQIELYLK.js} +3 -3
- package/dist/{serve-T5U6SLB7.js → serve-MXKMKZYY.js} +22 -21
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +21 -20
- package/dist/{server-T2YP3VT2.js → server-SPYFMFQE.js} +18 -17
- package/dist/{settings-PFXRYXZU.js → settings-7XDMSPIC.js} +3 -3
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/{tools-APW7MY4E.js → tools-JRCUWPJO.js} +20 -18
- package/dist/{update-FWO365SV.js → update-OXDQ75M7.js} +12 -3
- package/dist/{update-server-MYYQUNZX.js → update-server-4MTM7M5P.js} +2 -2
- package/dist/web/assets/{index-DZRcUhoE.css → index-BNVBxKnB.css} +1 -1
- package/dist/web/assets/{index-Xh2VHbZe.js → index-ghDkIdlf.js} +74 -74
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/plugins-registry.json +6 -0
- package/dist/chunk-3OZBPWHP.js +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDatabase
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7QXRQ5ZL.js";
|
|
4
4
|
|
|
5
5
|
// src/server/db/projects.ts
|
|
6
6
|
function createProject(name, workdir) {
|
|
@@ -117,4 +117,4 @@ export {
|
|
|
117
117
|
deleteProject,
|
|
118
118
|
toggleStar
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-LXFLRM7M.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getDatabase
|
|
3
|
+
} from "./chunk-7QXRQ5ZL.js";
|
|
1
4
|
import {
|
|
2
5
|
buildContextMessagesFromEventHistory,
|
|
3
6
|
buildMessagesFromStoredEvents,
|
|
@@ -6,9 +9,6 @@ import {
|
|
|
6
9
|
foldSessionState,
|
|
7
10
|
spreadOptionalMessageFields
|
|
8
11
|
} from "./chunk-DJASQ2ZB.js";
|
|
9
|
-
import {
|
|
10
|
-
getDatabase
|
|
11
|
-
} from "./chunk-I4RWK2L2.js";
|
|
12
12
|
import {
|
|
13
13
|
logger
|
|
14
14
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -1460,4 +1460,4 @@ export {
|
|
|
1460
1460
|
truncateSessionMessages,
|
|
1461
1461
|
getRecentUserPromptsForSession
|
|
1462
1462
|
};
|
|
1463
|
-
//# sourceMappingURL=chunk-
|
|
1463
|
+
//# sourceMappingURL=chunk-NGJ5XJ7D.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServerMessage,
|
|
3
3
|
isClientMessage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5GOOSZX7.js";
|
|
5
5
|
|
|
6
6
|
// src/server/ws/protocol.ts
|
|
7
7
|
function enrichMessagesWithToolResults(messages) {
|
|
@@ -294,6 +294,9 @@ function storedEventToServerMessage(event) {
|
|
|
294
294
|
const data = event.data;
|
|
295
295
|
return createChatFormatRetryMessage(data.attempt, data.maxAttempts, data.pattern, data.field, data.matchedContent);
|
|
296
296
|
}
|
|
297
|
+
case "path.confirmation_pending":
|
|
298
|
+
case "path.confirmation_responded":
|
|
299
|
+
return null;
|
|
297
300
|
case "turn.snapshot":
|
|
298
301
|
case "context.compacted":
|
|
299
302
|
return null;
|
|
@@ -340,4 +343,4 @@ export {
|
|
|
340
343
|
createQueueStateMessage,
|
|
341
344
|
storedEventToServerMessage
|
|
342
345
|
};
|
|
343
|
-
//# sourceMappingURL=chunk-
|
|
346
|
+
//# sourceMappingURL=chunk-O3NUNU4H.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getPlatformShell
|
|
3
|
+
} from "./chunk-4QHDQP2N.js";
|
|
1
4
|
import {
|
|
2
5
|
appendLog,
|
|
3
6
|
createProcess,
|
|
@@ -9,9 +12,6 @@ import {
|
|
|
9
12
|
startProcess,
|
|
10
13
|
updateStatus
|
|
11
14
|
} from "./chunk-I72ACQ6R.js";
|
|
12
|
-
import {
|
|
13
|
-
getPlatformShell
|
|
14
|
-
} from "./chunk-S7O77CVO.js";
|
|
15
15
|
|
|
16
16
|
// src/server/utils/shell.ts
|
|
17
17
|
import { spawn } from "child_process";
|
|
@@ -153,4 +153,4 @@ export {
|
|
|
153
153
|
getSessionProcesses2 as getSessionProcesses,
|
|
154
154
|
getProcessLogs
|
|
155
155
|
};
|
|
156
|
-
//# sourceMappingURL=chunk-
|
|
156
|
+
//# sourceMappingURL=chunk-OBQPXUXI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W4ZEG3LX.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelProfile
|
|
6
6
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -807,4 +807,4 @@ export {
|
|
|
807
807
|
parseDefaultModelSelection,
|
|
808
808
|
createProviderManager
|
|
809
809
|
};
|
|
810
|
-
//# sourceMappingURL=chunk-
|
|
810
|
+
//# sourceMappingURL=chunk-OCVRIPQP.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
computeSessionHash,
|
|
4
4
|
runAgentTurn,
|
|
5
5
|
runChatTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HLHGNHMV.js";
|
|
7
7
|
import {
|
|
8
8
|
deleteItemFromDir,
|
|
9
9
|
devServerManager,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
jsonSerializer,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
saveItemToDir
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-D6CI2B7B.js";
|
|
17
17
|
import {
|
|
18
18
|
gitSpawnEnv
|
|
19
19
|
} from "./chunk-WGMJCFCE.js";
|
|
@@ -23,16 +23,19 @@ import {
|
|
|
23
23
|
} from "./chunk-EU3WWTFH.js";
|
|
24
24
|
import {
|
|
25
25
|
appendCompactionPrompt
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HAQV6AJP.js";
|
|
27
27
|
import {
|
|
28
28
|
TurnMetrics,
|
|
29
29
|
createMessageStartEvent
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7772ENZN.js";
|
|
31
31
|
import {
|
|
32
32
|
checkAborted,
|
|
33
33
|
onProcessEvent,
|
|
34
34
|
spawnShellProcess
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-OBQPXUXI.js";
|
|
36
|
+
import {
|
|
37
|
+
getPlatformShell
|
|
38
|
+
} from "./chunk-4QHDQP2N.js";
|
|
36
39
|
import {
|
|
37
40
|
killProcessTree,
|
|
38
41
|
terminateProcessTree
|
|
@@ -41,7 +44,7 @@ import {
|
|
|
41
44
|
getCurrentContextWindowId,
|
|
42
45
|
getEventStore,
|
|
43
46
|
getRuntimeConfig
|
|
44
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-NGJ5XJ7D.js";
|
|
45
48
|
import {
|
|
46
49
|
buildMessagesFromStoredEvents,
|
|
47
50
|
foldPendingConfirmations
|
|
@@ -60,10 +63,7 @@ import {
|
|
|
60
63
|
parseClientMessage,
|
|
61
64
|
serializeServerMessage,
|
|
62
65
|
storedEventToServerMessage
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import {
|
|
65
|
-
getPlatformShell
|
|
66
|
-
} from "./chunk-S7O77CVO.js";
|
|
66
|
+
} from "./chunk-O3NUNU4H.js";
|
|
67
67
|
import {
|
|
68
68
|
logger
|
|
69
69
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
} from "./chunk-VUQCQXXJ.js";
|
|
73
73
|
import {
|
|
74
74
|
createServerMessage
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-5GOOSZX7.js";
|
|
76
76
|
import {
|
|
77
77
|
getGlobalConfigDir
|
|
78
78
|
} from "./chunk-CQGTEGKL.js";
|
|
@@ -1485,13 +1485,6 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
|
|
|
1485
1485
|
const isSubscribedToSession = (client, sessionId) => {
|
|
1486
1486
|
return client.activeSessionId === sessionId;
|
|
1487
1487
|
};
|
|
1488
|
-
const broadcastForSession = (sessionId, msg) => {
|
|
1489
|
-
for (const [clientWs, client] of clients) {
|
|
1490
|
-
if (isSubscribedToSession(client, sessionId) && clientWs.readyState === WebSocket2.OPEN) {
|
|
1491
|
-
clientWs.send(serializeServerMessage({ ...msg, sessionId }));
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
};
|
|
1495
1488
|
function enqueueSend(client, data, seq) {
|
|
1496
1489
|
if (client.sendQueue.length >= MAX_SEND_QUEUE_SIZE) {
|
|
1497
1490
|
logger.warn("WebSocket send queue full, dropping message", {
|
|
@@ -1598,6 +1591,30 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
|
|
|
1598
1591
|
}
|
|
1599
1592
|
}
|
|
1600
1593
|
};
|
|
1594
|
+
const broadcastForSession = (sessionId, msg) => {
|
|
1595
|
+
const session = sessionManager.getSession(sessionId);
|
|
1596
|
+
const projectId = session?.projectId;
|
|
1597
|
+
for (const [clientWs, client] of clients) {
|
|
1598
|
+
if (clientWs.readyState !== WebSocket2.OPEN) continue;
|
|
1599
|
+
if (!isSubscribedToSession(client, sessionId)) continue;
|
|
1600
|
+
const seq = client.lastSentSeq + 1;
|
|
1601
|
+
enqueueSend(client, serializeServerMessage({ ...msg, sessionId }), seq);
|
|
1602
|
+
}
|
|
1603
|
+
if (msg.type === "chat.path_confirmation" && projectId) {
|
|
1604
|
+
for (const [clientWs, client] of clients) {
|
|
1605
|
+
if (clientWs.readyState !== WebSocket2.OPEN) continue;
|
|
1606
|
+
if (isSubscribedToSession(client, sessionId)) continue;
|
|
1607
|
+
const clientProjectId = client.activeSessionId ? sessionManager.getSession(client.activeSessionId)?.projectId : void 0;
|
|
1608
|
+
if (clientProjectId !== projectId) continue;
|
|
1609
|
+
const seq = client.lastSentSeq + 1;
|
|
1610
|
+
enqueueSend(
|
|
1611
|
+
client,
|
|
1612
|
+
serializeServerMessage({ type: "session.confirmation_pending", sessionId, payload: msg.payload }),
|
|
1613
|
+
seq
|
|
1614
|
+
);
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
};
|
|
1601
1618
|
devServerManager.onOutput((workdir, chunk) => {
|
|
1602
1619
|
broadcastAll(
|
|
1603
1620
|
createServerMessage("devServer.output", {
|
|
@@ -1632,9 +1649,7 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
|
|
|
1632
1649
|
const prevWorkdir = client.activeWorkdir;
|
|
1633
1650
|
client.activeWorkdir = effectiveWorkdir;
|
|
1634
1651
|
if (prevWorkdir) {
|
|
1635
|
-
const hasOtherClients = [...clients.values()].some(
|
|
1636
|
-
(c) => c !== client && c.activeWorkdir === prevWorkdir
|
|
1637
|
-
);
|
|
1652
|
+
const hasOtherClients = [...clients.values()].some((c) => c !== client && c.activeWorkdir === prevWorkdir);
|
|
1638
1653
|
if (!hasOtherClients) {
|
|
1639
1654
|
moduleStopGitPolling(prevWorkdir);
|
|
1640
1655
|
}
|
|
@@ -2092,7 +2107,7 @@ ${content}` : workflowInfo;
|
|
|
2092
2107
|
}
|
|
2093
2108
|
} : {},
|
|
2094
2109
|
signal: controller.signal,
|
|
2095
|
-
onMessage: (msg) =>
|
|
2110
|
+
onMessage: (msg) => _broadcastForSession(sessionId, msg)
|
|
2096
2111
|
// For path confirmation dialogs
|
|
2097
2112
|
}).catch((error) => {
|
|
2098
2113
|
if (error instanceof Error && error.message === "Aborted") {
|
|
@@ -2179,4 +2194,4 @@ export {
|
|
|
2179
2194
|
signalMcpReady,
|
|
2180
2195
|
createWebSocketServer
|
|
2181
2196
|
};
|
|
2182
|
-
//# sourceMappingURL=chunk-
|
|
2197
|
+
//# sourceMappingURL=chunk-OMWVB2XC.js.map
|
|
@@ -94,7 +94,10 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
94
94
|
const content = message.content ?? "";
|
|
95
95
|
const thinkingContent = getThinking(message, thinkingField) ?? "";
|
|
96
96
|
const toolCalls = message.tool_calls?.map((tc) => {
|
|
97
|
-
const { arguments: args, parseError } = parseToolArguments(tc.function.arguments, {
|
|
97
|
+
const { arguments: args, parseError } = parseToolArguments(tc.function.arguments, {
|
|
98
|
+
id: tc.id,
|
|
99
|
+
name: tc.function.name
|
|
100
|
+
});
|
|
98
101
|
return { id: tc.id, name: tc.function.name, arguments: args, ...parseError ? { parseError } : {} };
|
|
99
102
|
});
|
|
100
103
|
return {
|
|
@@ -265,4 +268,4 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
265
268
|
export {
|
|
266
269
|
createLLMClient
|
|
267
270
|
};
|
|
268
|
-
//# sourceMappingURL=chunk-
|
|
271
|
+
//# sourceMappingURL=chunk-W4ZEG3LX.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getEventStore,
|
|
6
6
|
getRuntimeConfig,
|
|
7
7
|
updateSessionMetadata
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NGJ5XJ7D.js";
|
|
9
9
|
import {
|
|
10
10
|
buildMessagesFromStoredEvents,
|
|
11
11
|
foldPendingConfirmations
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
createContextStateMessage,
|
|
15
15
|
createSessionStateMessage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-O3NUNU4H.js";
|
|
17
17
|
import {
|
|
18
18
|
logger
|
|
19
19
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -135,7 +135,7 @@ async function generateSessionNameForSession(sessionId, userMessage, deps, signa
|
|
|
135
135
|
client = deps.getLLMClient();
|
|
136
136
|
client.setModel(providerConfig.model);
|
|
137
137
|
} else if (providerConfig) {
|
|
138
|
-
const { createLLMClient } = await import("./client-
|
|
138
|
+
const { createLLMClient } = await import("./client-TDPQVBQ7.js");
|
|
139
139
|
client = createLLMClient({
|
|
140
140
|
llm: {
|
|
141
141
|
baseUrl: providerConfig.baseUrl,
|
|
@@ -184,4 +184,4 @@ export {
|
|
|
184
184
|
buildRunChatTurnParams,
|
|
185
185
|
generateSessionNameForSession
|
|
186
186
|
};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-XTK6E2QR.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getDatabase
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7QXRQ5ZL.js";
|
|
4
4
|
|
|
5
5
|
// src/server/db/settings.ts
|
|
6
6
|
var SETTINGS_KEYS = {
|
|
@@ -101,4 +101,4 @@ export {
|
|
|
101
101
|
deleteSetting,
|
|
102
102
|
getAllSettings
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=chunk-
|
|
104
|
+
//# sourceMappingURL=chunk-YMFCFMMB.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W4ZEG3LX.js";
|
|
4
4
|
import "./chunk-V4IE7HJY.js";
|
|
5
5
|
import "./chunk-YHEQTVFV.js";
|
|
6
6
|
import "./chunk-HNCM3D7Y.js";
|
|
@@ -11,4 +11,4 @@ import "./chunk-5WRI5ZAA.js";
|
|
|
11
11
|
export {
|
|
12
12
|
createLLMClient
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=client-
|
|
14
|
+
//# sourceMappingURL=client-TDPQVBQ7.js.map
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
appendCompactionPrompt,
|
|
3
3
|
getCompactionTarget,
|
|
4
4
|
shouldCompact
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-HAQV6AJP.js";
|
|
6
|
+
import "./chunk-7772ENZN.js";
|
|
7
|
+
import "./chunk-4QHDQP2N.js";
|
|
8
|
+
import "./chunk-YMFCFMMB.js";
|
|
9
|
+
import "./chunk-NGJ5XJ7D.js";
|
|
10
|
+
import "./chunk-7QXRQ5ZL.js";
|
|
8
11
|
import "./chunk-DJASQ2ZB.js";
|
|
9
|
-
import "./chunk-S7O77CVO.js";
|
|
10
|
-
import "./chunk-QNKXZH3Z.js";
|
|
11
|
-
import "./chunk-I4RWK2L2.js";
|
|
12
12
|
import "./chunk-J2GP3J3X.js";
|
|
13
13
|
import "./chunk-V4IE7HJY.js";
|
|
14
14
|
import "./chunk-YHEQTVFV.js";
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
getCompactionTarget,
|
|
21
21
|
shouldCompact
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=compactor-
|
|
23
|
+
//# sourceMappingURL=compactor-BB3YYVRP.js.map
|
|
@@ -38,7 +38,8 @@ import {
|
|
|
38
38
|
isStoredEvent,
|
|
39
39
|
isTurnEvent,
|
|
40
40
|
truncateSessionMessages
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-NGJ5XJ7D.js";
|
|
42
|
+
import "./chunk-7QXRQ5ZL.js";
|
|
42
43
|
import {
|
|
43
44
|
buildContextMessagesFromEventHistory,
|
|
44
45
|
buildContextMessagesFromMessages,
|
|
@@ -56,7 +57,6 @@ import {
|
|
|
56
57
|
foldTurnEventsToSnapshotMessages,
|
|
57
58
|
getMessagesForWindow
|
|
58
59
|
} from "./chunk-DJASQ2ZB.js";
|
|
59
|
-
import "./chunk-I4RWK2L2.js";
|
|
60
60
|
import "./chunk-K44MW7JJ.js";
|
|
61
61
|
import "./chunk-5WRI5ZAA.js";
|
|
62
62
|
export {
|
|
@@ -115,4 +115,4 @@ export {
|
|
|
115
115
|
isTurnEvent,
|
|
116
116
|
truncateSessionMessages
|
|
117
117
|
};
|
|
118
|
-
//# sourceMappingURL=events-
|
|
118
|
+
//# sourceMappingURL=events-FLWRLM6V.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
startInspectProxy,
|
|
3
3
|
stopAllInspectProxies
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-DH3SSBZN.js";
|
|
5
|
+
import "./chunk-LXFLRM7M.js";
|
|
6
|
+
import "./chunk-7QXRQ5ZL.js";
|
|
7
7
|
import "./chunk-K44MW7JJ.js";
|
|
8
8
|
import "./chunk-5WRI5ZAA.js";
|
|
9
9
|
export {
|
|
10
10
|
startInspectProxy,
|
|
11
11
|
stopAllInspectProxies
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=inspect-proxy-
|
|
13
|
+
//# sourceMappingURL=inspect-proxy-JHZV34QR.js.map
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import "./chunk-5WRI5ZAA.js";
|
|
2
|
+
|
|
3
|
+
// src/cli/install.ts
|
|
4
|
+
import { spawnSync } from "child_process";
|
|
5
|
+
import { access, mkdir, readFile, writeFile } from "fs/promises";
|
|
6
|
+
import { dirname, join } from "path";
|
|
7
|
+
import { homedir } from "os";
|
|
8
|
+
function npmGlobalPrefix(platform) {
|
|
9
|
+
const windows = platform === "win32";
|
|
10
|
+
const result = spawnSync(windows ? "npm.cmd" : "npm", ["prefix", "-g"], {
|
|
11
|
+
encoding: "utf-8",
|
|
12
|
+
windowsHide: true
|
|
13
|
+
});
|
|
14
|
+
return result.status === 0 ? (result.stdout ?? "").trim() : "(unavailable)";
|
|
15
|
+
}
|
|
16
|
+
function getLauncherPath(env = {}) {
|
|
17
|
+
const platform = env.platform ?? process.platform;
|
|
18
|
+
const home = env.home ?? homedir();
|
|
19
|
+
if (platform === "win32") {
|
|
20
|
+
const base = env.localAppData ?? process.env["LOCALAPPDATA"] ?? join(home, "AppData", "Local");
|
|
21
|
+
return join(base, "OpenFox", "bin", "openfox.cmd");
|
|
22
|
+
}
|
|
23
|
+
return join(home, ".local", "bin", "openfox");
|
|
24
|
+
}
|
|
25
|
+
function quoteShell(value) {
|
|
26
|
+
return `'${value.replaceAll("'", `'\\''`)}'`;
|
|
27
|
+
}
|
|
28
|
+
function buildLauncher(platform, nodeExecutable, cliExecutable) {
|
|
29
|
+
if (platform === "win32") {
|
|
30
|
+
return `@echo off\r
|
|
31
|
+
"${nodeExecutable}" "${cliExecutable}" %*\r
|
|
32
|
+
`;
|
|
33
|
+
}
|
|
34
|
+
return `#!/bin/sh
|
|
35
|
+
exec ${quoteShell(nodeExecutable)} ${quoteShell(cliExecutable)} "$@"
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
38
|
+
function pathContains(directory, pathValue, platform) {
|
|
39
|
+
const normalize = (value) => platform === "win32" ? value.toLowerCase() : value;
|
|
40
|
+
const pathDelimiter = platform === "win32" ? ";" : ":";
|
|
41
|
+
return pathValue.split(pathDelimiter).filter(Boolean).some((entry) => normalize(entry.replace(/[\\/]$/, "")) === normalize(directory.replace(/[\\/]$/, "")));
|
|
42
|
+
}
|
|
43
|
+
async function fileExists(path) {
|
|
44
|
+
try {
|
|
45
|
+
await access(path);
|
|
46
|
+
return true;
|
|
47
|
+
} catch {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async function checkInstall(env = {}) {
|
|
52
|
+
const platform = env.platform ?? process.platform;
|
|
53
|
+
const launcherPath = getLauncherPath(env);
|
|
54
|
+
const launcherDirectory = dirname(launcherPath);
|
|
55
|
+
const nodeExecutable = env.nodeExecutable ?? process.execPath;
|
|
56
|
+
const cliExecutable = env.cliExecutable ?? process.argv[1] ?? "";
|
|
57
|
+
const launcherExists = await fileExists(launcherPath);
|
|
58
|
+
const expected = buildLauncher(platform, nodeExecutable, cliExecutable);
|
|
59
|
+
const launcherPersistent = launcherExists && await readFile(launcherPath, "utf-8") === expected;
|
|
60
|
+
return {
|
|
61
|
+
currentExecutable: cliExecutable,
|
|
62
|
+
nodeExecutable,
|
|
63
|
+
npmPrefix: env.npmPrefix ?? npmGlobalPrefix(platform),
|
|
64
|
+
launcherPath,
|
|
65
|
+
launcherDirectory,
|
|
66
|
+
launcherExists,
|
|
67
|
+
launcherPersistent,
|
|
68
|
+
directoryInPath: pathContains(launcherDirectory, env.path ?? process.env["PATH"] ?? "", platform)
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function printCheck(check) {
|
|
72
|
+
console.log("OpenFox CLI installation:");
|
|
73
|
+
console.log(` Current executable: ${check.currentExecutable}`);
|
|
74
|
+
console.log(` Node executable: ${check.nodeExecutable}`);
|
|
75
|
+
console.log(` npm global prefix: ${check.npmPrefix}`);
|
|
76
|
+
console.log(` Persistent launcher: ${check.launcherPath}`);
|
|
77
|
+
console.log(` Launcher exists: ${check.launcherExists ? "yes" : "no"}`);
|
|
78
|
+
console.log(` Launcher is current: ${check.launcherPersistent ? "yes" : "no"}`);
|
|
79
|
+
console.log(` Launcher directory in PATH: ${check.directoryInPath ? "yes" : "no"}`);
|
|
80
|
+
}
|
|
81
|
+
async function runInstall(options = {}) {
|
|
82
|
+
const env = options.env ?? {};
|
|
83
|
+
const platform = env.platform ?? process.platform;
|
|
84
|
+
if (options.check) {
|
|
85
|
+
printCheck(await checkInstall(env));
|
|
86
|
+
return 0;
|
|
87
|
+
}
|
|
88
|
+
const launcherPath = getLauncherPath(env);
|
|
89
|
+
const nodeExecutable = env.nodeExecutable ?? process.execPath;
|
|
90
|
+
const cliExecutable = env.cliExecutable ?? process.argv[1];
|
|
91
|
+
if (!cliExecutable) {
|
|
92
|
+
console.error("Unable to determine the OpenFox CLI executable path.");
|
|
93
|
+
return 1;
|
|
94
|
+
}
|
|
95
|
+
await mkdir(dirname(launcherPath), { recursive: true });
|
|
96
|
+
await writeFile(launcherPath, buildLauncher(platform, nodeExecutable, cliExecutable), {
|
|
97
|
+
mode: platform === "win32" ? void 0 : 493
|
|
98
|
+
});
|
|
99
|
+
const check = await checkInstall({ ...env, nodeExecutable, cliExecutable });
|
|
100
|
+
if (!options.quiet) {
|
|
101
|
+
console.log(`Persistent OpenFox launcher installed: ${launcherPath}`);
|
|
102
|
+
}
|
|
103
|
+
if (!check.directoryInPath) {
|
|
104
|
+
if (platform === "win32") {
|
|
105
|
+
console.log(`Add this directory to your user PATH:
|
|
106
|
+
${check.launcherDirectory}`);
|
|
107
|
+
} else {
|
|
108
|
+
console.log(`Add this line to your shell configuration:
|
|
109
|
+
export PATH="$HOME/.local/bin:$PATH"`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return 0;
|
|
113
|
+
}
|
|
114
|
+
export {
|
|
115
|
+
buildLauncher,
|
|
116
|
+
checkInstall,
|
|
117
|
+
getLauncherPath,
|
|
118
|
+
runInstall
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=install-CPOPMCSE.js.map
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
onProcessEvent,
|
|
7
7
|
startProcessCommand,
|
|
8
8
|
stopProcess
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OBQPXUXI.js";
|
|
10
|
+
import "./chunk-4QHDQP2N.js";
|
|
11
|
+
import "./chunk-YMFCFMMB.js";
|
|
10
12
|
import "./chunk-I72ACQ6R.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-QNKXZH3Z.js";
|
|
13
|
-
import "./chunk-I4RWK2L2.js";
|
|
13
|
+
import "./chunk-7QXRQ5ZL.js";
|
|
14
14
|
import "./chunk-K44MW7JJ.js";
|
|
15
15
|
import "./chunk-5WRI5ZAA.js";
|
|
16
16
|
export {
|
|
@@ -22,4 +22,4 @@ export {
|
|
|
22
22
|
startProcessCommand,
|
|
23
23
|
stopProcess
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=manager-
|
|
25
|
+
//# sourceMappingURL=manager-OPMCSYN2.js.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runAgentTurn,
|
|
3
3
|
runChatTurn
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-HLHGNHMV.js";
|
|
5
|
+
import "./chunk-D6CI2B7B.js";
|
|
6
|
+
import "./chunk-NWO6GRYE.js";
|
|
7
|
+
import "./chunk-KVRSAC4Z.js";
|
|
6
8
|
import "./chunk-MF3UW36X.js";
|
|
7
9
|
import "./chunk-WGMJCFCE.js";
|
|
8
10
|
import "./chunk-EU3WWTFH.js";
|
|
@@ -13,25 +15,24 @@ import {
|
|
|
13
15
|
createMessageStartEvent,
|
|
14
16
|
createToolCallEvent,
|
|
15
17
|
createToolResultEvent
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-7772ENZN.js";
|
|
19
|
+
import "./chunk-DH3SSBZN.js";
|
|
20
|
+
import "./chunk-LXFLRM7M.js";
|
|
21
|
+
import "./chunk-OBQPXUXI.js";
|
|
22
|
+
import "./chunk-4QHDQP2N.js";
|
|
23
|
+
import "./chunk-YMFCFMMB.js";
|
|
20
24
|
import "./chunk-I72ACQ6R.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-46RORSKU.js";
|
|
26
|
+
import "./chunk-NGJ5XJ7D.js";
|
|
27
|
+
import "./chunk-7QXRQ5ZL.js";
|
|
24
28
|
import "./chunk-DJASQ2ZB.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-S7O77CVO.js";
|
|
27
|
-
import "./chunk-QNKXZH3Z.js";
|
|
28
|
-
import "./chunk-I4RWK2L2.js";
|
|
29
|
+
import "./chunk-O3NUNU4H.js";
|
|
29
30
|
import "./chunk-J2GP3J3X.js";
|
|
30
31
|
import "./chunk-V4IE7HJY.js";
|
|
31
32
|
import "./chunk-YHEQTVFV.js";
|
|
32
33
|
import "./chunk-EZK7CGJ7.js";
|
|
33
34
|
import "./chunk-K44MW7JJ.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-5GOOSZX7.js";
|
|
35
36
|
import "./chunk-WGAAQASA.js";
|
|
36
37
|
import "./chunk-CQGTEGKL.js";
|
|
37
38
|
import "./chunk-5WRI5ZAA.js";
|
|
@@ -45,4 +46,4 @@ export {
|
|
|
45
46
|
runAgentTurn,
|
|
46
47
|
runChatTurn
|
|
47
48
|
};
|
|
48
|
-
//# sourceMappingURL=orchestrator-
|
|
49
|
+
//# sourceMappingURL=orchestrator-5IMCWX5P.js.map
|
package/dist/package.json
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PathAccessDeniedError,
|
|
3
|
+
addAllowedPath,
|
|
4
|
+
addAllowedPaths,
|
|
5
|
+
cancelPathConfirmation,
|
|
6
|
+
cancelPathConfirmationsForSession,
|
|
7
|
+
checkPathsAccess,
|
|
8
|
+
clearAllowedPaths,
|
|
9
|
+
extractAbsolutePathsFromCommand,
|
|
10
|
+
extractDangerousPatterns,
|
|
11
|
+
extractGitNoVerify,
|
|
12
|
+
extractSensitivePathsFromCommand,
|
|
13
|
+
getPendingConfirmationsBySession,
|
|
14
|
+
hasPendingPathConfirmation,
|
|
15
|
+
isPathAllowed,
|
|
16
|
+
isPathWithinSandbox,
|
|
17
|
+
isSensitivePath,
|
|
18
|
+
providePathConfirmation,
|
|
19
|
+
registerPathConfirmation,
|
|
20
|
+
requestPathAccess
|
|
21
|
+
} from "./chunk-46RORSKU.js";
|
|
22
|
+
import "./chunk-NGJ5XJ7D.js";
|
|
23
|
+
import "./chunk-7QXRQ5ZL.js";
|
|
24
|
+
import "./chunk-DJASQ2ZB.js";
|
|
25
|
+
import "./chunk-O3NUNU4H.js";
|
|
26
|
+
import "./chunk-K44MW7JJ.js";
|
|
27
|
+
import "./chunk-5GOOSZX7.js";
|
|
28
|
+
import "./chunk-5WRI5ZAA.js";
|
|
29
|
+
export {
|
|
30
|
+
PathAccessDeniedError,
|
|
31
|
+
addAllowedPath,
|
|
32
|
+
addAllowedPaths,
|
|
33
|
+
cancelPathConfirmation,
|
|
34
|
+
cancelPathConfirmationsForSession,
|
|
35
|
+
checkPathsAccess,
|
|
36
|
+
clearAllowedPaths,
|
|
37
|
+
extractAbsolutePathsFromCommand,
|
|
38
|
+
extractDangerousPatterns,
|
|
39
|
+
extractGitNoVerify,
|
|
40
|
+
extractSensitivePathsFromCommand,
|
|
41
|
+
getPendingConfirmationsBySession,
|
|
42
|
+
hasPendingPathConfirmation,
|
|
43
|
+
isPathAllowed,
|
|
44
|
+
isPathWithinSandbox,
|
|
45
|
+
isSensitivePath,
|
|
46
|
+
providePathConfirmation,
|
|
47
|
+
registerPathConfirmation,
|
|
48
|
+
requestPathAccess
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=path-security-ZROWNL22.js.map
|