openfox 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{auto-compaction-7RNWXTRQ.js → auto-compaction-Q36IMXD4.js} +3 -3
- package/dist/{chat-handler-ZBY3GCFF.js → chat-handler-BTU2FLJY.js} +5 -5
- package/dist/{chunk-CUXZUI2X.js → chunk-36AJGM6G.js} +3 -3
- package/dist/{chunk-2CK3CWOE.js → chunk-47TNOR2U.js} +239 -60
- package/dist/{chunk-CDITGSG3.js → chunk-BNK5N227.js} +3 -3
- package/dist/{chunk-GMWOLNCU.js → chunk-IBA3NQAD.js} +2 -2
- package/dist/{chunk-3AMXYXIA.js → chunk-NGSSEMII.js} +4 -4
- package/dist/{chunk-AOHPSZIW.js → chunk-NIQ4X7Y7.js} +2 -2
- package/dist/{chunk-KQRQXKH2.js → chunk-QYRLQ3NK.js} +12 -12
- package/dist/{chunk-5YQAXUKO.js → chunk-R4HADRYO.js} +9 -1
- package/dist/{chunk-A6NVV74R.js → chunk-YSPC6TQJ.js} +9 -3
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{config-VP3V5VGN.js → config-ONC2MTDE.js} +5 -5
- package/dist/{init-T35BNPF2.js → init-TLQQLRGQ.js} +89 -13
- package/dist/{orchestrator-NH3BO64D.js → orchestrator-TFJHY67A.js} +4 -4
- package/dist/package.json +1 -1
- package/dist/{paths-MM76AWYB.js → paths-ZRI56O63.js} +6 -2
- package/dist/{processor-W55O5T6T.js → processor-KJBVOF4W.js} +2 -2
- package/dist/{provider-CHKLHKG5.js → provider-FAO4R2GH.js} +7 -7
- package/dist/{serve-XGOABBXJ.js → serve-MRW7EKGE.js} +10 -10
- package/dist/server/index.js +7 -7
- package/dist/skill-defaults/{playwright-cli.skill.md → browser.skill.md} +5 -5
- package/dist/{tools-EGSJDCYX.js → tools-4D6R2BA3.js} +3 -3
- package/dist/{vision-fallback-MUKHLGFR.js → vision-fallback-MGSC5SWE.js} +2 -2
- package/dist/web/assets/{index-BY3Xdvmg.js → index-rZhr4yUO.js} +52 -52
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
detectBackend,
|
|
3
3
|
detectModel
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NGSSEMII.js";
|
|
5
5
|
import {
|
|
6
6
|
getGlobalConfigPath
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-R4HADRYO.js";
|
|
8
8
|
|
|
9
9
|
// src/cli/config.ts
|
|
10
10
|
import { z } from "zod";
|
|
@@ -380,4 +380,4 @@ export {
|
|
|
380
380
|
activateProvider,
|
|
381
381
|
mergeConfigs
|
|
382
382
|
};
|
|
383
|
-
//# sourceMappingURL=chunk-
|
|
383
|
+
//# sourceMappingURL=chunk-BNK5N227.js.map
|
|
@@ -29,7 +29,7 @@ function isVisionFallbackEnabled() {
|
|
|
29
29
|
async function ensureVisionFallbackConfigLoaded() {
|
|
30
30
|
if (configLoaded) return;
|
|
31
31
|
try {
|
|
32
|
-
const { loadGlobalConfig, getVisionFallback } = await import("./config-
|
|
32
|
+
const { loadGlobalConfig, getVisionFallback } = await import("./config-ONC2MTDE.js");
|
|
33
33
|
const { getRuntimeConfig } = await import("./runtime-config-2XJJIMSC.js");
|
|
34
34
|
const runtimeConfig = getRuntimeConfig();
|
|
35
35
|
const mode = runtimeConfig.mode ?? "production";
|
|
@@ -134,4 +134,4 @@ export {
|
|
|
134
134
|
describeImage,
|
|
135
135
|
describeImageFromDataUrl
|
|
136
136
|
};
|
|
137
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-IBA3NQAD.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
describeImageFromDataUrl,
|
|
3
3
|
ensureVisionFallbackConfigLoaded
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IBA3NQAD.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -818,7 +818,7 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
818
818
|
try {
|
|
819
819
|
const shouldDisableThinking = disableThinking || request.disableThinking === true;
|
|
820
820
|
await ensureVisionFallbackConfigLoaded();
|
|
821
|
-
const { isVisionFallbackEnabled } = await import("./vision-fallback-
|
|
821
|
+
const { isVisionFallbackEnabled } = await import("./vision-fallback-MGSC5SWE.js");
|
|
822
822
|
const paramsOptions = {
|
|
823
823
|
model,
|
|
824
824
|
request,
|
|
@@ -896,7 +896,7 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
896
896
|
});
|
|
897
897
|
try {
|
|
898
898
|
await ensureVisionFallbackConfigLoaded();
|
|
899
|
-
const { isVisionFallbackEnabled } = await import("./vision-fallback-
|
|
899
|
+
const { isVisionFallbackEnabled } = await import("./vision-fallback-MGSC5SWE.js");
|
|
900
900
|
const shouldDisableThinking = disableThinking || request.disableThinking === true;
|
|
901
901
|
const createParams = await buildStreamingCreateParams({
|
|
902
902
|
model,
|
|
@@ -1111,4 +1111,4 @@ export {
|
|
|
1111
1111
|
getLlmStatus,
|
|
1112
1112
|
clearModelCache
|
|
1113
1113
|
};
|
|
1114
|
-
//# sourceMappingURL=chunk-
|
|
1114
|
+
//# sourceMappingURL=chunk-NGSSEMII.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
getToolRegistryForAgent,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
runTopLevelAgentLoop
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-36AJGM6G.js";
|
|
17
17
|
import {
|
|
18
18
|
getCurrentContextWindowId,
|
|
19
19
|
getEventStore
|
|
@@ -311,4 +311,4 @@ export {
|
|
|
311
311
|
runBuilderTurn,
|
|
312
312
|
runVerifierTurn
|
|
313
313
|
};
|
|
314
|
-
//# sourceMappingURL=chunk-
|
|
314
|
+
//# sourceMappingURL=chunk-NIQ4X7Y7.js.map
|
|
@@ -24,8 +24,8 @@ Options:
|
|
|
24
24
|
`);
|
|
25
25
|
}
|
|
26
26
|
async function runConfig(mode) {
|
|
27
|
-
const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-
|
|
28
|
-
const { getGlobalConfigPath } = await import("./paths-
|
|
27
|
+
const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-ONC2MTDE.js");
|
|
28
|
+
const { getGlobalConfigPath } = await import("./paths-ZRI56O63.js");
|
|
29
29
|
const config = await loadGlobalConfig(mode);
|
|
30
30
|
const configPath = getGlobalConfigPath(mode);
|
|
31
31
|
const activeProvider = getActiveProvider(config);
|
|
@@ -75,8 +75,8 @@ async function runCli(options) {
|
|
|
75
75
|
const [command] = positionals;
|
|
76
76
|
switch (command) {
|
|
77
77
|
case "init": {
|
|
78
|
-
const { runInitWithSelect } = await import("./init-
|
|
79
|
-
const { loadGlobalConfig, getActiveProvider } = await import("./config-
|
|
78
|
+
const { runInitWithSelect } = await import("./init-TLQQLRGQ.js");
|
|
79
|
+
const { loadGlobalConfig, getActiveProvider } = await import("./config-ONC2MTDE.js");
|
|
80
80
|
const config = await loadGlobalConfig(mode);
|
|
81
81
|
const activeProvider = getActiveProvider(config);
|
|
82
82
|
if (activeProvider) {
|
|
@@ -91,17 +91,17 @@ async function runCli(options) {
|
|
|
91
91
|
break;
|
|
92
92
|
}
|
|
93
93
|
case "provider": {
|
|
94
|
-
const { runProviderCommand } = await import("./provider-
|
|
94
|
+
const { runProviderCommand } = await import("./provider-FAO4R2GH.js");
|
|
95
95
|
const [, subcommand] = positionals;
|
|
96
96
|
await runProviderCommand(mode, subcommand);
|
|
97
97
|
break;
|
|
98
98
|
}
|
|
99
99
|
default: {
|
|
100
|
-
const { configFileExists } = await import("./config-
|
|
100
|
+
const { configFileExists } = await import("./config-ONC2MTDE.js");
|
|
101
101
|
const configExists = await configFileExists(mode);
|
|
102
102
|
if (!configExists) {
|
|
103
103
|
console.log("Welcome to OpenFox!\n");
|
|
104
|
-
const { trySmartDefaults, saveGlobalConfig, addProvider } = await import("./config-
|
|
104
|
+
const { trySmartDefaults, saveGlobalConfig, addProvider } = await import("./config-ONC2MTDE.js");
|
|
105
105
|
const detected = await trySmartDefaults(mode);
|
|
106
106
|
if (detected) {
|
|
107
107
|
console.log(`\u2713 Found ${detected.backend} (${detected.model}) at ${detected.url}`);
|
|
@@ -119,21 +119,21 @@ async function runCli(options) {
|
|
|
119
119
|
models: [],
|
|
120
120
|
isActive: true
|
|
121
121
|
});
|
|
122
|
-
const { setDefaultModelSelection } = await import("./config-
|
|
122
|
+
const { setDefaultModelSelection } = await import("./config-ONC2MTDE.js");
|
|
123
123
|
const finalConfig = setDefaultModelSelection(configWithProvider, configWithProvider.providers[0].id, detected.model);
|
|
124
124
|
await saveGlobalConfig(mode, finalConfig);
|
|
125
125
|
console.log("Configuration saved!\n");
|
|
126
126
|
} else {
|
|
127
127
|
console.log("\u2717 No LLM server detected\n");
|
|
128
|
-
const { runInitWithSelect } = await import("./init-
|
|
128
|
+
const { runInitWithSelect } = await import("./init-TLQQLRGQ.js");
|
|
129
129
|
await runInitWithSelect(mode);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
const { runServe } = await import("./serve-
|
|
132
|
+
const { runServe } = await import("./serve-MRW7EKGE.js");
|
|
133
133
|
await runServe({
|
|
134
134
|
mode,
|
|
135
135
|
port: values.port ? parseInt(values.port) : void 0,
|
|
136
|
-
openBrowser:
|
|
136
|
+
openBrowser: values["no-browser"] === true ? false : void 0
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -142,4 +142,4 @@ async function runCli(options) {
|
|
|
142
142
|
export {
|
|
143
143
|
runCli
|
|
144
144
|
};
|
|
145
|
-
//# sourceMappingURL=chunk-
|
|
145
|
+
//# sourceMappingURL=chunk-QYRLQ3NK.js.map
|
|
@@ -20,6 +20,12 @@ function getGlobalConfigDir(mode) {
|
|
|
20
20
|
function getGlobalConfigPath(mode) {
|
|
21
21
|
return join(getGlobalConfigDir(mode), "config.json");
|
|
22
22
|
}
|
|
23
|
+
function getAuthConfigPath(mode) {
|
|
24
|
+
return join(getGlobalConfigDir(mode), "auth.json");
|
|
25
|
+
}
|
|
26
|
+
function getAuthKeyPath(mode) {
|
|
27
|
+
return join(getGlobalConfigDir(mode), "auth.key");
|
|
28
|
+
}
|
|
23
29
|
function getGlobalDataDir(mode) {
|
|
24
30
|
const suffix = mode === "development" ? "-dev" : "";
|
|
25
31
|
const home = homedir();
|
|
@@ -50,9 +56,11 @@ async function ensureDataDirExists(mode) {
|
|
|
50
56
|
export {
|
|
51
57
|
getGlobalConfigDir,
|
|
52
58
|
getGlobalConfigPath,
|
|
59
|
+
getAuthConfigPath,
|
|
60
|
+
getAuthKeyPath,
|
|
53
61
|
getGlobalDataDir,
|
|
54
62
|
getDatabasePath,
|
|
55
63
|
getSkillsDir,
|
|
56
64
|
ensureDataDirExists
|
|
57
65
|
};
|
|
58
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-R4HADRYO.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
createLLMClient,
|
|
4
4
|
detectBackend,
|
|
5
5
|
detectModel
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NGSSEMII.js";
|
|
7
7
|
import {
|
|
8
8
|
logger
|
|
9
9
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -38,10 +38,13 @@ async function fetchAvailableModelsFromBackend(baseUrl, apiKey) {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
async function fetchModelsWithContext(baseUrl, apiKey, backend) {
|
|
41
|
+
logger.info("fetchModelsWithContext called", { baseUrl, apiKey: !!apiKey, backend });
|
|
41
42
|
if (backend === "ollama") {
|
|
43
|
+
logger.info("Fetching Ollama models via /api/tags and /api/show");
|
|
42
44
|
return fetchOllamaModelsWithContext(baseUrl, apiKey);
|
|
43
45
|
}
|
|
44
46
|
const url = baseUrl.includes("/v1") ? `${baseUrl}/models` : `${baseUrl}/v1/models`;
|
|
47
|
+
logger.info("Fetching models via /v1/models", { url });
|
|
45
48
|
try {
|
|
46
49
|
const headers = {
|
|
47
50
|
"Content-Type": "application/json"
|
|
@@ -60,6 +63,7 @@ async function fetchModelsWithContext(baseUrl, apiKey, backend) {
|
|
|
60
63
|
}
|
|
61
64
|
const data = await response.json();
|
|
62
65
|
if (data.data && Array.isArray(data.data)) {
|
|
66
|
+
logger.info("Fetched models from /v1/models", { count: data.data.length, models: data.data.map((m) => m.id) });
|
|
63
67
|
return data.data.map((m) => ({
|
|
64
68
|
id: m.id,
|
|
65
69
|
contextWindow: m.max_model_len ?? 2e5,
|
|
@@ -125,7 +129,7 @@ async function fetchOllamaModelsWithContext(baseUrl, apiKey) {
|
|
|
125
129
|
}
|
|
126
130
|
return modelsWithContext;
|
|
127
131
|
} catch (error) {
|
|
128
|
-
logger.
|
|
132
|
+
logger.info("Error fetching Ollama models", { url: baseUrl, error: error instanceof Error ? error.message : String(error) });
|
|
129
133
|
return [];
|
|
130
134
|
}
|
|
131
135
|
}
|
|
@@ -203,6 +207,7 @@ function createProviderManager(config) {
|
|
|
203
207
|
const url = provider.url.includes("/v1") ? provider.url.replace("/v1", "") : provider.url;
|
|
204
208
|
clearModelCache(url);
|
|
205
209
|
const backend = provider.backend;
|
|
210
|
+
logger.info("activateProvider fetching models", { providerId, providerName: provider.name, url, backend });
|
|
206
211
|
const modelsWithContext = await fetchModelsWithContext(url, provider.apiKey, backend);
|
|
207
212
|
const normalize = (s) => s.toLowerCase().replace(/[-_\s:.]+/g, "");
|
|
208
213
|
const userModels = provider.models.filter((m) => m.source === "user");
|
|
@@ -374,6 +379,7 @@ function createProviderManager(config) {
|
|
|
374
379
|
}
|
|
375
380
|
const url = provider.url.includes("/v1") ? provider.url.replace("/v1", "") : provider.url;
|
|
376
381
|
const backend = provider.backend;
|
|
382
|
+
logger.info("refreshProviderModels fetching models", { providerId, providerName: provider.name, url, backend });
|
|
377
383
|
const modelsWithContext = await fetchModelsWithContext(url, provider.apiKey, backend);
|
|
378
384
|
const normalize = (s) => s.toLowerCase().replace(/[-_\s:.]+/g, "");
|
|
379
385
|
const userModels = provider.models.filter((m) => m.source === "user");
|
|
@@ -435,4 +441,4 @@ export {
|
|
|
435
441
|
parseDefaultModelSelection,
|
|
436
442
|
createProviderManager
|
|
437
443
|
};
|
|
438
|
-
//# sourceMappingURL=chunk-
|
|
444
|
+
//# sourceMappingURL=chunk-YSPC6TQJ.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
saveGlobalConfig,
|
|
14
14
|
setDefaultModelSelection,
|
|
15
15
|
trySmartDefaults
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-BNK5N227.js";
|
|
17
|
+
import "./chunk-NGSSEMII.js";
|
|
18
18
|
import "./chunk-XFXOSPYH.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-R4HADRYO.js";
|
|
20
|
+
import "./chunk-IBA3NQAD.js";
|
|
21
21
|
import "./chunk-PNBH3RAX.js";
|
|
22
22
|
export {
|
|
23
23
|
activateProvider,
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
setDefaultModelSelection,
|
|
36
36
|
trySmartDefaults
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=config-
|
|
38
|
+
//# sourceMappingURL=config-ONC2MTDE.js.map
|
|
@@ -1,18 +1,51 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addProvider,
|
|
3
3
|
saveGlobalConfig
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BNK5N227.js";
|
|
5
5
|
import {
|
|
6
6
|
detectBackend,
|
|
7
7
|
detectModel
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NGSSEMII.js";
|
|
9
9
|
import "./chunk-XFXOSPYH.js";
|
|
10
|
-
import
|
|
11
|
-
|
|
10
|
+
import {
|
|
11
|
+
getAuthConfigPath,
|
|
12
|
+
getAuthKeyPath
|
|
13
|
+
} from "./chunk-R4HADRYO.js";
|
|
14
|
+
import "./chunk-IBA3NQAD.js";
|
|
12
15
|
import "./chunk-PNBH3RAX.js";
|
|
13
16
|
|
|
14
17
|
// src/cli/init.ts
|
|
15
|
-
import { select, text, spinner, outro, confirm } from "@clack/prompts";
|
|
18
|
+
import { select, text, password, spinner, outro, confirm } from "@clack/prompts";
|
|
19
|
+
import { writeFile as writeFile2 } from "fs/promises";
|
|
20
|
+
|
|
21
|
+
// src/cli/auth.ts
|
|
22
|
+
import { readFile, writeFile, mkdir, access } from "fs/promises";
|
|
23
|
+
import { dirname } from "path";
|
|
24
|
+
import { createHash, publicEncrypt } from "crypto";
|
|
25
|
+
async function saveAuthConfig(mode, auth) {
|
|
26
|
+
const authPath = getAuthConfigPath(mode);
|
|
27
|
+
await mkdir(dirname(authPath), { recursive: true });
|
|
28
|
+
await writeFile(authPath, JSON.stringify(auth, null, 2));
|
|
29
|
+
}
|
|
30
|
+
async function loadAuthConfig(mode) {
|
|
31
|
+
const authPath = getAuthConfigPath(mode);
|
|
32
|
+
try {
|
|
33
|
+
const data = await readFile(authPath, "utf-8");
|
|
34
|
+
return JSON.parse(data);
|
|
35
|
+
} catch {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function encryptPassword(password2, publicKey) {
|
|
40
|
+
const encrypted = publicEncrypt(
|
|
41
|
+
{ key: publicKey, padding: 1 },
|
|
42
|
+
Buffer.from(password2)
|
|
43
|
+
);
|
|
44
|
+
return encrypted.toString("base64");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// src/cli/init.ts
|
|
48
|
+
import { generateKeyPairSync } from "crypto";
|
|
16
49
|
var LLM_OPTIONS = [
|
|
17
50
|
{ value: "http://localhost:8000", label: "http://localhost:8000" },
|
|
18
51
|
{ value: "http://localhost:11434", label: "http://localhost:11434" },
|
|
@@ -32,7 +65,7 @@ function createBaseConfig() {
|
|
|
32
65
|
visionFallback: { enabled: false, url: "http://localhost:11434", model: "qwen3-vl:2b", timeout: 120 }
|
|
33
66
|
};
|
|
34
67
|
}
|
|
35
|
-
async function promptNetworkAccessibility() {
|
|
68
|
+
async function promptNetworkAccessibility(mode) {
|
|
36
69
|
const networkChoice = await select({
|
|
37
70
|
message: "How should OpenFox be accessible?",
|
|
38
71
|
options: [
|
|
@@ -41,9 +74,52 @@ async function promptNetworkAccessibility() {
|
|
|
41
74
|
]
|
|
42
75
|
});
|
|
43
76
|
if (networkChoice === /* @__PURE__ */ Symbol.for("clack:cancel")) {
|
|
44
|
-
return "127.0.0.1";
|
|
77
|
+
return { host: "127.0.0.1", strategy: "local" };
|
|
78
|
+
}
|
|
79
|
+
const isNetwork = networkChoice === "network";
|
|
80
|
+
const host = isNetwork ? "0.0.0.0" : "127.0.0.1";
|
|
81
|
+
if (isNetwork) {
|
|
82
|
+
const existingAuth = await loadAuthConfig(mode);
|
|
83
|
+
const existingPassword = !!existingAuth?.encryptedPassword;
|
|
84
|
+
if (existingPassword) {
|
|
85
|
+
const keepChoice = await confirm({
|
|
86
|
+
message: "Keep existing password?",
|
|
87
|
+
initialValue: true
|
|
88
|
+
});
|
|
89
|
+
if (keepChoice === true) {
|
|
90
|
+
return { host, strategy: "network" };
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const passwordResult = await password({
|
|
94
|
+
message: "Set a password (optional, press Enter to skip)"
|
|
95
|
+
});
|
|
96
|
+
const pwd = typeof passwordResult === "string" ? passwordResult : "";
|
|
97
|
+
if (pwd.length > 0) {
|
|
98
|
+
const { publicKey, privateKey } = generateKeyPairSync("rsa", {
|
|
99
|
+
modulusLength: 2048,
|
|
100
|
+
privateKeyEncoding: { type: "pkcs8", format: "pem" },
|
|
101
|
+
publicKeyEncoding: { type: "spki", format: "pem" }
|
|
102
|
+
});
|
|
103
|
+
const keyPath = getAuthKeyPath(mode);
|
|
104
|
+
await writeFile2(keyPath, privateKey, { mode: 384 });
|
|
105
|
+
const encryptedPassword = encryptPassword(pwd, publicKey);
|
|
106
|
+
await saveAuthConfig(mode, {
|
|
107
|
+
strategy: "network",
|
|
108
|
+
encryptedPassword
|
|
109
|
+
});
|
|
110
|
+
} else {
|
|
111
|
+
await saveAuthConfig(mode, {
|
|
112
|
+
strategy: "network",
|
|
113
|
+
encryptedPassword: null
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
await saveAuthConfig(mode, {
|
|
118
|
+
strategy: "local",
|
|
119
|
+
encryptedPassword: null
|
|
120
|
+
});
|
|
45
121
|
}
|
|
46
|
-
return
|
|
122
|
+
return { host, strategy: isNetwork ? "network" : "local" };
|
|
47
123
|
}
|
|
48
124
|
async function runInitWithSelect(mode, existingConfig) {
|
|
49
125
|
let preserveProviders = false;
|
|
@@ -136,7 +212,7 @@ async function runInitWithSelect(mode, existingConfig) {
|
|
|
136
212
|
models: [],
|
|
137
213
|
isActive: true
|
|
138
214
|
});
|
|
139
|
-
const { setDefaultModelSelection } = await import("./config-
|
|
215
|
+
const { setDefaultModelSelection } = await import("./config-ONC2MTDE.js");
|
|
140
216
|
config = setDefaultModelSelection(config, config.providers[config.providers.length - 1].id, model ?? "auto");
|
|
141
217
|
} catch {
|
|
142
218
|
s2.stop("Server isn't available");
|
|
@@ -160,12 +236,12 @@ async function runInitWithSelect(mode, existingConfig) {
|
|
|
160
236
|
models: [],
|
|
161
237
|
isActive: true
|
|
162
238
|
});
|
|
163
|
-
const { setDefaultModelSelection } = await import("./config-
|
|
239
|
+
const { setDefaultModelSelection } = await import("./config-ONC2MTDE.js");
|
|
164
240
|
config = setDefaultModelSelection(config, config.providers[config.providers.length - 1].id, "auto");
|
|
165
241
|
}
|
|
166
242
|
}
|
|
167
243
|
}
|
|
168
|
-
const host = await promptNetworkAccessibility();
|
|
244
|
+
const { host } = await promptNetworkAccessibility(mode);
|
|
169
245
|
config.server.host = host;
|
|
170
246
|
const workdirChoice = await text({
|
|
171
247
|
message: "Workspace directory for new projects",
|
|
@@ -206,7 +282,7 @@ async function runInitWithSelect(mode, existingConfig) {
|
|
|
206
282
|
};
|
|
207
283
|
}
|
|
208
284
|
if (config.providers.length > 0 && !config.defaultModelSelection) {
|
|
209
|
-
const { setDefaultModelSelection } = await import("./config-
|
|
285
|
+
const { setDefaultModelSelection } = await import("./config-ONC2MTDE.js");
|
|
210
286
|
config = setDefaultModelSelection(config, config.providers[0].id, "auto");
|
|
211
287
|
}
|
|
212
288
|
await saveGlobalConfig(mode, config);
|
|
@@ -215,4 +291,4 @@ async function runInitWithSelect(mode, existingConfig) {
|
|
|
215
291
|
export {
|
|
216
292
|
runInitWithSelect
|
|
217
293
|
};
|
|
218
|
-
//# sourceMappingURL=init-
|
|
294
|
+
//# sourceMappingURL=init-TLQQLRGQ.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
runBuilderTurn,
|
|
4
4
|
runChatTurn,
|
|
5
5
|
runVerifierTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NIQ4X7Y7.js";
|
|
7
7
|
import {
|
|
8
8
|
TurnMetrics,
|
|
9
9
|
createChatDoneEvent,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
createMessageStartEvent,
|
|
12
12
|
createToolCallEvent,
|
|
13
13
|
createToolResultEvent
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-36AJGM6G.js";
|
|
15
15
|
import "./chunk-NW7PIZH3.js";
|
|
16
16
|
import "./chunk-WQ4W5H6A.js";
|
|
17
17
|
import "./chunk-S4QKTRGJ.js";
|
|
@@ -22,7 +22,7 @@ import "./chunk-3EHGGBWE.js";
|
|
|
22
22
|
import "./chunk-TPT6HP4H.js";
|
|
23
23
|
import "./chunk-TVQOONDR.js";
|
|
24
24
|
import "./chunk-XFXOSPYH.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-R4HADRYO.js";
|
|
26
26
|
import "./chunk-PNBH3RAX.js";
|
|
27
27
|
export {
|
|
28
28
|
TurnMetrics,
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
runChatTurn,
|
|
37
37
|
runVerifierTurn
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=orchestrator-
|
|
39
|
+
//# sourceMappingURL=orchestrator-TFJHY67A.js.map
|
package/dist/package.json
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureDataDirExists,
|
|
3
|
+
getAuthConfigPath,
|
|
4
|
+
getAuthKeyPath,
|
|
3
5
|
getDatabasePath,
|
|
4
6
|
getGlobalConfigDir,
|
|
5
7
|
getGlobalConfigPath,
|
|
6
8
|
getGlobalDataDir,
|
|
7
9
|
getSkillsDir
|
|
8
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-R4HADRYO.js";
|
|
9
11
|
export {
|
|
10
12
|
ensureDataDirExists,
|
|
13
|
+
getAuthConfigPath,
|
|
14
|
+
getAuthKeyPath,
|
|
11
15
|
getDatabasePath,
|
|
12
16
|
getGlobalConfigDir,
|
|
13
17
|
getGlobalConfigPath,
|
|
14
18
|
getGlobalDataDir,
|
|
15
19
|
getSkillsDir
|
|
16
20
|
};
|
|
17
|
-
//# sourceMappingURL=paths-
|
|
21
|
+
//# sourceMappingURL=paths-ZRI56O63.js.map
|
|
@@ -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-TFJHY67A.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-KJBVOF4W.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetchAvailableModelsFromBackend
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YSPC6TQJ.js";
|
|
4
4
|
import {
|
|
5
5
|
activateProvider,
|
|
6
6
|
addProvider,
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
loadGlobalConfig,
|
|
9
9
|
removeProvider,
|
|
10
10
|
saveGlobalConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BNK5N227.js";
|
|
12
12
|
import {
|
|
13
13
|
detectBackend,
|
|
14
14
|
detectModel
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NGSSEMII.js";
|
|
16
16
|
import "./chunk-XFXOSPYH.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-R4HADRYO.js";
|
|
18
|
+
import "./chunk-IBA3NQAD.js";
|
|
19
19
|
import "./chunk-PNBH3RAX.js";
|
|
20
20
|
|
|
21
21
|
// src/cli/provider.ts
|
|
@@ -248,7 +248,7 @@ async function runProviderAdd(mode) {
|
|
|
248
248
|
isActive: makeActive
|
|
249
249
|
});
|
|
250
250
|
if (makeActive) {
|
|
251
|
-
const { setDefaultModelSelection } = await import("./config-
|
|
251
|
+
const { setDefaultModelSelection } = await import("./config-ONC2MTDE.js");
|
|
252
252
|
newConfig = setDefaultModelSelection(newConfig, newConfig.providers[newConfig.providers.length - 1].id, selectedModel);
|
|
253
253
|
}
|
|
254
254
|
await saveGlobalConfig(mode, newConfig);
|
|
@@ -372,4 +372,4 @@ export {
|
|
|
372
372
|
runProviderRemove,
|
|
373
373
|
runProviderUse
|
|
374
374
|
};
|
|
375
|
-
//# sourceMappingURL=provider-
|
|
375
|
+
//# sourceMappingURL=provider-FAO4R2GH.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-47TNOR2U.js";
|
|
4
|
+
import "./chunk-NIQ4X7Y7.js";
|
|
5
|
+
import "./chunk-36AJGM6G.js";
|
|
6
6
|
import "./chunk-QDEKU5RL.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-YSPC6TQJ.js";
|
|
8
8
|
import "./chunk-NW7PIZH3.js";
|
|
9
9
|
import "./chunk-WQ4W5H6A.js";
|
|
10
10
|
import "./chunk-S4QKTRGJ.js";
|
|
@@ -21,15 +21,15 @@ import {
|
|
|
21
21
|
getActiveProvider,
|
|
22
22
|
getDefaultModel,
|
|
23
23
|
loadGlobalConfig
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-BNK5N227.js";
|
|
25
|
+
import "./chunk-NGSSEMII.js";
|
|
26
26
|
import "./chunk-XFXOSPYH.js";
|
|
27
27
|
import {
|
|
28
28
|
ensureDataDirExists,
|
|
29
29
|
getDatabasePath,
|
|
30
30
|
getGlobalConfigPath
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-R4HADRYO.js";
|
|
32
|
+
import "./chunk-IBA3NQAD.js";
|
|
33
33
|
import {
|
|
34
34
|
logger
|
|
35
35
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -39,7 +39,7 @@ import os from "os";
|
|
|
39
39
|
import { statSync } from "fs";
|
|
40
40
|
|
|
41
41
|
// src/constants.ts
|
|
42
|
-
var VERSION = "1.2.
|
|
42
|
+
var VERSION = "1.2.2";
|
|
43
43
|
|
|
44
44
|
// src/server/utils/network.ts
|
|
45
45
|
function getNetworkInterfaces() {
|
|
@@ -190,4 +190,4 @@ async function runServe(options) {
|
|
|
190
190
|
export {
|
|
191
191
|
runServe
|
|
192
192
|
};
|
|
193
|
-
//# sourceMappingURL=serve-
|
|
193
|
+
//# sourceMappingURL=serve-MRW7EKGE.js.map
|
package/dist/server/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer,
|
|
3
3
|
createServerHandle
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-47TNOR2U.js";
|
|
5
|
+
import "../chunk-NIQ4X7Y7.js";
|
|
6
|
+
import "../chunk-36AJGM6G.js";
|
|
7
7
|
import "../chunk-QDEKU5RL.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-YSPC6TQJ.js";
|
|
9
9
|
import "../chunk-NW7PIZH3.js";
|
|
10
10
|
import "../chunk-WQ4W5H6A.js";
|
|
11
11
|
import "../chunk-S4QKTRGJ.js";
|
|
@@ -16,10 +16,10 @@ import "../chunk-3EHGGBWE.js";
|
|
|
16
16
|
import "../chunk-QY7BMXWT.js";
|
|
17
17
|
import "../chunk-TPT6HP4H.js";
|
|
18
18
|
import "../chunk-TVQOONDR.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-NGSSEMII.js";
|
|
20
20
|
import "../chunk-XFXOSPYH.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-R4HADRYO.js";
|
|
22
|
+
import "../chunk-IBA3NQAD.js";
|
|
23
23
|
import "../chunk-PNBH3RAX.js";
|
|
24
24
|
export {
|
|
25
25
|
createServer,
|