openfox 1.0.4 → 1.0.6
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-Z7YRAINH.js → auto-compaction-7RNWXTRQ.js} +4 -4
- package/dist/{chat-handler-OK33JXYI.js → chat-handler-ZBY3GCFF.js} +6 -6
- package/dist/{chunk-Z4UOHDMH.js → chunk-AOHPSZIW.js} +4 -4
- package/dist/{chunk-7OLTTWZA.js → chunk-CUXZUI2X.js} +3 -3
- package/dist/{chunk-BU2ZYOEA.js → chunk-NW7PIZH3.js} +2 -2
- package/dist/{chunk-XW7ZZ6II.js → chunk-UYFFQTLV.js} +21 -21
- package/dist/{chunk-2KSCZSXQ.js → chunk-WQ4W5H6A.js} +1 -1
- package/dist/{chunk-RXCMW36N.js → chunk-ZGPWTTOV.js} +2 -2
- package/dist/cli/dev.js +4 -1
- package/dist/cli/index.js +1 -1
- package/dist/{events-G6CKHDNZ.js → events-B7S4U4DB.js} +3 -3
- package/dist/{folding-O52L65VN.js → folding-NZYOXNKK.js} +2 -2
- package/dist/{orchestrator-SMCH5J5W.js → orchestrator-NH3BO64D.js} +5 -5
- package/dist/package.json +1 -1
- package/dist/{processor-2I3OUWQP.js → processor-W55O5T6T.js} +4 -4
- package/dist/project-creator-HY32FPFV.js +62 -0
- package/dist/{serve-ZWAGBN35.js → serve-X5CLO7YU.js} +13 -29
- package/dist/server/index.js +5 -5
- package/dist/{tools-OP64GRLP.js → tools-EGSJDCYX.js} +4 -4
- package/package.json +1 -1
- package/dist/project-creator-KAQXMZCT.js +0 -70
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
maybeAutoCompactContext,
|
|
3
3
|
performManualContextCompaction,
|
|
4
4
|
resolveCompactionStatsIdentity
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-CUXZUI2X.js";
|
|
6
|
+
import "./chunk-NW7PIZH3.js";
|
|
7
|
+
import "./chunk-WQ4W5H6A.js";
|
|
8
8
|
import "./chunk-S4QKTRGJ.js";
|
|
9
9
|
import "./chunk-22CTURMH.js";
|
|
10
10
|
import "./chunk-7IOZFJBW.js";
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
performManualContextCompaction,
|
|
21
21
|
resolveCompactionStatsIdentity
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=auto-compaction-
|
|
23
|
+
//# sourceMappingURL=auto-compaction-7RNWXTRQ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runChatTurn
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-AOHPSZIW.js";
|
|
4
|
+
import "./chunk-CUXZUI2X.js";
|
|
5
5
|
import {
|
|
6
6
|
generateSessionName,
|
|
7
7
|
needsNameGeneration
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
getEventStore,
|
|
11
11
|
updateSessionMetadata
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-NW7PIZH3.js";
|
|
13
13
|
import {
|
|
14
14
|
buildMessagesFromStoredEvents,
|
|
15
15
|
foldPendingConfirmations
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WQ4W5H6A.js";
|
|
17
17
|
import {
|
|
18
18
|
createChatMessageMessage,
|
|
19
19
|
createContextStateMessage,
|
|
@@ -59,7 +59,7 @@ async function startChatSession(sessionId, content, deps, options) {
|
|
|
59
59
|
sessionManager.setRunning(sessionId, true);
|
|
60
60
|
broadcastForSession(sessionId, createSessionRunningMessage(true));
|
|
61
61
|
try {
|
|
62
|
-
const { maybeAutoCompactContext } = await import("./auto-compaction-
|
|
62
|
+
const { maybeAutoCompactContext } = await import("./auto-compaction-7RNWXTRQ.js");
|
|
63
63
|
await maybeAutoCompactContext({
|
|
64
64
|
sessionManager,
|
|
65
65
|
sessionId,
|
|
@@ -198,4 +198,4 @@ export {
|
|
|
198
198
|
startChatSession,
|
|
199
199
|
stopSessionExecution
|
|
200
200
|
};
|
|
201
|
-
//# sourceMappingURL=chat-handler-
|
|
201
|
+
//# sourceMappingURL=chat-handler-ZBY3GCFF.js.map
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
getToolRegistryForAgent,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
runTopLevelAgentLoop
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CUXZUI2X.js";
|
|
17
17
|
import {
|
|
18
18
|
getCurrentContextWindowId,
|
|
19
19
|
getEventStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-NW7PIZH3.js";
|
|
21
21
|
import {
|
|
22
22
|
buildSnapshotFromSessionState
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WQ4W5H6A.js";
|
|
24
24
|
import {
|
|
25
25
|
createChatMessageMessage
|
|
26
26
|
} from "./chunk-S4QKTRGJ.js";
|
|
@@ -311,4 +311,4 @@ export {
|
|
|
311
311
|
runBuilderTurn,
|
|
312
312
|
runVerifierTurn
|
|
313
313
|
};
|
|
314
|
-
//# sourceMappingURL=chunk-
|
|
314
|
+
//# sourceMappingURL=chunk-AOHPSZIW.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
getContextMessages,
|
|
3
3
|
getCurrentContextWindowId,
|
|
4
4
|
getEventStore
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NW7PIZH3.js";
|
|
6
6
|
import {
|
|
7
7
|
createChatMessageMessage,
|
|
8
8
|
createChatPathConfirmationMessage,
|
|
@@ -3472,7 +3472,7 @@ var callSubAgentTool = {
|
|
|
3472
3472
|
};
|
|
3473
3473
|
}
|
|
3474
3474
|
try {
|
|
3475
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3475
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-EGSJDCYX.js");
|
|
3476
3476
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3477
3477
|
const turnMetrics = new TurnMetrics();
|
|
3478
3478
|
const result = await executeSubAgent({
|
|
@@ -4480,4 +4480,4 @@ export {
|
|
|
4480
4480
|
getToolRegistryForAgent,
|
|
4481
4481
|
createToolRegistry
|
|
4482
4482
|
};
|
|
4483
|
-
//# sourceMappingURL=chunk-
|
|
4483
|
+
//# sourceMappingURL=chunk-CUXZUI2X.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
buildMessagesFromStoredEvents,
|
|
4
4
|
foldContextState,
|
|
5
5
|
foldSessionState
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WQ4W5H6A.js";
|
|
7
7
|
import {
|
|
8
8
|
getDatabase
|
|
9
9
|
} from "./chunk-3EHGGBWE.js";
|
|
@@ -1064,4 +1064,4 @@ export {
|
|
|
1064
1064
|
compactContext,
|
|
1065
1065
|
getRecentUserPromptsForSession
|
|
1066
1066
|
};
|
|
1067
|
-
//# sourceMappingURL=chunk-
|
|
1067
|
+
//# sourceMappingURL=chunk-NW7PIZH3.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createVerifierNudgeConfig,
|
|
3
3
|
runBuilderTurn,
|
|
4
4
|
runChatTurn
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AOHPSZIW.js";
|
|
6
6
|
import {
|
|
7
7
|
TurnMetrics,
|
|
8
8
|
agentExists,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
saveSkill,
|
|
41
41
|
setSkillEnabled,
|
|
42
42
|
skillExists
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-CUXZUI2X.js";
|
|
44
44
|
import {
|
|
45
45
|
generateSessionName,
|
|
46
46
|
needsNameGeneration
|
|
@@ -73,12 +73,12 @@ import {
|
|
|
73
73
|
updateSessionMetadata,
|
|
74
74
|
updateSessionProvider,
|
|
75
75
|
updateSessionSummary
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-NW7PIZH3.js";
|
|
77
77
|
import {
|
|
78
78
|
buildContextMessagesFromEventHistory,
|
|
79
79
|
buildMessagesFromStoredEvents,
|
|
80
80
|
foldPendingConfirmations
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-WQ4W5H6A.js";
|
|
82
82
|
import {
|
|
83
83
|
createChatErrorMessage,
|
|
84
84
|
createChatMessageMessage,
|
|
@@ -5454,7 +5454,7 @@ async function createServerHandle(config) {
|
|
|
5454
5454
|
if (!name || !workdir) {
|
|
5455
5455
|
return res.status(400).json({ error: "name and workdir are required" });
|
|
5456
5456
|
}
|
|
5457
|
-
const { createDirectoryWithGit } = await import("./project-creator-
|
|
5457
|
+
const { createDirectoryWithGit } = await import("./project-creator-HY32FPFV.js");
|
|
5458
5458
|
const project = await createDirectoryWithGit(name, workdir);
|
|
5459
5459
|
res.status(201).json({ project });
|
|
5460
5460
|
});
|
|
@@ -5488,7 +5488,7 @@ async function createServerHandle(config) {
|
|
|
5488
5488
|
res.json({ success: true });
|
|
5489
5489
|
});
|
|
5490
5490
|
app.get("/api/sessions", async (req, res) => {
|
|
5491
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
5491
|
+
const { getRecentUserPromptsForSession } = await import("./events-B7S4U4DB.js");
|
|
5492
5492
|
const projectId = req.query["projectId"];
|
|
5493
5493
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
5494
5494
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -5521,8 +5521,8 @@ async function createServerHandle(config) {
|
|
|
5521
5521
|
res.status(201).json({ session });
|
|
5522
5522
|
});
|
|
5523
5523
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
5524
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5525
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-
|
|
5524
|
+
const { getEventStore: getEventStore2 } = await import("./events-B7S4U4DB.js");
|
|
5525
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NZYOXNKK.js");
|
|
5526
5526
|
const session = sessionManager.getSession(req.params.id);
|
|
5527
5527
|
if (!session) {
|
|
5528
5528
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -5552,8 +5552,8 @@ async function createServerHandle(config) {
|
|
|
5552
5552
|
res.json({ success: true });
|
|
5553
5553
|
});
|
|
5554
5554
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
5555
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5556
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-
|
|
5555
|
+
const { getEventStore: getEventStore2 } = await import("./events-B7S4U4DB.js");
|
|
5556
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NZYOXNKK.js");
|
|
5557
5557
|
const sessionId = req.params.id;
|
|
5558
5558
|
const session = sessionManager.getSession(sessionId);
|
|
5559
5559
|
if (!session) {
|
|
@@ -5590,8 +5590,8 @@ async function createServerHandle(config) {
|
|
|
5590
5590
|
res.json({ success: true });
|
|
5591
5591
|
});
|
|
5592
5592
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
5593
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5594
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-
|
|
5593
|
+
const { getEventStore: getEventStore2 } = await import("./events-B7S4U4DB.js");
|
|
5594
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NZYOXNKK.js");
|
|
5595
5595
|
const sessionId = req.params.id;
|
|
5596
5596
|
const session = sessionManager.getSession(sessionId);
|
|
5597
5597
|
if (!session) {
|
|
@@ -5629,13 +5629,13 @@ async function createServerHandle(config) {
|
|
|
5629
5629
|
if (!callId || approved === void 0) {
|
|
5630
5630
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
5631
5631
|
}
|
|
5632
|
-
const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-
|
|
5632
|
+
const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-EGSJDCYX.js");
|
|
5633
5633
|
const result = providePathConfirmation2(callId, approved, alwaysAllow);
|
|
5634
5634
|
if (!result.found) {
|
|
5635
5635
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
5636
5636
|
}
|
|
5637
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5638
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-
|
|
5637
|
+
const { getEventStore: getEventStore2 } = await import("./events-B7S4U4DB.js");
|
|
5638
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-NZYOXNKK.js");
|
|
5639
5639
|
const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-WQENDK72.js");
|
|
5640
5640
|
const eventStore = getEventStore2();
|
|
5641
5641
|
const events = eventStore.getEvents(sessionId);
|
|
@@ -5654,7 +5654,7 @@ async function createServerHandle(config) {
|
|
|
5654
5654
|
if (!callId || !answer) {
|
|
5655
5655
|
return res.status(400).json({ error: "callId and answer are required" });
|
|
5656
5656
|
}
|
|
5657
|
-
const { provideAnswer: provideAnswer2 } = await import("./tools-
|
|
5657
|
+
const { provideAnswer: provideAnswer2 } = await import("./tools-EGSJDCYX.js");
|
|
5658
5658
|
const found = provideAnswer2(callId, answer);
|
|
5659
5659
|
if (!found) {
|
|
5660
5660
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -5690,14 +5690,14 @@ async function createServerHandle(config) {
|
|
|
5690
5690
|
if (!session) {
|
|
5691
5691
|
return res.status(404).json({ error: "Session not found" });
|
|
5692
5692
|
}
|
|
5693
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5694
|
-
const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-
|
|
5693
|
+
const { stopSessionExecution } = await import("./chat-handler-ZBY3GCFF.js");
|
|
5694
|
+
const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-EGSJDCYX.js");
|
|
5695
5695
|
stopSessionExecution(sessionId, sessionManager);
|
|
5696
5696
|
abortSession(sessionId);
|
|
5697
5697
|
cancelQuestionsForSession2(sessionId, "Session stopped by user");
|
|
5698
5698
|
cancelPathConfirmationsForSession2(sessionId, "Session stopped by user");
|
|
5699
5699
|
sessionManager.clearMessageQueue(sessionId);
|
|
5700
|
-
const eventStore = (await import("./events-
|
|
5700
|
+
const eventStore = (await import("./events-B7S4U4DB.js")).getEventStore();
|
|
5701
5701
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
5702
5702
|
res.json({ success: true });
|
|
5703
5703
|
});
|
|
@@ -6012,7 +6012,7 @@ async function createServerHandle(config) {
|
|
|
6012
6012
|
providerManager
|
|
6013
6013
|
);
|
|
6014
6014
|
const wss = wssExports.wss;
|
|
6015
|
-
const { QueueProcessor } = await import("./processor-
|
|
6015
|
+
const { QueueProcessor } = await import("./processor-W55O5T6T.js");
|
|
6016
6016
|
const queueProcessor = new QueueProcessor({
|
|
6017
6017
|
sessionManager,
|
|
6018
6018
|
providerManager,
|
|
@@ -6082,4 +6082,4 @@ export {
|
|
|
6082
6082
|
createServerHandle,
|
|
6083
6083
|
createServer
|
|
6084
6084
|
};
|
|
6085
|
-
//# sourceMappingURL=chunk-
|
|
6085
|
+
//# sourceMappingURL=chunk-UYFFQTLV.js.map
|
|
@@ -129,7 +129,7 @@ async function runCli(options) {
|
|
|
129
129
|
await runInitWithSelect(mode);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
const { runServe } = await import("./serve-
|
|
132
|
+
const { runServe } = await import("./serve-X5CLO7YU.js");
|
|
133
133
|
await runServe({
|
|
134
134
|
mode,
|
|
135
135
|
port: values.port ? parseInt(values.port) : void 0,
|
|
@@ -142,4 +142,4 @@ async function runCli(options) {
|
|
|
142
142
|
export {
|
|
143
143
|
runCli
|
|
144
144
|
};
|
|
145
|
-
//# sourceMappingURL=chunk-
|
|
145
|
+
//# sourceMappingURL=chunk-ZGPWTTOV.js.map
|
package/dist/cli/dev.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runCli
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-ZGPWTTOV.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "../chunk-PNBH3RAX.js";
|
|
8
8
|
|
|
9
9
|
// src/cli/dev.ts
|
|
10
|
+
import { readFileSync } from "fs";
|
|
10
11
|
var mode = process.env["OPENFOX_MODE"] ?? "development";
|
|
12
|
+
var pkg = JSON.parse(readFileSync("./package.json", "utf-8"));
|
|
13
|
+
process.env["VERSION"] = pkg.version + "-dev";
|
|
11
14
|
runCli({ mode }).catch((error) => {
|
|
12
15
|
logger.error("CLI fatal error", { error: error instanceof Error ? error.message : String(error) });
|
|
13
16
|
process.exit(1);
|
package/dist/cli/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
isFileInCache,
|
|
37
37
|
isStoredEvent,
|
|
38
38
|
isTurnEvent
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-NW7PIZH3.js";
|
|
40
40
|
import {
|
|
41
41
|
buildContextMessagesFromEventHistory,
|
|
42
42
|
buildContextMessagesFromMessages,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
foldTodos,
|
|
54
54
|
foldTurnEventsToSnapshotMessages,
|
|
55
55
|
getMessagesForWindow
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-WQ4W5H6A.js";
|
|
57
57
|
import "./chunk-3EHGGBWE.js";
|
|
58
58
|
import "./chunk-TVQOONDR.js";
|
|
59
59
|
import "./chunk-PNBH3RAX.js";
|
|
@@ -111,4 +111,4 @@ export {
|
|
|
111
111
|
isStoredEvent,
|
|
112
112
|
isTurnEvent
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=events-
|
|
114
|
+
//# sourceMappingURL=events-B7S4U4DB.js.map
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
foldTodos,
|
|
16
16
|
foldTurnEventsToSnapshotMessages,
|
|
17
17
|
getMessagesForWindow
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-WQ4W5H6A.js";
|
|
19
19
|
export {
|
|
20
20
|
buildContextMessagesFromEventHistory,
|
|
21
21
|
buildContextMessagesFromMessages,
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
foldTurnEventsToSnapshotMessages,
|
|
35
35
|
getMessagesForWindow
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=folding-
|
|
37
|
+
//# sourceMappingURL=folding-NZYOXNKK.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
runBuilderTurn,
|
|
4
4
|
runChatTurn,
|
|
5
5
|
runVerifierTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AOHPSZIW.js";
|
|
7
7
|
import {
|
|
8
8
|
TurnMetrics,
|
|
9
9
|
createChatDoneEvent,
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
createMessageStartEvent,
|
|
12
12
|
createToolCallEvent,
|
|
13
13
|
createToolResultEvent
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-CUXZUI2X.js";
|
|
15
|
+
import "./chunk-NW7PIZH3.js";
|
|
16
|
+
import "./chunk-WQ4W5H6A.js";
|
|
17
17
|
import "./chunk-S4QKTRGJ.js";
|
|
18
18
|
import "./chunk-22CTURMH.js";
|
|
19
19
|
import "./chunk-7IOZFJBW.js";
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
runChatTurn,
|
|
37
37
|
runVerifierTurn
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=orchestrator-
|
|
39
|
+
//# sourceMappingURL=orchestrator-NH3BO64D.js.map
|
package/dist/package.json
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
getEventStore,
|
|
7
7
|
updateSessionMetadata
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NW7PIZH3.js";
|
|
9
9
|
import {
|
|
10
10
|
buildMessagesFromStoredEvents,
|
|
11
11
|
foldPendingConfirmations
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WQ4W5H6A.js";
|
|
13
13
|
import {
|
|
14
14
|
createChatMessageMessage,
|
|
15
15
|
createContextStateMessage,
|
|
@@ -188,7 +188,7 @@ var QueueProcessor = class {
|
|
|
188
188
|
backend: provider?.backend ?? llmClient.getBackend(),
|
|
189
189
|
model: llmClient.getModel()
|
|
190
190
|
};
|
|
191
|
-
const { runChatTurn } = await import("./orchestrator-
|
|
191
|
+
const { runChatTurn } = await import("./orchestrator-NH3BO64D.js");
|
|
192
192
|
runChatTurn({
|
|
193
193
|
sessionManager,
|
|
194
194
|
sessionId,
|
|
@@ -233,4 +233,4 @@ var QueueProcessor = class {
|
|
|
233
233
|
export {
|
|
234
234
|
QueueProcessor
|
|
235
235
|
};
|
|
236
|
-
//# sourceMappingURL=processor-
|
|
236
|
+
//# sourceMappingURL=processor-W55O5T6T.js.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createProject
|
|
3
|
+
} from "./chunk-XKFPU2FA.js";
|
|
4
|
+
import "./chunk-3EHGGBWE.js";
|
|
5
|
+
import "./chunk-PNBH3RAX.js";
|
|
6
|
+
|
|
7
|
+
// src/server/utils/project-creator.ts
|
|
8
|
+
import { execSync } from "child_process";
|
|
9
|
+
import { join } from "path";
|
|
10
|
+
function validateProjectName(name) {
|
|
11
|
+
if (!name || name.trim() === "") {
|
|
12
|
+
return { valid: false, error: "Project name cannot be empty" };
|
|
13
|
+
}
|
|
14
|
+
if (!/^[a-zA-Z0-9._ -]+$/.test(name)) {
|
|
15
|
+
return { valid: false, error: "Project name can only contain letters, numbers, hyphens, underscores, dots, and spaces" };
|
|
16
|
+
}
|
|
17
|
+
if (name.includes("/") || name.includes("\\") || name.includes("..")) {
|
|
18
|
+
return { valid: false, error: "Project name cannot contain path separators" };
|
|
19
|
+
}
|
|
20
|
+
return { valid: true };
|
|
21
|
+
}
|
|
22
|
+
async function directoryExists(path) {
|
|
23
|
+
try {
|
|
24
|
+
const { access } = await import("fs/promises");
|
|
25
|
+
const { constants } = await import("fs");
|
|
26
|
+
await access(path, constants.F_OK);
|
|
27
|
+
return true;
|
|
28
|
+
} catch {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async function createDirectoryWithGit(projectName, workdir) {
|
|
33
|
+
const validation = validateProjectName(projectName);
|
|
34
|
+
if (!validation.valid) {
|
|
35
|
+
throw new Error(validation.error);
|
|
36
|
+
}
|
|
37
|
+
const fullPath = workdir.replace(/\/+$/, "");
|
|
38
|
+
const { stat, mkdir } = await import("fs/promises");
|
|
39
|
+
try {
|
|
40
|
+
const stats = await stat(fullPath);
|
|
41
|
+
if (!stats.isDirectory()) {
|
|
42
|
+
throw new Error(`A file named '${projectName}' already exists at ${fullPath}`);
|
|
43
|
+
}
|
|
44
|
+
} catch {
|
|
45
|
+
await mkdir(fullPath, { recursive: true });
|
|
46
|
+
}
|
|
47
|
+
if (!await directoryExists(join(fullPath, ".git"))) {
|
|
48
|
+
try {
|
|
49
|
+
execSync("git init", { cwd: fullPath, stdio: "pipe" });
|
|
50
|
+
} catch (gitErr) {
|
|
51
|
+
const { rm } = await import("fs/promises");
|
|
52
|
+
await rm(fullPath, { recursive: true, force: true });
|
|
53
|
+
throw new Error(`Failed to initialize git: ${gitErr instanceof Error ? gitErr.message : "Unknown"}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return createProject(projectName, fullPath);
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
createDirectoryWithGit,
|
|
60
|
+
validateProjectName
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=project-creator-HY32FPFV.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-UYFFQTLV.js";
|
|
4
|
+
import "./chunk-AOHPSZIW.js";
|
|
5
|
+
import "./chunk-CUXZUI2X.js";
|
|
6
6
|
import "./chunk-QDEKU5RL.js";
|
|
7
7
|
import "./chunk-A6NVV74R.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-NW7PIZH3.js";
|
|
9
|
+
import "./chunk-WQ4W5H6A.js";
|
|
10
10
|
import "./chunk-S4QKTRGJ.js";
|
|
11
11
|
import "./chunk-22CTURMH.js";
|
|
12
12
|
import "./chunk-7IOZFJBW.js";
|
|
@@ -36,28 +36,12 @@ import {
|
|
|
36
36
|
|
|
37
37
|
// src/server/utils/network.ts
|
|
38
38
|
import os from "os";
|
|
39
|
-
import { statSync
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (entryPoint) {
|
|
46
|
-
const cliDir = dirname(entryPoint);
|
|
47
|
-
possiblePaths.push(join(cliDir, "../../package.json"));
|
|
48
|
-
possiblePaths.push(join(cliDir, "../../../package.json"));
|
|
49
|
-
}
|
|
50
|
-
for (const packageJsonPath of possiblePaths) {
|
|
51
|
-
try {
|
|
52
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
|
|
53
|
-
if (packageJson.version && typeof packageJson.version === "string") {
|
|
54
|
-
return packageJson.version;
|
|
55
|
-
}
|
|
56
|
-
} catch {
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return "unknown";
|
|
60
|
-
}
|
|
39
|
+
import { statSync } from "fs";
|
|
40
|
+
|
|
41
|
+
// src/constants.ts
|
|
42
|
+
var VERSION = "1.0.6";
|
|
43
|
+
|
|
44
|
+
// src/server/utils/network.ts
|
|
61
45
|
function getNetworkInterfaces() {
|
|
62
46
|
const interfaces = os.networkInterfaces();
|
|
63
47
|
const result = [];
|
|
@@ -118,7 +102,7 @@ function displayStartupBanner(config) {
|
|
|
118
102
|
const { host, port, databasePath, configPath } = config;
|
|
119
103
|
const isLocalhost = host === "127.0.0.1";
|
|
120
104
|
console.log(`
|
|
121
|
-
\u{1F98A} OpenFox v${
|
|
105
|
+
\u{1F98A} OpenFox v${VERSION}
|
|
122
106
|
`);
|
|
123
107
|
if (isLocalhost) {
|
|
124
108
|
console.log(` \u{1F310} Server: http://localhost:${port}`);
|
|
@@ -206,4 +190,4 @@ async function runServe(options) {
|
|
|
206
190
|
export {
|
|
207
191
|
runServe
|
|
208
192
|
};
|
|
209
|
-
//# sourceMappingURL=serve-
|
|
193
|
+
//# sourceMappingURL=serve-X5CLO7YU.js.map
|
package/dist/server/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer,
|
|
3
3
|
createServerHandle
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-UYFFQTLV.js";
|
|
5
|
+
import "../chunk-AOHPSZIW.js";
|
|
6
|
+
import "../chunk-CUXZUI2X.js";
|
|
7
7
|
import "../chunk-QDEKU5RL.js";
|
|
8
8
|
import "../chunk-A6NVV74R.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-NW7PIZH3.js";
|
|
10
|
+
import "../chunk-WQ4W5H6A.js";
|
|
11
11
|
import "../chunk-S4QKTRGJ.js";
|
|
12
12
|
import "../chunk-22CTURMH.js";
|
|
13
13
|
import "../chunk-7IOZFJBW.js";
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
requestPathAccess,
|
|
12
12
|
stepDoneTool,
|
|
13
13
|
validateToolAction
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-CUXZUI2X.js";
|
|
15
|
+
import "./chunk-NW7PIZH3.js";
|
|
16
|
+
import "./chunk-WQ4W5H6A.js";
|
|
17
17
|
import "./chunk-S4QKTRGJ.js";
|
|
18
18
|
import {
|
|
19
19
|
AskUserInterrupt,
|
|
@@ -45,4 +45,4 @@ export {
|
|
|
45
45
|
stepDoneTool,
|
|
46
46
|
validateToolAction
|
|
47
47
|
};
|
|
48
|
-
//# sourceMappingURL=tools-
|
|
48
|
+
//# sourceMappingURL=tools-EGSJDCYX.js.map
|
package/package.json
CHANGED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createProject
|
|
3
|
-
} from "./chunk-XKFPU2FA.js";
|
|
4
|
-
import "./chunk-3EHGGBWE.js";
|
|
5
|
-
import "./chunk-PNBH3RAX.js";
|
|
6
|
-
|
|
7
|
-
// src/server/utils/project-creator.ts
|
|
8
|
-
import { mkdir } from "fs/promises";
|
|
9
|
-
import { execSync } from "child_process";
|
|
10
|
-
import { join } from "path";
|
|
11
|
-
function validateProjectName(name) {
|
|
12
|
-
if (!name || name.trim() === "") {
|
|
13
|
-
return { valid: false, error: "Project name cannot be empty" };
|
|
14
|
-
}
|
|
15
|
-
const validPattern = /^[a-zA-Z0-9._ -]+$/;
|
|
16
|
-
if (!validPattern.test(name)) {
|
|
17
|
-
return {
|
|
18
|
-
valid: false,
|
|
19
|
-
error: "Project name can only contain letters, numbers, hyphens, underscores, dots, and spaces"
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
if (name.includes("/") || name.includes("\\") || name.includes("..")) {
|
|
23
|
-
return { valid: false, error: "Project name cannot contain path separators" };
|
|
24
|
-
}
|
|
25
|
-
return { valid: true };
|
|
26
|
-
}
|
|
27
|
-
async function directoryExists(path) {
|
|
28
|
-
try {
|
|
29
|
-
const { access } = await import("fs/promises");
|
|
30
|
-
const { constants } = await import("fs");
|
|
31
|
-
await access(path, constants.F_OK);
|
|
32
|
-
return true;
|
|
33
|
-
} catch {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
async function createDirectoryWithGit(projectName, workdir) {
|
|
38
|
-
const validation = validateProjectName(projectName);
|
|
39
|
-
if (!validation.valid) {
|
|
40
|
-
throw new Error(validation.error);
|
|
41
|
-
}
|
|
42
|
-
const sanitizedName = projectName.trim().replace(/\s+/g, "-");
|
|
43
|
-
const fullPath = join(workdir, sanitizedName);
|
|
44
|
-
const exists = await directoryExists(fullPath);
|
|
45
|
-
if (exists) {
|
|
46
|
-
throw new Error(`Directory already exists: ${fullPath}. Please choose a different name or use the existing directory from Browse Projects.`);
|
|
47
|
-
}
|
|
48
|
-
try {
|
|
49
|
-
await mkdir(fullPath, { recursive: true });
|
|
50
|
-
} catch (error) {
|
|
51
|
-
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
52
|
-
throw new Error(`Failed to create directory: ${errorMessage}`);
|
|
53
|
-
}
|
|
54
|
-
try {
|
|
55
|
-
execSync("git init", { cwd: fullPath, stdio: "pipe" });
|
|
56
|
-
} catch (error) {
|
|
57
|
-
const { rm } = await import("fs/promises");
|
|
58
|
-
await rm(fullPath, { recursive: true, force: true });
|
|
59
|
-
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
60
|
-
throw new Error(`Failed to initialize git repository: ${errorMessage}`);
|
|
61
|
-
}
|
|
62
|
-
const project = createProject(projectName, workdir);
|
|
63
|
-
return project;
|
|
64
|
-
}
|
|
65
|
-
export {
|
|
66
|
-
createDirectoryWithGit,
|
|
67
|
-
directoryExists,
|
|
68
|
-
validateProjectName
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=project-creator-KAQXMZCT.js.map
|