@proxysoul/soulforge 2.8.0 → 2.9.0
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 +3 -1
- package/dist/index.js +12227 -13073
- package/dist/workers/intelligence.worker.js +16 -2
- package/dist/workers/io.worker.js +231 -4
- package/package.json +17 -14
|
@@ -30952,8 +30952,18 @@ class LspBackend {
|
|
|
30952
30952
|
const projectRoot = findProjectRootForLanguage(file, language) ?? this.cwd;
|
|
30953
30953
|
const langKey = `${language}:${projectRoot}`;
|
|
30954
30954
|
const existing = this.languageClients.get(langKey);
|
|
30955
|
-
if (existing && existing.length > 0
|
|
30956
|
-
|
|
30955
|
+
if (existing && existing.length > 0) {
|
|
30956
|
+
const ready = existing.filter((c) => c.isReady);
|
|
30957
|
+
if (ready.length > 0) {
|
|
30958
|
+
if (ready.length !== existing.length) {
|
|
30959
|
+
for (const c of existing) {
|
|
30960
|
+
if (!c.isReady)
|
|
30961
|
+
c.stop().catch(() => {});
|
|
30962
|
+
}
|
|
30963
|
+
this.languageClients.set(langKey, ready);
|
|
30964
|
+
}
|
|
30965
|
+
return ready;
|
|
30966
|
+
}
|
|
30957
30967
|
}
|
|
30958
30968
|
const pending = this.pendingInits.get(langKey);
|
|
30959
30969
|
if (pending)
|
|
@@ -30983,6 +30993,10 @@ class LspBackend {
|
|
|
30983
30993
|
this.failedServers.delete(serverKey);
|
|
30984
30994
|
continue;
|
|
30985
30995
|
}
|
|
30996
|
+
if (existingClient) {
|
|
30997
|
+
existingClient.stop().catch(() => {});
|
|
30998
|
+
this.standaloneClients.delete(serverKey);
|
|
30999
|
+
}
|
|
30986
31000
|
const client = new StandaloneLspClient(config, projectRoot);
|
|
30987
31001
|
try {
|
|
30988
31002
|
await client.start();
|
|
@@ -1635,6 +1635,12 @@ var init_io_client = __esm(() => {
|
|
|
1635
1635
|
async loadSession(sessionDir) {
|
|
1636
1636
|
return this.call("loadSession", sessionDir);
|
|
1637
1637
|
}
|
|
1638
|
+
async listSessions(sessionsDir) {
|
|
1639
|
+
return this.call("listSessions", sessionsDir);
|
|
1640
|
+
}
|
|
1641
|
+
async fetchModelsFromUrl(url, headers, providerId, grouped) {
|
|
1642
|
+
return this.call("fetchModelsFromUrl", url, headers, providerId, grouped);
|
|
1643
|
+
}
|
|
1638
1644
|
};
|
|
1639
1645
|
});
|
|
1640
1646
|
|
|
@@ -21969,7 +21975,7 @@ var btoa2, atob2, name14 = "AI_DownloadError", marker15, symbol17, _a17, _b15, D
|
|
|
21969
21975
|
});
|
|
21970
21976
|
}
|
|
21971
21977
|
return () => `${prefix}${separator}${generator()}`;
|
|
21972
|
-
}, generateId, FETCH_FAILED_ERROR_MESSAGES, BUN_ERROR_CODES, VERSION = "4.0.
|
|
21978
|
+
}, generateId, FETCH_FAILED_ERROR_MESSAGES, BUN_ERROR_CODES, VERSION = "4.0.23", getOriginalFetch = () => globalThis.fetch, getFromApi = async ({
|
|
21973
21979
|
url: url2,
|
|
21974
21980
|
headers = {},
|
|
21975
21981
|
successfulResponseHandler,
|
|
@@ -23456,6 +23462,17 @@ function createGatewayProvider(options = {}) {
|
|
|
23456
23462
|
o11yHeaders: createO11yHeaders()
|
|
23457
23463
|
});
|
|
23458
23464
|
};
|
|
23465
|
+
const createRerankingModel = (modelId) => {
|
|
23466
|
+
return new GatewayRerankingModel(modelId, {
|
|
23467
|
+
provider: "gateway",
|
|
23468
|
+
baseURL,
|
|
23469
|
+
headers: getHeaders,
|
|
23470
|
+
fetch: options.fetch,
|
|
23471
|
+
o11yHeaders: createO11yHeaders()
|
|
23472
|
+
});
|
|
23473
|
+
};
|
|
23474
|
+
provider.rerankingModel = createRerankingModel;
|
|
23475
|
+
provider.reranking = createRerankingModel;
|
|
23459
23476
|
provider.chat = provider.languageModel;
|
|
23460
23477
|
provider.embedding = provider.embeddingModel;
|
|
23461
23478
|
provider.image = provider.imageModel;
|
|
@@ -23984,7 +24001,66 @@ var import_oidc, import_oidc2, marker17 = "vercel.ai.gateway.error", symbol18, _
|
|
|
23984
24001
|
"ai-model-id": this.modelId
|
|
23985
24002
|
};
|
|
23986
24003
|
}
|
|
23987
|
-
}, providerMetadataEntrySchema2, gatewayVideoDataSchema, gatewayVideoWarningSchema, gatewayVideoEventSchema,
|
|
24004
|
+
}, providerMetadataEntrySchema2, gatewayVideoDataSchema, gatewayVideoWarningSchema, gatewayVideoEventSchema, GatewayRerankingModel = class {
|
|
24005
|
+
constructor(modelId, config2) {
|
|
24006
|
+
this.modelId = modelId;
|
|
24007
|
+
this.config = config2;
|
|
24008
|
+
this.specificationVersion = "v3";
|
|
24009
|
+
}
|
|
24010
|
+
get provider() {
|
|
24011
|
+
return this.config.provider;
|
|
24012
|
+
}
|
|
24013
|
+
async doRerank({
|
|
24014
|
+
documents,
|
|
24015
|
+
query,
|
|
24016
|
+
topN,
|
|
24017
|
+
headers,
|
|
24018
|
+
abortSignal,
|
|
24019
|
+
providerOptions
|
|
24020
|
+
}) {
|
|
24021
|
+
const resolvedHeaders = await resolve(this.config.headers());
|
|
24022
|
+
try {
|
|
24023
|
+
const {
|
|
24024
|
+
responseHeaders,
|
|
24025
|
+
value: responseBody,
|
|
24026
|
+
rawValue
|
|
24027
|
+
} = await postJsonToApi({
|
|
24028
|
+
url: this.getUrl(),
|
|
24029
|
+
headers: combineHeaders(resolvedHeaders, headers != null ? headers : {}, this.getModelConfigHeaders(), await resolve(this.config.o11yHeaders)),
|
|
24030
|
+
body: {
|
|
24031
|
+
documents,
|
|
24032
|
+
query,
|
|
24033
|
+
...topN != null ? { topN } : {},
|
|
24034
|
+
...providerOptions ? { providerOptions } : {}
|
|
24035
|
+
},
|
|
24036
|
+
successfulResponseHandler: createJsonResponseHandler(gatewayRerankingResponseSchema),
|
|
24037
|
+
failedResponseHandler: createJsonErrorResponseHandler({
|
|
24038
|
+
errorSchema: exports_external.any(),
|
|
24039
|
+
errorToMessage: (data) => data
|
|
24040
|
+
}),
|
|
24041
|
+
...abortSignal && { abortSignal },
|
|
24042
|
+
fetch: this.config.fetch
|
|
24043
|
+
});
|
|
24044
|
+
return {
|
|
24045
|
+
ranking: responseBody.ranking,
|
|
24046
|
+
providerMetadata: responseBody.providerMetadata,
|
|
24047
|
+
response: { headers: responseHeaders, body: rawValue },
|
|
24048
|
+
warnings: []
|
|
24049
|
+
};
|
|
24050
|
+
} catch (error48) {
|
|
24051
|
+
throw await asGatewayError(error48, await parseAuthMethod(resolvedHeaders));
|
|
24052
|
+
}
|
|
24053
|
+
}
|
|
24054
|
+
getUrl() {
|
|
24055
|
+
return `${this.config.baseURL}/reranking-model`;
|
|
24056
|
+
}
|
|
24057
|
+
getModelConfigHeaders() {
|
|
24058
|
+
return {
|
|
24059
|
+
"ai-reranking-model-specification-version": "3",
|
|
24060
|
+
"ai-model-id": this.modelId
|
|
24061
|
+
};
|
|
24062
|
+
}
|
|
24063
|
+
}, gatewayRerankingResponseSchema, parallelSearchInputSchema, parallelSearchOutputSchema, parallelSearchToolFactory, parallelSearch = (config2 = {}) => parallelSearchToolFactory(config2), perplexitySearchInputSchema, perplexitySearchOutputSchema, perplexitySearchToolFactory, perplexitySearch = (config2 = {}) => perplexitySearchToolFactory(config2), gatewayTools, VERSION2 = "3.0.93", AI_GATEWAY_PROTOCOL_VERSION = "0.0.1", gateway;
|
|
23988
24064
|
var init_dist4 = __esm(() => {
|
|
23989
24065
|
init_dist3();
|
|
23990
24066
|
init_dist();
|
|
@@ -24010,6 +24086,8 @@ var init_dist4 = __esm(() => {
|
|
|
24010
24086
|
init_dist3();
|
|
24011
24087
|
init_v4();
|
|
24012
24088
|
init_dist3();
|
|
24089
|
+
init_v4();
|
|
24090
|
+
init_dist3();
|
|
24013
24091
|
init_zod();
|
|
24014
24092
|
init_dist3();
|
|
24015
24093
|
init_zod();
|
|
@@ -24441,6 +24519,13 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
|
|
|
24441
24519
|
param: exports_external.unknown().nullable()
|
|
24442
24520
|
})
|
|
24443
24521
|
]);
|
|
24522
|
+
gatewayRerankingResponseSchema = lazySchema(() => zodSchema(exports_external.object({
|
|
24523
|
+
ranking: exports_external.array(exports_external.object({
|
|
24524
|
+
index: exports_external.number(),
|
|
24525
|
+
relevanceScore: exports_external.number()
|
|
24526
|
+
})),
|
|
24527
|
+
providerMetadata: exports_external.record(exports_external.string(), exports_external.record(exports_external.string(), exports_external.unknown())).optional()
|
|
24528
|
+
})));
|
|
24444
24529
|
parallelSearchInputSchema = lazySchema(() => zodSchema(exports_external.object({
|
|
24445
24530
|
objective: exports_external.string().describe("Natural-language description of the web research goal, including source or freshness guidance and broader context from the task. Maximum 5000 characters."),
|
|
24446
24531
|
search_queries: exports_external.array(exports_external.string()).optional().describe("Optional search queries to supplement the objective. Maximum 200 characters per query."),
|
|
@@ -28680,7 +28765,7 @@ var import_api, import_api2, __defProp2, __export2 = (target, all) => {
|
|
|
28680
28765
|
const bytes = typeof data === "string" ? convertBase64ToUint8Array(data) : data;
|
|
28681
28766
|
const id3Size = (bytes[6] & 127) << 21 | (bytes[7] & 127) << 14 | (bytes[8] & 127) << 7 | bytes[9] & 127;
|
|
28682
28767
|
return bytes.slice(id3Size + 10);
|
|
28683
|
-
}, VERSION3 = "6.0.
|
|
28768
|
+
}, VERSION3 = "6.0.152", download = async ({
|
|
28684
28769
|
url: url2,
|
|
28685
28770
|
maxBytes,
|
|
28686
28771
|
abortSignal
|
|
@@ -30444,7 +30529,7 @@ var init_summarize = __esm(() => {
|
|
|
30444
30529
|
});
|
|
30445
30530
|
|
|
30446
30531
|
// src/core/workers/io.worker.ts
|
|
30447
|
-
import { existsSync, mkdirSync, readFileSync, statSync } from "fs";
|
|
30532
|
+
import { existsSync, mkdirSync, readdirSync as readdirSync2, readFileSync, statSync } from "fs";
|
|
30448
30533
|
import { readFile, rename, writeFile } from "fs/promises";
|
|
30449
30534
|
import { extname, join as join3 } from "path";
|
|
30450
30535
|
|
|
@@ -30900,6 +30985,148 @@ var handlers = {
|
|
|
30900
30985
|
meta: meta3,
|
|
30901
30986
|
tabEntries
|
|
30902
30987
|
};
|
|
30988
|
+
},
|
|
30989
|
+
listSessions: (sessionsDir) => {
|
|
30990
|
+
const dir = sessionsDir;
|
|
30991
|
+
if (!existsSync(dir))
|
|
30992
|
+
return [];
|
|
30993
|
+
try {
|
|
30994
|
+
const entries = readdirSync2(dir);
|
|
30995
|
+
const metas = [];
|
|
30996
|
+
for (const entry of entries) {
|
|
30997
|
+
try {
|
|
30998
|
+
const fullPath = join3(dir, entry);
|
|
30999
|
+
const s = statSync(fullPath);
|
|
31000
|
+
if (!s.isDirectory())
|
|
31001
|
+
continue;
|
|
31002
|
+
const metaPath = join3(fullPath, "meta.json");
|
|
31003
|
+
if (!existsSync(metaPath))
|
|
31004
|
+
continue;
|
|
31005
|
+
const raw = readFileSync(metaPath, "utf-8");
|
|
31006
|
+
const meta3 = JSON.parse(raw);
|
|
31007
|
+
const totalMessages = (meta3.tabs ?? []).reduce((sum, t) => sum + (t.messageRange.endLine - t.messageRange.startLine), 0);
|
|
31008
|
+
let sizeBytes = 0;
|
|
31009
|
+
for (const file2 of ["meta.json", "messages.jsonl"]) {
|
|
31010
|
+
try {
|
|
31011
|
+
sizeBytes += statSync(join3(fullPath, file2)).size;
|
|
31012
|
+
} catch {}
|
|
31013
|
+
}
|
|
31014
|
+
metas.push({
|
|
31015
|
+
id: meta3.id,
|
|
31016
|
+
title: meta3.title,
|
|
31017
|
+
messageCount: totalMessages,
|
|
31018
|
+
startedAt: meta3.startedAt,
|
|
31019
|
+
updatedAt: meta3.updatedAt,
|
|
31020
|
+
sizeBytes
|
|
31021
|
+
});
|
|
31022
|
+
} catch {}
|
|
31023
|
+
}
|
|
31024
|
+
return metas.sort((a, b) => b.updatedAt - a.updatedAt);
|
|
31025
|
+
} catch {
|
|
31026
|
+
return [];
|
|
31027
|
+
}
|
|
31028
|
+
},
|
|
31029
|
+
fetchModelsFromUrl: async (url2, headers, providerId, grouped) => {
|
|
31030
|
+
const GROUP_NAMES = {
|
|
31031
|
+
anthropic: "Claude",
|
|
31032
|
+
openai: "OpenAI",
|
|
31033
|
+
google: "Google",
|
|
31034
|
+
xai: "xAI",
|
|
31035
|
+
meta: "Meta",
|
|
31036
|
+
mistral: "Mistral",
|
|
31037
|
+
deepseek: "DeepSeek",
|
|
31038
|
+
other: "Other"
|
|
31039
|
+
};
|
|
31040
|
+
function tc(s) {
|
|
31041
|
+
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
31042
|
+
}
|
|
31043
|
+
function inferGroup(modelId) {
|
|
31044
|
+
const id = modelId.toLowerCase();
|
|
31045
|
+
if (id.startsWith("claude"))
|
|
31046
|
+
return "anthropic";
|
|
31047
|
+
if (id.startsWith("gpt") || id.startsWith("o1-") || id.startsWith("o3-") || id.startsWith("o4-") || id.startsWith("chatgpt"))
|
|
31048
|
+
return "openai";
|
|
31049
|
+
if (id.startsWith("gemini"))
|
|
31050
|
+
return "google";
|
|
31051
|
+
if (id.startsWith("grok"))
|
|
31052
|
+
return "xai";
|
|
31053
|
+
if (id.startsWith("llama") || id.startsWith("meta-"))
|
|
31054
|
+
return "meta";
|
|
31055
|
+
if (id.startsWith("mistral") || id.startsWith("codestral") || id.startsWith("pixtral"))
|
|
31056
|
+
return "mistral";
|
|
31057
|
+
if (id.startsWith("deepseek"))
|
|
31058
|
+
return "deepseek";
|
|
31059
|
+
return "other";
|
|
31060
|
+
}
|
|
31061
|
+
try {
|
|
31062
|
+
const res = await fetch(url2, {
|
|
31063
|
+
headers
|
|
31064
|
+
});
|
|
31065
|
+
if (!res.ok) {
|
|
31066
|
+
return {
|
|
31067
|
+
models: [],
|
|
31068
|
+
error: `HTTP ${String(res.status)}`
|
|
31069
|
+
};
|
|
31070
|
+
}
|
|
31071
|
+
const data = await res.json();
|
|
31072
|
+
const pid = providerId;
|
|
31073
|
+
const isGrp = grouped;
|
|
31074
|
+
if (!isGrp) {
|
|
31075
|
+
const models = data.data.map((m) => ({
|
|
31076
|
+
id: m.id,
|
|
31077
|
+
name: m.name ?? m.id,
|
|
31078
|
+
contextWindow: m.context_length
|
|
31079
|
+
}));
|
|
31080
|
+
return {
|
|
31081
|
+
models
|
|
31082
|
+
};
|
|
31083
|
+
}
|
|
31084
|
+
const gMap = {};
|
|
31085
|
+
const isOR = pid === "openrouter";
|
|
31086
|
+
const isLG = pid === "llmgateway";
|
|
31087
|
+
for (const m of data.data) {
|
|
31088
|
+
let group;
|
|
31089
|
+
if (isOR) {
|
|
31090
|
+
const si = m.id.indexOf("/");
|
|
31091
|
+
group = si >= 0 ? m.id.slice(0, si).toLowerCase() : "other";
|
|
31092
|
+
} else if (isLG) {
|
|
31093
|
+
group = m.family?.toLowerCase() || inferGroup(m.id);
|
|
31094
|
+
} else {
|
|
31095
|
+
if (m.type && m.type !== "language")
|
|
31096
|
+
continue;
|
|
31097
|
+
group = m.owned_by ?? inferGroup(m.id);
|
|
31098
|
+
}
|
|
31099
|
+
const arr = gMap[group] || [];
|
|
31100
|
+
gMap[group] = arr;
|
|
31101
|
+
arr.push({
|
|
31102
|
+
id: m.id,
|
|
31103
|
+
name: isOR ? (m.name ?? m.id).replace(/^[^:]+:\s*/, "") : m.name || m.id,
|
|
31104
|
+
contextWindow: m.context_length
|
|
31105
|
+
});
|
|
31106
|
+
}
|
|
31107
|
+
const subProviders = Object.keys(gMap).sort().map((id) => ({
|
|
31108
|
+
id,
|
|
31109
|
+
name: GROUP_NAMES[id] ?? tc(id)
|
|
31110
|
+
}));
|
|
31111
|
+
const allModels = [];
|
|
31112
|
+
for (const sp of subProviders) {
|
|
31113
|
+
for (const m of gMap[sp.id] ?? [])
|
|
31114
|
+
allModels.push(m);
|
|
31115
|
+
}
|
|
31116
|
+
return {
|
|
31117
|
+
models: allModels,
|
|
31118
|
+
grouped: {
|
|
31119
|
+
subProviders,
|
|
31120
|
+
modelsByProvider: gMap
|
|
31121
|
+
}
|
|
31122
|
+
};
|
|
31123
|
+
} catch (err) {
|
|
31124
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
31125
|
+
return {
|
|
31126
|
+
models: [],
|
|
31127
|
+
error: msg
|
|
31128
|
+
};
|
|
31129
|
+
}
|
|
30903
31130
|
}
|
|
30904
31131
|
};
|
|
30905
31132
|
createWorkerHandler(handlers);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proxysoul/soulforge",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.0",
|
|
4
4
|
"description": "Graph-powered code intelligence — multi-agent coding with codebase-aware AI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -62,23 +62,23 @@
|
|
|
62
62
|
"typescript": "6.0.2"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@ai-sdk/amazon-bedrock": "^4.0.
|
|
66
|
-
"@ai-sdk/anthropic": "3.0.
|
|
67
|
-
"@ai-sdk/deepseek": "^2.0.
|
|
68
|
-
"@ai-sdk/fireworks": "^2.0.
|
|
69
|
-
"@ai-sdk/google": "3.0.
|
|
70
|
-
"@ai-sdk/groq": "^3.0.
|
|
65
|
+
"@ai-sdk/amazon-bedrock": "^4.0.92",
|
|
66
|
+
"@ai-sdk/anthropic": "3.0.68",
|
|
67
|
+
"@ai-sdk/deepseek": "^2.0.29",
|
|
68
|
+
"@ai-sdk/fireworks": "^2.0.46",
|
|
69
|
+
"@ai-sdk/google": "3.0.60",
|
|
70
|
+
"@ai-sdk/groq": "^3.0.35",
|
|
71
71
|
"@ai-sdk/mcp": "^1.0.35",
|
|
72
|
-
"@ai-sdk/mistral": "^3.0.
|
|
73
|
-
"@ai-sdk/openai": "3.0.
|
|
74
|
-
"@ai-sdk/xai": "3.0.
|
|
75
|
-
"@anthropic-ai/sdk": "0.
|
|
72
|
+
"@ai-sdk/mistral": "^3.0.30",
|
|
73
|
+
"@ai-sdk/openai": "3.0.52",
|
|
74
|
+
"@ai-sdk/xai": "3.0.80",
|
|
75
|
+
"@anthropic-ai/sdk": "0.85.0",
|
|
76
76
|
"@llmgateway/ai-sdk-provider": "3.5.0",
|
|
77
77
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
78
78
|
"@mozilla/readability": "0.6.0",
|
|
79
|
-
"@openrouter/ai-sdk-provider": "2.
|
|
80
|
-
"@opentui/react": "0.1.
|
|
81
|
-
"ai": "6.0.
|
|
79
|
+
"@openrouter/ai-sdk-provider": "2.5.0",
|
|
80
|
+
"@opentui/react": "0.1.97",
|
|
81
|
+
"ai": "6.0.152",
|
|
82
82
|
"ghostty-opentui": "1.4.10",
|
|
83
83
|
"isbinaryfile": "6.0.0",
|
|
84
84
|
"linkedom": "0.18.12",
|
|
@@ -94,5 +94,8 @@
|
|
|
94
94
|
"web-tree-sitter": "0.25.10",
|
|
95
95
|
"zod": "4.3.6",
|
|
96
96
|
"zustand": "5.0.12"
|
|
97
|
+
},
|
|
98
|
+
"overrides": {
|
|
99
|
+
"@opentui/core": "0.1.96"
|
|
97
100
|
}
|
|
98
101
|
}
|