billion-context 0.1.46-pr.211.23 → 0.1.46-pr.211.24
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/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58390,6 +58390,9 @@ import net2 from "net";
|
|
|
58390
58390
|
import os5 from "os";
|
|
58391
58391
|
import path13 from "path";
|
|
58392
58392
|
import { spawn } from "child_process";
|
|
58393
|
+
function selfDistFile(name) {
|
|
58394
|
+
return path13.join(selfPackageRoot(), "dist", name);
|
|
58395
|
+
}
|
|
58393
58396
|
var LAUNCHER_DEFAULT_HOST = "127.0.0.1";
|
|
58394
58397
|
var LAUNCHER_DEFAULT_PORT = 8787;
|
|
58395
58398
|
var LAUNCH_CLIENTS = ["pi", "codex", "claude", "omp", "opencode", "pi-test"];
|
|
@@ -58530,7 +58533,7 @@ function launcherInjectMcp(env, base) {
|
|
|
58530
58533
|
return base !== "pi" && base !== "omp" && base !== "opencode" && env.BILI_LAUNCHER_PLUGIN === "1";
|
|
58531
58534
|
}
|
|
58532
58535
|
function buildMcpConfig(origin) {
|
|
58533
|
-
const script =
|
|
58536
|
+
const script = selfDistFile("mcp.js");
|
|
58534
58537
|
return {
|
|
58535
58538
|
mcpServers: {
|
|
58536
58539
|
bili: {
|
|
@@ -58547,7 +58550,7 @@ function buildClaudePluginEnv(origin, directUrl, baseEnv) {
|
|
|
58547
58550
|
return { ...baseEnv, ANTHROPIC_BASE_URL: wrapUpstream(origin, upstream) };
|
|
58548
58551
|
}
|
|
58549
58552
|
function buildCodexMcpArgs(origin, conversationId2) {
|
|
58550
|
-
const script =
|
|
58553
|
+
const script = selfDistFile("mcp.js");
|
|
58551
58554
|
return [
|
|
58552
58555
|
"-c",
|
|
58553
58556
|
`mcp_servers.bili.command=${JSON.stringify(process.execPath)}`,
|
|
@@ -58935,7 +58938,7 @@ async function runLaunch(params, deps = {}) {
|
|
|
58935
58938
|
if (ompTmpHome) env.PI_CODING_AGENT_DIR = ompTmpHome;
|
|
58936
58939
|
} else if (base === "opencode") {
|
|
58937
58940
|
env = { ...process.env, HTTPS_PROXY: origin, NODE_EXTRA_CA_CERTS: ca, BILLION_CONTEXT_PROXY: origin };
|
|
58938
|
-
const opencodePlugin =
|
|
58941
|
+
const opencodePlugin = selfDistFile("agent/opencode.js");
|
|
58939
58942
|
const opencodePluginPath = opencodePlugin && fs10.existsSync(opencodePlugin) ? opencodePlugin : void 0;
|
|
58940
58943
|
opencodeTmpFile = prepareOpencodeHttpRewrite(resolveOpencodeConfigFile(process.env), origin, routes.httpRewrites, routes.httpsRewrites, opencodePluginPath);
|
|
58941
58944
|
if (opencodeTmpFile) env.OPENCODE_CONFIG = opencodeTmpFile;
|