@proxysoul/soulforge 2.16.2 → 2.16.3
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 +83 -340
- package/dist/index.js +5705 -3504
- package/dist/workers/intelligence.worker.js +48 -15
- package/dist/workers/io.worker.js +190 -155
- package/package.json +2 -1
|
@@ -29300,27 +29300,44 @@ var init_errors = __esm(() => {
|
|
|
29300
29300
|
import { existsSync as existsSync6, mkdirSync as mkdirSync2, readFileSync as readFileSync4, writeFileSync as writeFileSync3 } from "fs";
|
|
29301
29301
|
import { homedir as homedir4 } from "os";
|
|
29302
29302
|
import { join as join8 } from "path";
|
|
29303
|
+
function getConfigDir() {
|
|
29304
|
+
return join8(process.env.HOME ?? homedir4(), ".soulforge");
|
|
29305
|
+
}
|
|
29306
|
+
function getConfigFile() {
|
|
29307
|
+
return join8(getConfigDir(), "config.json");
|
|
29308
|
+
}
|
|
29303
29309
|
function loadConfig() {
|
|
29304
|
-
|
|
29305
|
-
|
|
29310
|
+
const configDir = getConfigDir();
|
|
29311
|
+
const configFile = getConfigFile();
|
|
29312
|
+
if (!existsSync6(configDir)) {
|
|
29313
|
+
mkdirSync2(configDir, {
|
|
29306
29314
|
recursive: true,
|
|
29307
29315
|
mode: 448
|
|
29308
29316
|
});
|
|
29309
29317
|
}
|
|
29310
|
-
if (!existsSync6(
|
|
29311
|
-
writeFileSync3(
|
|
29312
|
-
|
|
29318
|
+
if (!existsSync6(configFile)) {
|
|
29319
|
+
writeFileSync3(configFile, JSON.stringify(DEFAULT_CONFIG, null, 2));
|
|
29320
|
+
if (!_presetOverlay)
|
|
29321
|
+
return DEFAULT_CONFIG;
|
|
29313
29322
|
}
|
|
29323
|
+
let userConfig = {};
|
|
29314
29324
|
try {
|
|
29315
|
-
|
|
29316
|
-
return {
|
|
29317
|
-
...DEFAULT_CONFIG,
|
|
29318
|
-
...JSON.parse(raw2)
|
|
29319
|
-
};
|
|
29325
|
+
userConfig = JSON.parse(readFileSync4(configFile, "utf-8"));
|
|
29320
29326
|
} catch (err2) {
|
|
29321
|
-
logBackgroundError("config", `Failed to parse ${
|
|
29322
|
-
|
|
29327
|
+
logBackgroundError("config", `Failed to parse ${configFile}: ${err2 instanceof Error ? err2.message : String(err2)} \u2014 using defaults`);
|
|
29328
|
+
if (!_presetOverlay)
|
|
29329
|
+
return DEFAULT_CONFIG;
|
|
29323
29330
|
}
|
|
29331
|
+
let merged = {
|
|
29332
|
+
...DEFAULT_CONFIG
|
|
29333
|
+
};
|
|
29334
|
+
if (_presetOverlay)
|
|
29335
|
+
merged = applyConfigPatch(merged, _presetOverlay);
|
|
29336
|
+
merged = {
|
|
29337
|
+
...merged,
|
|
29338
|
+
...userConfig
|
|
29339
|
+
};
|
|
29340
|
+
return merged;
|
|
29324
29341
|
}
|
|
29325
29342
|
function loadProjectConfig(cwd) {
|
|
29326
29343
|
const projectFile = join8(cwd, ".soulforge", "config.json");
|
|
@@ -29334,12 +29351,27 @@ function loadProjectConfig(cwd) {
|
|
|
29334
29351
|
return null;
|
|
29335
29352
|
}
|
|
29336
29353
|
}
|
|
29337
|
-
|
|
29354
|
+
function applyConfigPatch(base, patch) {
|
|
29355
|
+
const result = {
|
|
29356
|
+
...base,
|
|
29357
|
+
...patch
|
|
29358
|
+
};
|
|
29359
|
+
for (const key2 of NESTED_KEYS) {
|
|
29360
|
+
const b3 = base[key2];
|
|
29361
|
+
const p2 = patch[key2];
|
|
29362
|
+
if (p2 && b3 && typeof b3 === "object" && typeof p2 === "object") {
|
|
29363
|
+
result[key2] = {
|
|
29364
|
+
...b3,
|
|
29365
|
+
...p2
|
|
29366
|
+
};
|
|
29367
|
+
}
|
|
29368
|
+
}
|
|
29369
|
+
return result;
|
|
29370
|
+
}
|
|
29371
|
+
var DEFAULT_CONFIG, _presetOverlay = null, NESTED_KEYS;
|
|
29338
29372
|
var init_config = __esm(() => {
|
|
29339
29373
|
init_ensure_soulforge_dir();
|
|
29340
29374
|
init_errors();
|
|
29341
|
-
CONFIG_DIR = join8(homedir4(), ".soulforge");
|
|
29342
|
-
CONFIG_FILE = join8(CONFIG_DIR, "config.json");
|
|
29343
29375
|
DEFAULT_CONFIG = {
|
|
29344
29376
|
defaultModel: "none",
|
|
29345
29377
|
routerRules: [],
|
|
@@ -29376,6 +29408,7 @@ var init_config = __esm(() => {
|
|
|
29376
29408
|
llmExtraction: true
|
|
29377
29409
|
}
|
|
29378
29410
|
};
|
|
29411
|
+
NESTED_KEYS = ["editor", "theme", "editorIntegration", "codeIntelligence", "thinking", "performance", "contextManagement", "agentFeatures", "compaction", "retry"];
|
|
29379
29412
|
});
|
|
29380
29413
|
|
|
29381
29414
|
// src/core/intelligence/backends/lsp/server-registry.ts
|
|
@@ -31019,6 +31019,175 @@ var init_model_events = __esm(() => {
|
|
|
31019
31019
|
})));
|
|
31020
31020
|
});
|
|
31021
31021
|
|
|
31022
|
+
// src/core/utils/ensure-soulforge-dir.ts
|
|
31023
|
+
import { execSync } from "child_process";
|
|
31024
|
+
import { appendFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
31025
|
+
import { join as join3 } from "path";
|
|
31026
|
+
function ensureSoulforgeDir(cwd) {
|
|
31027
|
+
const dir = join3(cwd, ENTRY);
|
|
31028
|
+
if (!existsSync(dir))
|
|
31029
|
+
mkdirSync(dir, {
|
|
31030
|
+
recursive: true
|
|
31031
|
+
});
|
|
31032
|
+
if (!patched.has(cwd)) {
|
|
31033
|
+
patched.add(cwd);
|
|
31034
|
+
try {
|
|
31035
|
+
ensureGitignore(cwd);
|
|
31036
|
+
} catch {}
|
|
31037
|
+
}
|
|
31038
|
+
return dir;
|
|
31039
|
+
}
|
|
31040
|
+
function ensureGitignore(cwd) {
|
|
31041
|
+
const status = gitCheckIgnoreStatus(cwd);
|
|
31042
|
+
if (status !== 1)
|
|
31043
|
+
return;
|
|
31044
|
+
const gitignorePath = join3(cwd, ".gitignore");
|
|
31045
|
+
if (existsSync(gitignorePath)) {
|
|
31046
|
+
const content = readFileSync(gitignorePath, "utf-8");
|
|
31047
|
+
const eol = content.includes(`\r
|
|
31048
|
+
`) ? `\r
|
|
31049
|
+
` : `
|
|
31050
|
+
`;
|
|
31051
|
+
const prefix = content.length > 0 && !content.endsWith(`
|
|
31052
|
+
`) ? eol : "";
|
|
31053
|
+
appendFileSync(gitignorePath, `${prefix}.soulforge${eol}`);
|
|
31054
|
+
} else {
|
|
31055
|
+
writeFileSync(gitignorePath, `.soulforge
|
|
31056
|
+
`);
|
|
31057
|
+
}
|
|
31058
|
+
}
|
|
31059
|
+
function gitCheckIgnoreStatus(cwd) {
|
|
31060
|
+
try {
|
|
31061
|
+
execSync("git check-ignore -q .soulforge", {
|
|
31062
|
+
cwd,
|
|
31063
|
+
stdio: "pipe",
|
|
31064
|
+
timeout: 3000
|
|
31065
|
+
});
|
|
31066
|
+
return 0;
|
|
31067
|
+
} catch (err) {
|
|
31068
|
+
return err.status ?? 128;
|
|
31069
|
+
}
|
|
31070
|
+
}
|
|
31071
|
+
var ENTRY = ".soulforge", patched;
|
|
31072
|
+
var init_ensure_soulforge_dir = __esm(() => {
|
|
31073
|
+
patched = new Set;
|
|
31074
|
+
});
|
|
31075
|
+
|
|
31076
|
+
// src/config/index.ts
|
|
31077
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
31078
|
+
import { homedir as homedir2 } from "os";
|
|
31079
|
+
import { join as join4 } from "path";
|
|
31080
|
+
function getConfigDir() {
|
|
31081
|
+
return join4(process.env.HOME ?? homedir2(), ".soulforge");
|
|
31082
|
+
}
|
|
31083
|
+
function getConfigFile() {
|
|
31084
|
+
return join4(getConfigDir(), "config.json");
|
|
31085
|
+
}
|
|
31086
|
+
function loadConfig() {
|
|
31087
|
+
const configDir = getConfigDir();
|
|
31088
|
+
const configFile = getConfigFile();
|
|
31089
|
+
if (!existsSync2(configDir)) {
|
|
31090
|
+
mkdirSync2(configDir, {
|
|
31091
|
+
recursive: true,
|
|
31092
|
+
mode: 448
|
|
31093
|
+
});
|
|
31094
|
+
}
|
|
31095
|
+
if (!existsSync2(configFile)) {
|
|
31096
|
+
writeFileSync2(configFile, JSON.stringify(DEFAULT_CONFIG, null, 2));
|
|
31097
|
+
if (!_presetOverlay)
|
|
31098
|
+
return DEFAULT_CONFIG;
|
|
31099
|
+
}
|
|
31100
|
+
let userConfig = {};
|
|
31101
|
+
try {
|
|
31102
|
+
userConfig = JSON.parse(readFileSync2(configFile, "utf-8"));
|
|
31103
|
+
} catch (err) {
|
|
31104
|
+
logBackgroundError("config", `Failed to parse ${configFile}: ${err instanceof Error ? err.message : String(err)} \u2014 using defaults`);
|
|
31105
|
+
if (!_presetOverlay)
|
|
31106
|
+
return DEFAULT_CONFIG;
|
|
31107
|
+
}
|
|
31108
|
+
let merged = {
|
|
31109
|
+
...DEFAULT_CONFIG
|
|
31110
|
+
};
|
|
31111
|
+
if (_presetOverlay)
|
|
31112
|
+
merged = applyConfigPatch(merged, _presetOverlay);
|
|
31113
|
+
merged = {
|
|
31114
|
+
...merged,
|
|
31115
|
+
...userConfig
|
|
31116
|
+
};
|
|
31117
|
+
return merged;
|
|
31118
|
+
}
|
|
31119
|
+
function loadProjectConfig(cwd) {
|
|
31120
|
+
const projectFile = join4(cwd, ".soulforge", "config.json");
|
|
31121
|
+
if (!existsSync2(projectFile))
|
|
31122
|
+
return null;
|
|
31123
|
+
try {
|
|
31124
|
+
const raw = readFileSync2(projectFile, "utf-8");
|
|
31125
|
+
return JSON.parse(raw);
|
|
31126
|
+
} catch (err) {
|
|
31127
|
+
logBackgroundError("config", `Failed to parse ${projectFile}: ${err instanceof Error ? err.message : String(err)} \u2014 ignoring project config`);
|
|
31128
|
+
return null;
|
|
31129
|
+
}
|
|
31130
|
+
}
|
|
31131
|
+
function applyConfigPatch(base, patch) {
|
|
31132
|
+
const result = {
|
|
31133
|
+
...base,
|
|
31134
|
+
...patch
|
|
31135
|
+
};
|
|
31136
|
+
for (const key of NESTED_KEYS) {
|
|
31137
|
+
const b = base[key];
|
|
31138
|
+
const p = patch[key];
|
|
31139
|
+
if (p && b && typeof b === "object" && typeof p === "object") {
|
|
31140
|
+
result[key] = {
|
|
31141
|
+
...b,
|
|
31142
|
+
...p
|
|
31143
|
+
};
|
|
31144
|
+
}
|
|
31145
|
+
}
|
|
31146
|
+
return result;
|
|
31147
|
+
}
|
|
31148
|
+
var DEFAULT_CONFIG, _presetOverlay = null, NESTED_KEYS;
|
|
31149
|
+
var init_config = __esm(() => {
|
|
31150
|
+
init_ensure_soulforge_dir();
|
|
31151
|
+
init_errors4();
|
|
31152
|
+
DEFAULT_CONFIG = {
|
|
31153
|
+
defaultModel: "none",
|
|
31154
|
+
routerRules: [],
|
|
31155
|
+
editor: {
|
|
31156
|
+
command: "nvim",
|
|
31157
|
+
args: []
|
|
31158
|
+
},
|
|
31159
|
+
theme: {
|
|
31160
|
+
name: "proxysoul-main",
|
|
31161
|
+
transparent: true
|
|
31162
|
+
},
|
|
31163
|
+
nvimConfig: "default",
|
|
31164
|
+
editorIntegration: {
|
|
31165
|
+
diagnostics: true,
|
|
31166
|
+
symbols: true,
|
|
31167
|
+
hover: true,
|
|
31168
|
+
references: true,
|
|
31169
|
+
definition: true,
|
|
31170
|
+
codeActions: true,
|
|
31171
|
+
editorContext: true,
|
|
31172
|
+
rename: true,
|
|
31173
|
+
lspStatus: true,
|
|
31174
|
+
format: true,
|
|
31175
|
+
syncEditorOnEdit: false
|
|
31176
|
+
},
|
|
31177
|
+
codeExecution: true,
|
|
31178
|
+
webSearch: true,
|
|
31179
|
+
compaction: {
|
|
31180
|
+
strategy: "v2",
|
|
31181
|
+
triggerThreshold: 0.7,
|
|
31182
|
+
resetThreshold: 0.4,
|
|
31183
|
+
keepRecent: 4,
|
|
31184
|
+
maxToolResults: 30,
|
|
31185
|
+
llmExtraction: true
|
|
31186
|
+
}
|
|
31187
|
+
};
|
|
31188
|
+
NESTED_KEYS = ["editor", "theme", "editorIntegration", "codeIntelligence", "thinking", "performance", "contextManagement", "agentFeatures", "compaction", "retry"];
|
|
31189
|
+
});
|
|
31190
|
+
|
|
31022
31191
|
// src/utils/errors.ts
|
|
31023
31192
|
function toErrorMessage(err) {
|
|
31024
31193
|
return err instanceof Error ? err.message : String(err);
|
|
@@ -31026,9 +31195,9 @@ function toErrorMessage(err) {
|
|
|
31026
31195
|
|
|
31027
31196
|
// src/core/secrets.ts
|
|
31028
31197
|
import { spawnSync } from "child_process";
|
|
31029
|
-
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
31030
|
-
import { homedir as
|
|
31031
|
-
import { join as
|
|
31198
|
+
import { chmodSync, existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
31199
|
+
import { homedir as homedir3 } from "os";
|
|
31200
|
+
import { join as join5 } from "path";
|
|
31032
31201
|
function keychainAvailable() {
|
|
31033
31202
|
if (process.platform === "darwin")
|
|
31034
31203
|
return true;
|
|
@@ -31069,8 +31238,8 @@ function keychainGet(key) {
|
|
|
31069
31238
|
}
|
|
31070
31239
|
function fileRead() {
|
|
31071
31240
|
try {
|
|
31072
|
-
if (
|
|
31073
|
-
return JSON.parse(
|
|
31241
|
+
if (existsSync3(SECRETS_FILE)) {
|
|
31242
|
+
return JSON.parse(readFileSync3(SECRETS_FILE, "utf-8"));
|
|
31074
31243
|
}
|
|
31075
31244
|
} catch {}
|
|
31076
31245
|
return {};
|
|
@@ -31112,8 +31281,8 @@ function getProviderApiKey(envVar, priority = _defaultPriority) {
|
|
|
31112
31281
|
var _keychainHasCache, SECRETS_DIR, SECRETS_FILE, KEYCHAIN_SERVICE = "soulforge", _defaultPriority = "env", STATIC_SECRETS, ENV_MAP, ENV_TO_SECRET;
|
|
31113
31282
|
var init_secrets = __esm(() => {
|
|
31114
31283
|
_keychainHasCache = new Map;
|
|
31115
|
-
SECRETS_DIR =
|
|
31116
|
-
SECRETS_FILE =
|
|
31284
|
+
SECRETS_DIR = join5(homedir3(), ".soulforge");
|
|
31285
|
+
SECRETS_FILE = join5(SECRETS_DIR, "secrets.json");
|
|
31117
31286
|
STATIC_SECRETS = {
|
|
31118
31287
|
"brave-api-key": "BRAVE_SEARCH_API_KEY",
|
|
31119
31288
|
"jina-api-key": "JINA_API_KEY"
|
|
@@ -42168,7 +42337,7 @@ import { spawn as spawn3 } from "child_process";
|
|
|
42168
42337
|
import { randomUUID } from "crypto";
|
|
42169
42338
|
import { mkdtemp, rm, writeFile } from "fs/promises";
|
|
42170
42339
|
import { tmpdir } from "os";
|
|
42171
|
-
import { join as
|
|
42340
|
+
import { join as join6 } from "path";
|
|
42172
42341
|
import readline2 from "readline";
|
|
42173
42342
|
function getFunctionTools(options) {
|
|
42174
42343
|
return (options.tools ?? []).flatMap((tool2) => {
|
|
@@ -42380,8 +42549,8 @@ function collectWarnings(options) {
|
|
|
42380
42549
|
|
|
42381
42550
|
class CodexCliRunner {
|
|
42382
42551
|
async run(call) {
|
|
42383
|
-
const dir = await mkdtemp(
|
|
42384
|
-
const schemaPath =
|
|
42552
|
+
const dir = await mkdtemp(join6(tmpdir(), "soulforge-codex-"));
|
|
42553
|
+
const schemaPath = join6(dir, "schema.json");
|
|
42385
42554
|
await writeFile(schemaPath, JSON.stringify(call.schema, null, 2), "utf8");
|
|
42386
42555
|
const args = ["exec", "--json", "--ephemeral", "--skip-git-repo-check", "--sandbox", "read-only", "--color", "never", "--config", 'approval_policy="never"', "--cd", process.cwd(), "--output-schema", schemaPath, "--model", call.modelId];
|
|
42387
42556
|
try {
|
|
@@ -44282,14 +44451,14 @@ var init_store = __esm(() => {
|
|
|
44282
44451
|
});
|
|
44283
44452
|
|
|
44284
44453
|
// src/core/theme/loader.ts
|
|
44285
|
-
import { homedir as
|
|
44286
|
-
import { join as
|
|
44454
|
+
import { homedir as homedir4 } from "os";
|
|
44455
|
+
import { join as join7 } from "path";
|
|
44287
44456
|
var THEMES_DIR, THEMES_FILE, VALID_KEYS;
|
|
44288
44457
|
var init_loader = __esm(() => {
|
|
44289
44458
|
init_store();
|
|
44290
44459
|
init_tokens();
|
|
44291
|
-
THEMES_DIR =
|
|
44292
|
-
THEMES_FILE =
|
|
44460
|
+
THEMES_DIR = join7(homedir4(), ".soulforge", "themes");
|
|
44461
|
+
THEMES_FILE = join7(homedir4(), ".soulforge", "themes.json");
|
|
44293
44462
|
VALID_KEYS = new Set(Object.keys(DARK_THEME));
|
|
44294
44463
|
});
|
|
44295
44464
|
|
|
@@ -50436,148 +50605,12 @@ var init_dist8 = __esm(() => {
|
|
|
50436
50605
|
openai = createOpenAI();
|
|
50437
50606
|
});
|
|
50438
50607
|
|
|
50439
|
-
// src/core/utils/ensure-soulforge-dir.ts
|
|
50440
|
-
import { execSync } from "child_process";
|
|
50441
|
-
import { appendFileSync, existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
|
|
50442
|
-
import { join as join6 } from "path";
|
|
50443
|
-
function ensureSoulforgeDir(cwd) {
|
|
50444
|
-
const dir = join6(cwd, ENTRY);
|
|
50445
|
-
if (!existsSync2(dir))
|
|
50446
|
-
mkdirSync2(dir, {
|
|
50447
|
-
recursive: true
|
|
50448
|
-
});
|
|
50449
|
-
if (!patched.has(cwd)) {
|
|
50450
|
-
patched.add(cwd);
|
|
50451
|
-
try {
|
|
50452
|
-
ensureGitignore(cwd);
|
|
50453
|
-
} catch {}
|
|
50454
|
-
}
|
|
50455
|
-
return dir;
|
|
50456
|
-
}
|
|
50457
|
-
function ensureGitignore(cwd) {
|
|
50458
|
-
const status = gitCheckIgnoreStatus(cwd);
|
|
50459
|
-
if (status !== 1)
|
|
50460
|
-
return;
|
|
50461
|
-
const gitignorePath = join6(cwd, ".gitignore");
|
|
50462
|
-
if (existsSync2(gitignorePath)) {
|
|
50463
|
-
const content = readFileSync2(gitignorePath, "utf-8");
|
|
50464
|
-
const eol = content.includes(`\r
|
|
50465
|
-
`) ? `\r
|
|
50466
|
-
` : `
|
|
50467
|
-
`;
|
|
50468
|
-
const prefix = content.length > 0 && !content.endsWith(`
|
|
50469
|
-
`) ? eol : "";
|
|
50470
|
-
appendFileSync(gitignorePath, `${prefix}.soulforge${eol}`);
|
|
50471
|
-
} else {
|
|
50472
|
-
writeFileSync2(gitignorePath, `.soulforge
|
|
50473
|
-
`);
|
|
50474
|
-
}
|
|
50475
|
-
}
|
|
50476
|
-
function gitCheckIgnoreStatus(cwd) {
|
|
50477
|
-
try {
|
|
50478
|
-
execSync("git check-ignore -q .soulforge", {
|
|
50479
|
-
cwd,
|
|
50480
|
-
stdio: "pipe",
|
|
50481
|
-
timeout: 3000
|
|
50482
|
-
});
|
|
50483
|
-
return 0;
|
|
50484
|
-
} catch (err) {
|
|
50485
|
-
return err.status ?? 128;
|
|
50486
|
-
}
|
|
50487
|
-
}
|
|
50488
|
-
var ENTRY = ".soulforge", patched;
|
|
50489
|
-
var init_ensure_soulforge_dir = __esm(() => {
|
|
50490
|
-
patched = new Set;
|
|
50491
|
-
});
|
|
50492
|
-
|
|
50493
|
-
// src/config/index.ts
|
|
50494
|
-
import { existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
50495
|
-
import { homedir as homedir4 } from "os";
|
|
50496
|
-
import { join as join7 } from "path";
|
|
50497
|
-
function loadConfig() {
|
|
50498
|
-
if (!existsSync3(CONFIG_DIR)) {
|
|
50499
|
-
mkdirSync3(CONFIG_DIR, {
|
|
50500
|
-
recursive: true,
|
|
50501
|
-
mode: 448
|
|
50502
|
-
});
|
|
50503
|
-
}
|
|
50504
|
-
if (!existsSync3(CONFIG_FILE)) {
|
|
50505
|
-
writeFileSync3(CONFIG_FILE, JSON.stringify(DEFAULT_CONFIG, null, 2));
|
|
50506
|
-
return DEFAULT_CONFIG;
|
|
50507
|
-
}
|
|
50508
|
-
try {
|
|
50509
|
-
const raw = readFileSync3(CONFIG_FILE, "utf-8");
|
|
50510
|
-
return {
|
|
50511
|
-
...DEFAULT_CONFIG,
|
|
50512
|
-
...JSON.parse(raw)
|
|
50513
|
-
};
|
|
50514
|
-
} catch (err) {
|
|
50515
|
-
logBackgroundError("config", `Failed to parse ${CONFIG_FILE}: ${err instanceof Error ? err.message : String(err)} \u2014 using defaults`);
|
|
50516
|
-
return DEFAULT_CONFIG;
|
|
50517
|
-
}
|
|
50518
|
-
}
|
|
50519
|
-
function loadProjectConfig(cwd) {
|
|
50520
|
-
const projectFile = join7(cwd, ".soulforge", "config.json");
|
|
50521
|
-
if (!existsSync3(projectFile))
|
|
50522
|
-
return null;
|
|
50523
|
-
try {
|
|
50524
|
-
const raw = readFileSync3(projectFile, "utf-8");
|
|
50525
|
-
return JSON.parse(raw);
|
|
50526
|
-
} catch (err) {
|
|
50527
|
-
logBackgroundError("config", `Failed to parse ${projectFile}: ${err instanceof Error ? err.message : String(err)} \u2014 ignoring project config`);
|
|
50528
|
-
return null;
|
|
50529
|
-
}
|
|
50530
|
-
}
|
|
50531
|
-
var CONFIG_DIR, CONFIG_FILE, DEFAULT_CONFIG;
|
|
50532
|
-
var init_config = __esm(() => {
|
|
50533
|
-
init_ensure_soulforge_dir();
|
|
50534
|
-
init_errors4();
|
|
50535
|
-
CONFIG_DIR = join7(homedir4(), ".soulforge");
|
|
50536
|
-
CONFIG_FILE = join7(CONFIG_DIR, "config.json");
|
|
50537
|
-
DEFAULT_CONFIG = {
|
|
50538
|
-
defaultModel: "none",
|
|
50539
|
-
routerRules: [],
|
|
50540
|
-
editor: {
|
|
50541
|
-
command: "nvim",
|
|
50542
|
-
args: []
|
|
50543
|
-
},
|
|
50544
|
-
theme: {
|
|
50545
|
-
name: "proxysoul-main",
|
|
50546
|
-
transparent: true
|
|
50547
|
-
},
|
|
50548
|
-
nvimConfig: "default",
|
|
50549
|
-
editorIntegration: {
|
|
50550
|
-
diagnostics: true,
|
|
50551
|
-
symbols: true,
|
|
50552
|
-
hover: true,
|
|
50553
|
-
references: true,
|
|
50554
|
-
definition: true,
|
|
50555
|
-
codeActions: true,
|
|
50556
|
-
editorContext: true,
|
|
50557
|
-
rename: true,
|
|
50558
|
-
lspStatus: true,
|
|
50559
|
-
format: true,
|
|
50560
|
-
syncEditorOnEdit: false
|
|
50561
|
-
},
|
|
50562
|
-
codeExecution: true,
|
|
50563
|
-
webSearch: true,
|
|
50564
|
-
compaction: {
|
|
50565
|
-
strategy: "v2",
|
|
50566
|
-
triggerThreshold: 0.7,
|
|
50567
|
-
resetThreshold: 0.4,
|
|
50568
|
-
keepRecent: 4,
|
|
50569
|
-
maxToolResults: 30,
|
|
50570
|
-
llmExtraction: true
|
|
50571
|
-
}
|
|
50572
|
-
};
|
|
50573
|
-
});
|
|
50574
|
-
|
|
50575
50608
|
// package.json
|
|
50576
50609
|
var package_default;
|
|
50577
50610
|
var init_package = __esm(() => {
|
|
50578
50611
|
package_default = {
|
|
50579
50612
|
name: "@proxysoul/soulforge",
|
|
50580
|
-
version: "2.16.
|
|
50613
|
+
version: "2.16.3",
|
|
50581
50614
|
description: "Graph-powered code intelligence \u2014 multi-agent coding with codebase-aware AI",
|
|
50582
50615
|
repository: {
|
|
50583
50616
|
type: "git",
|
|
@@ -50652,6 +50685,7 @@ var init_package = __esm(() => {
|
|
|
50652
50685
|
"@ai-sdk/openai-compatible": "^2.0.47",
|
|
50653
50686
|
"@ai-sdk/xai": "^3.0.89",
|
|
50654
50687
|
"@anthropic-ai/sdk": "0.91.1",
|
|
50688
|
+
"@clack/prompts": "^1.4.0",
|
|
50655
50689
|
"@llmgateway/ai-sdk-provider": "3.7.0",
|
|
50656
50690
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
50657
50691
|
"@mozilla/readability": "0.6.0",
|
|
@@ -50682,13 +50716,13 @@ var init_package = __esm(() => {
|
|
|
50682
50716
|
// src/core/version.ts
|
|
50683
50717
|
import { homedir as homedir5 } from "os";
|
|
50684
50718
|
import { join as join8 } from "path";
|
|
50685
|
-
var
|
|
50719
|
+
var CONFIG_DIR, VERSION_CACHE_FILE, CACHE_TTL, DISMISSED_FILE, _currentVersion, CURRENT_VERSION;
|
|
50686
50720
|
var init_version = __esm(() => {
|
|
50687
50721
|
init_package();
|
|
50688
|
-
|
|
50689
|
-
VERSION_CACHE_FILE = join8(
|
|
50722
|
+
CONFIG_DIR = join8(homedir5(), ".soulforge");
|
|
50723
|
+
VERSION_CACHE_FILE = join8(CONFIG_DIR, "version-cache.json");
|
|
50690
50724
|
CACHE_TTL = 30 * 60 * 1000;
|
|
50691
|
-
DISMISSED_FILE = join8(
|
|
50725
|
+
DISMISSED_FILE = join8(CONFIG_DIR, "update-dismissed.json");
|
|
50692
50726
|
_currentVersion = package_default.version ?? "0.0.0";
|
|
50693
50727
|
CURRENT_VERSION = _currentVersion;
|
|
50694
50728
|
});
|
|
@@ -81602,6 +81636,7 @@ function buildProviderConfigs() {
|
|
|
81602
81636
|
}
|
|
81603
81637
|
var PROVIDER_CONFIGS, MODEL_CACHE_TTL, modelCache, groupedCache;
|
|
81604
81638
|
var init_models = __esm(() => {
|
|
81639
|
+
init_config();
|
|
81605
81640
|
init_secrets();
|
|
81606
81641
|
init_io_client();
|
|
81607
81642
|
init_providers();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proxysoul/soulforge",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.3",
|
|
4
4
|
"description": "Graph-powered code intelligence — multi-agent coding with codebase-aware AI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"@ai-sdk/openai-compatible": "^2.0.47",
|
|
76
76
|
"@ai-sdk/xai": "^3.0.89",
|
|
77
77
|
"@anthropic-ai/sdk": "0.91.1",
|
|
78
|
+
"@clack/prompts": "^1.4.0",
|
|
78
79
|
"@llmgateway/ai-sdk-provider": "3.7.0",
|
|
79
80
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
80
81
|
"@mozilla/readability": "0.6.0",
|