@botconnector/bccli 0.4.11 → 0.4.13
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/{acp-IPHWC6CO.js → acp-JZW3XHE5.js} +3 -3
- package/dist/{args-K5AJFDCZ.js → args-XVO7TB4C.js} +4 -4
- package/dist/{chunk-IHQGXDSG.js → chunk-3CYQYHPK.js} +1 -1
- package/dist/{chunk-OOOS5RCT.js → chunk-6JK4IBGK.js} +2 -2
- package/dist/{chunk-X24APPXO.js → chunk-6SDRWEPN.js} +1 -1
- package/dist/{chunk-6KZIOICR.js → chunk-7GM6NN5E.js} +1 -1
- package/dist/{chunk-XZ2TI5HV.js → chunk-7XD47KN5.js} +1 -1
- package/dist/{chunk-N6APAYSF.js → chunk-F6NNUUF3.js} +1 -1
- package/dist/{chunk-Y6AZGGH7.js → chunk-INMSTUB2.js} +4 -4
- package/dist/{chunk-WSZF2CTU.js → chunk-ISOKH5WB.js} +4 -4
- package/dist/{chunk-NT2G5FSX.js → chunk-JUC3ZOCV.js} +2 -2
- package/dist/{chunk-OAXD3X4R.js → chunk-KDVL2NP6.js} +1 -1
- package/dist/{chunk-F54FDJBD.js → chunk-KEKDRROL.js} +1 -1
- package/dist/{chunk-MBAMDCCV.js → chunk-KJIXA6MP.js} +7 -7
- package/dist/{chunk-2DFY43RP.js → chunk-Q42ZGVAQ.js} +2 -2
- package/dist/{chunk-G5TG43R4.js → chunk-R754XIBJ.js} +8 -3
- package/dist/{chunk-6M5T7N7A.js → chunk-S3QEZDKB.js} +3 -3
- package/dist/{chunk-JFYQCPXL.js → chunk-SWNRA3EW.js} +4 -4
- package/dist/{chunk-C2FUGQJX.js → chunk-TLCL6DC7.js} +1 -1
- package/dist/{chunk-6BXW7DGQ.js → chunk-ZJRZTMJF.js} +11 -11
- package/dist/cli.js +38 -38
- package/dist/{completion-QVDGAYUY.js → completion-Q7VHOPPV.js} +1 -1
- package/dist/{config-RZY3XQZJ.js → config-T7MKGJVG.js} +2 -2
- package/dist/{config-7TQ2KVVX.js → config-YYEAEN2C.js} +3 -3
- package/dist/{ghBotCli-HHJ4ANTH.js → ghBotCli-7VUGI63S.js} +14 -14
- package/dist/{integrationCli-LNNZDGZX.js → integrationCli-FBRSTF5F.js} +165 -9
- package/dist/{login-MQEZGF2C.js → login-BSMUGW7L.js} +4 -4
- package/dist/{mcpCli-CUIOYJ2A.js → mcpCli-ZT7CRYMP.js} +6 -6
- package/dist/{modelsCli-AAFHFI4H.js → modelsCli-2ZRW4CC4.js} +6 -6
- package/dist/{oauthLogin-YFL2N4QA.js → oauthLogin-THSM6FE7.js} +1 -1
- package/dist/{pluginsCli-2QXXFLQA.js → pluginsCli-EKQI4CJW.js} +2 -2
- package/dist/{prCli-KSA73RCS.js → prCli-FMQTOBIV.js} +1 -1
- package/dist/providerCli-3TFEKV4C.js +15 -0
- package/dist/sdk.js +8 -3
- package/dist/{serve-QYDBFTHC.js → serve-6NK2IR6R.js} +15 -15
- package/dist/{serve-EIQHEUYD.js → serve-V6YVZTNR.js} +3 -3
- package/dist/session-LX4UNPCD.js +12 -0
- package/dist/setup-MFG3BWEU.js +24 -0
- package/dist/{statsCli-EHNJIQ2Z.js → statsCli-7MIQHLVW.js} +1 -1
- package/dist/{transferCli-IXJ2O74Q.js → transferCli-SRSYQLSJ.js} +4 -4
- package/dist/{ui-A2LASWDK.js → ui-IMCUSB6Q.js} +12 -12
- package/dist/{update-TR62JV3A.js → update-PXXUITFS.js} +2 -2
- package/package.json +1 -1
- package/dist/providerCli-TXMVPSW5.js +0 -15
- package/dist/session-CQCQ7KAP.js +0 -12
- package/dist/setup-DBSGMWHM.js +0 -24
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createRuntime
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZJRZTMJF.js";
|
|
5
5
|
import "./chunk-OK2USAXX.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-KDVL2NP6.js";
|
|
7
|
+
import "./chunk-7GM6NN5E.js";
|
|
8
8
|
import "./chunk-PSO7R5AD.js";
|
|
9
9
|
import {
|
|
10
10
|
LOOPBACK_BIND,
|
|
11
11
|
parseCliArgs
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ISOKH5WB.js";
|
|
13
13
|
import "./chunk-YYTFJUO2.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-SWNRA3EW.js";
|
|
15
|
+
import "./chunk-INMSTUB2.js";
|
|
16
|
+
import "./chunk-6SDRWEPN.js";
|
|
17
|
+
import "./chunk-3CYQYHPK.js";
|
|
18
|
+
import "./chunk-KEKDRROL.js";
|
|
19
|
+
import "./chunk-6JK4IBGK.js";
|
|
20
|
+
import "./chunk-7XD47KN5.js";
|
|
21
|
+
import "./chunk-Q42ZGVAQ.js";
|
|
22
22
|
import {
|
|
23
23
|
ConfigError,
|
|
24
24
|
globalConfigPath,
|
|
25
25
|
readJsonConfig
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TLCL6DC7.js";
|
|
27
27
|
import {
|
|
28
28
|
t
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-R754XIBJ.js";
|
|
30
30
|
|
|
31
31
|
// src/ghBotWebhook.ts
|
|
32
32
|
import { createHmac, timingSafeEqual } from "crypto";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
loadConfig,
|
|
6
6
|
readCredentials,
|
|
7
7
|
resolveModel
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TLCL6DC7.js";
|
|
9
9
|
import {
|
|
10
10
|
t
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-R754XIBJ.js";
|
|
12
12
|
|
|
13
13
|
// src/integrationCli.ts
|
|
14
14
|
import { chmodSync, copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
@@ -31,10 +31,11 @@ var HERMES_ENV_ID = "BOTCONNECTOR_API_KEY";
|
|
|
31
31
|
var HERMES_PROVIDER_ID = "botconnector-cloud";
|
|
32
32
|
var FALLBACK_DEFAULT_MODEL = "glm-5.3-flash";
|
|
33
33
|
function parseTarget(raw) {
|
|
34
|
-
if (raw === "opencode" || raw === "aider" || raw === "cline" || raw === "deepseek-harness" || raw === "cursor" || raw === "openai-cli" || raw === "openai-sdk" || raw === "openai-compatible" || raw === "codex" || raw === "claude-code" || raw === "openclaw" || raw === "hermes") return raw;
|
|
34
|
+
if (raw === "opencode" || raw === "aider" || raw === "cline" || raw === "deepseek-harness" || raw === "cursor" || raw === "openai-cli" || raw === "openai-sdk" || raw === "openai-compatible" || raw === "codex" || raw === "claude-code" || raw === "openclaw" || raw === "hermes" || raw === "crush" || raw === "kilo") return raw;
|
|
35
35
|
if (raw === "dsh") return "deepseek-harness";
|
|
36
|
+
if (raw === "kilocode" || raw === "kilo-code") return "kilo";
|
|
36
37
|
throw new ConfigError(
|
|
37
|
-
t("Agent must be one of: opencode, aider, cline, deepseek-harness (dsh), cursor, openai-cli, openai-sdk, openai-compatible, codex, claude-code, openclaw, hermes")
|
|
38
|
+
t("Agent must be one of: opencode, aider, cline, deepseek-harness (dsh), cursor, openai-cli, openai-sdk, openai-compatible, codex, claude-code, openclaw, hermes, crush, kilo")
|
|
38
39
|
);
|
|
39
40
|
}
|
|
40
41
|
function homeDir(env) {
|
|
@@ -91,7 +92,18 @@ function readState(target, env) {
|
|
|
91
92
|
return null;
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
|
-
|
|
95
|
+
function capabilityFlags(item) {
|
|
96
|
+
const names = [];
|
|
97
|
+
const isRecord = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
98
|
+
const flags = item.botconnector_capabilities;
|
|
99
|
+
if (isRecord(flags)) {
|
|
100
|
+
for (const [name, enabled] of Object.entries(flags)) if (enabled === true) names.push(name);
|
|
101
|
+
}
|
|
102
|
+
const reasoning = item.botconnector_reasoning;
|
|
103
|
+
if (isRecord(reasoning) && reasoning.supported === true && !names.includes("reasoning")) names.push("reasoning");
|
|
104
|
+
return names;
|
|
105
|
+
}
|
|
106
|
+
async function botConnectorCatalog(deps) {
|
|
95
107
|
const config = loadConfig(deps.cwd, deps.env);
|
|
96
108
|
const resolved = resolveModel(config, config.model, deps.env);
|
|
97
109
|
const key = readCredentials(deps.env)["bc-cloud"] || resolved.apiKey;
|
|
@@ -101,9 +113,28 @@ async function botConnectorModels(deps) {
|
|
|
101
113
|
});
|
|
102
114
|
if (!response.ok) throw new ConfigError(t("Could not load the BotConnector model catalog (HTTP {status}).", { status: response.status }));
|
|
103
115
|
const payload = await response.json();
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
116
|
+
const entries = (payload.data ?? []).flatMap((item) => {
|
|
117
|
+
const id = typeof item.id === "string" ? item.id : "";
|
|
118
|
+
if (!id) return [];
|
|
119
|
+
const strings = (value) => Array.isArray(value) ? value.filter((v) => typeof v === "string") : void 0;
|
|
120
|
+
const num = (value) => typeof value === "number" ? value : void 0;
|
|
121
|
+
return [{
|
|
122
|
+
id,
|
|
123
|
+
name: typeof item.name === "string" ? item.name : void 0,
|
|
124
|
+
context: num(item.context),
|
|
125
|
+
context_window: num(item.context_window),
|
|
126
|
+
contextWindow: num(item.contextWindow),
|
|
127
|
+
max_tokens: num(item.max_tokens),
|
|
128
|
+
maxTokens: num(item.maxTokens),
|
|
129
|
+
capabilities: [...strings(item.capabilities) ?? [], ...capabilityFlags(item)],
|
|
130
|
+
input: strings(item.input)
|
|
131
|
+
}];
|
|
132
|
+
});
|
|
133
|
+
if (!entries.length) throw new ConfigError(t("The BotConnector model catalog is empty; cannot configure external agents."));
|
|
134
|
+
return entries;
|
|
135
|
+
}
|
|
136
|
+
async function botConnectorModels(deps) {
|
|
137
|
+
return (await botConnectorCatalog(deps)).map((item) => item.id);
|
|
107
138
|
}
|
|
108
139
|
async function connectOpenCode(deps) {
|
|
109
140
|
const home = homeDir(deps.env);
|
|
@@ -653,6 +684,129 @@ async function connectHermes(deps) {
|
|
|
653
684
|
deps.out(`Config: ${path}`);
|
|
654
685
|
deps.out(t("API key: env {env} only (via key_env; a plaintext key in config.yaml is never written).", { env: HERMES_ENV_ID }));
|
|
655
686
|
}
|
|
687
|
+
function shellQuote(value) {
|
|
688
|
+
return `'${value.replace(/'/g, `'"'"'`)}'`;
|
|
689
|
+
}
|
|
690
|
+
function modelCapabilitySet(entry) {
|
|
691
|
+
return new Set([...entry.capabilities ?? [], ...entry.input ?? []].map((value) => value.toLowerCase()));
|
|
692
|
+
}
|
|
693
|
+
function modelContextWindow(entry) {
|
|
694
|
+
return entry.contextWindow ?? entry.context_window ?? entry.context;
|
|
695
|
+
}
|
|
696
|
+
function modelOutputLimit(entry) {
|
|
697
|
+
return entry.maxTokens ?? entry.max_tokens;
|
|
698
|
+
}
|
|
699
|
+
var positiveInt = (value) => typeof value === "number" && Number.isFinite(value) && value > 0 ? Math.floor(value) : void 0;
|
|
700
|
+
async function connectCrush(deps) {
|
|
701
|
+
if (readState("crush", deps.env)) disconnect("crush", deps);
|
|
702
|
+
const home = homeDir(deps.env);
|
|
703
|
+
const configRoot = deps.env.XDG_CONFIG_HOME || join(home, ".config");
|
|
704
|
+
const configPath = join(configRoot, "crush", "crushrc");
|
|
705
|
+
const backup = safeBackup(configPath, deps.env);
|
|
706
|
+
const secret = ensureSecret(deps.env);
|
|
707
|
+
const catalog = await botConnectorCatalog(deps);
|
|
708
|
+
const models = catalog.map((item) => item.id);
|
|
709
|
+
const model = externalAgentDefaultModel(models, deps);
|
|
710
|
+
let existing = existsSync(configPath) ? readFileSync(configPath, "utf8") : "";
|
|
711
|
+
existing = stripManagedBlock(existing);
|
|
712
|
+
if (/(^|\n)\s*provider\s+add\s+botconnector\b/.test(existing)) {
|
|
713
|
+
throw new ConfigError(t("Crush already has a botconnector provider outside the BCCLI block: {path}", { path: configPath }));
|
|
714
|
+
}
|
|
715
|
+
const managed = [
|
|
716
|
+
"# BEGIN BCCLI BOTCONNECTOR",
|
|
717
|
+
"provider add botconnector \\",
|
|
718
|
+
` --name ${shellQuote("BotConnector")} \\`,
|
|
719
|
+
" --type openai-compat \\",
|
|
720
|
+
` --base-url ${shellQuote(BASE_URL)} \\`,
|
|
721
|
+
` --api-key "$(cat ${shellQuote(secret.replace(/\\/g, "/"))})" \\`,
|
|
722
|
+
" --discover-models true"
|
|
723
|
+
];
|
|
724
|
+
for (const entry of catalog) {
|
|
725
|
+
const caps = modelCapabilitySet(entry);
|
|
726
|
+
const args = [`model add ${shellQuote(`botconnector/${entry.id}`)}`, `--name ${shellQuote(entry.name || entry.id)}`];
|
|
727
|
+
const context = positiveInt(modelContextWindow(entry));
|
|
728
|
+
const output = positiveInt(modelOutputLimit(entry));
|
|
729
|
+
if (context) args.push(`--context-window ${context}`);
|
|
730
|
+
if (output) args.push(`--default-max-tokens ${output}`);
|
|
731
|
+
if (caps.has("reasoning")) args.push("--can-reason true");
|
|
732
|
+
if (caps.has("vision") || caps.has("image")) args.push("--supports-images true");
|
|
733
|
+
managed.push(args.join(" "));
|
|
734
|
+
}
|
|
735
|
+
managed.push(`model large ${shellQuote(`botconnector/${model}`)}`, "# END BCCLI BOTCONNECTOR");
|
|
736
|
+
const merged = existing.trim() ? `${existing.trimEnd()}
|
|
737
|
+
|
|
738
|
+
${managed.join("\n")}
|
|
739
|
+
` : `${managed.join("\n")}
|
|
740
|
+
`;
|
|
741
|
+
mkdirSync(dirname(configPath), { recursive: true });
|
|
742
|
+
writeFileSync(configPath, merged);
|
|
743
|
+
writeState("crush", {
|
|
744
|
+
target: "crush",
|
|
745
|
+
files: [{ path: configPath, ...backup }],
|
|
746
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
747
|
+
}, deps.env);
|
|
748
|
+
deps.out(t("Crush is connected to BotConnector ({n} models available; large model {model}).", { n: catalog.length, model }));
|
|
749
|
+
deps.out(`Config: ${configPath}`);
|
|
750
|
+
deps.out("Provider: botconnector (openai-compat, discover-models=true)");
|
|
751
|
+
}
|
|
752
|
+
function kiloModelRow(entry) {
|
|
753
|
+
const caps = modelCapabilitySet(entry);
|
|
754
|
+
const row = { name: entry.name || entry.id };
|
|
755
|
+
if (caps.has("tools") || caps.has("tool") || caps.has("tool_use")) row.tool_call = true;
|
|
756
|
+
if (caps.has("reasoning")) row.reasoning = true;
|
|
757
|
+
if (caps.has("vision") || caps.has("image")) row.modalities = { input: ["text", "image"], output: ["text"] };
|
|
758
|
+
const context = positiveInt(modelContextWindow(entry));
|
|
759
|
+
const output = positiveInt(modelOutputLimit(entry));
|
|
760
|
+
if (context || output) row.limit = { ...context ? { context } : {}, ...output ? { output } : {} };
|
|
761
|
+
return row;
|
|
762
|
+
}
|
|
763
|
+
async function connectKilo(deps) {
|
|
764
|
+
if (readState("kilo", deps.env)) disconnect("kilo", deps);
|
|
765
|
+
const home = homeDir(deps.env);
|
|
766
|
+
const configRoot = deps.env.XDG_CONFIG_HOME || join(home, ".config");
|
|
767
|
+
const configPath = join(configRoot, "kilo", "kilo.json");
|
|
768
|
+
const backup = safeBackup(configPath, deps.env);
|
|
769
|
+
const secret = ensureSecret(deps.env);
|
|
770
|
+
const catalog = await botConnectorCatalog(deps);
|
|
771
|
+
const model = externalAgentDefaultModel(catalog.map((item) => item.id), deps);
|
|
772
|
+
let doc = {};
|
|
773
|
+
if (existsSync(configPath)) {
|
|
774
|
+
try {
|
|
775
|
+
doc = JSON.parse(readFileSync(configPath, "utf8"));
|
|
776
|
+
} catch {
|
|
777
|
+
throw new ConfigError(t("The Kilo global kilo.json is not valid JSON: {path}", { path: configPath }));
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
const providers = doc.provider && typeof doc.provider === "object" && !Array.isArray(doc.provider) ? { ...doc.provider } : {};
|
|
781
|
+
const current = providers[PROVIDER_ID];
|
|
782
|
+
const currentBase = current?.options?.baseURL;
|
|
783
|
+
if (currentBase && currentBase.replace(/\/+$/, "") !== BASE_URL) {
|
|
784
|
+
throw new ConfigError(t('Kilo already has a provider "{id}" with a different endpoint.', { id: PROVIDER_ID }));
|
|
785
|
+
}
|
|
786
|
+
providers[PROVIDER_ID] = {
|
|
787
|
+
name: "BotConnector",
|
|
788
|
+
npm: "@ai-sdk/openai-compatible",
|
|
789
|
+
models: Object.fromEntries(catalog.map((entry) => [entry.id, kiloModelRow(entry)])),
|
|
790
|
+
options: {
|
|
791
|
+
apiKey: `{file:${secret.replace(/\\/g, "/")}}`,
|
|
792
|
+
baseURL: BASE_URL
|
|
793
|
+
}
|
|
794
|
+
};
|
|
795
|
+
if (!doc.$schema) doc.$schema = "https://app.kilo.ai/config.json";
|
|
796
|
+
doc.provider = providers;
|
|
797
|
+
if (!doc.model) doc.model = `botconnector/${model}`;
|
|
798
|
+
mkdirSync(dirname(configPath), { recursive: true });
|
|
799
|
+
writeFileSync(configPath, `${JSON.stringify(doc, null, 2)}
|
|
800
|
+
`);
|
|
801
|
+
writeState("kilo", {
|
|
802
|
+
target: "kilo",
|
|
803
|
+
files: [{ path: configPath, ...backup }],
|
|
804
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
805
|
+
}, deps.env);
|
|
806
|
+
deps.out(t("Kilo Code is connected to BotConnector ({n} models available; suggested model {model}).", { n: catalog.length, model }));
|
|
807
|
+
deps.out(`Config: ${configPath}`);
|
|
808
|
+
deps.out("Provider: botconnector (@ai-sdk/openai-compatible)");
|
|
809
|
+
}
|
|
656
810
|
function disconnect(target, deps) {
|
|
657
811
|
const state = readState(target, deps.env);
|
|
658
812
|
if (!state) {
|
|
@@ -687,7 +841,7 @@ function disconnect(target, deps) {
|
|
|
687
841
|
);
|
|
688
842
|
}
|
|
689
843
|
function listIntegrations(deps) {
|
|
690
|
-
for (const target of ["opencode", "aider", "cline", "deepseek-harness", "cursor", "openai-cli", "openai-sdk", "openai-compatible", "codex", "claude-code", "openclaw", "hermes"]) {
|
|
844
|
+
for (const target of ["opencode", "aider", "cline", "deepseek-harness", "cursor", "openai-cli", "openai-sdk", "openai-compatible", "codex", "claude-code", "openclaw", "hermes", "crush", "kilo"]) {
|
|
691
845
|
deps.out(`${target} ${readState(target, deps.env) ? "connected" : "not connected"}`);
|
|
692
846
|
}
|
|
693
847
|
}
|
|
@@ -711,6 +865,8 @@ async function runIntegrationCommand(args, deps) {
|
|
|
711
865
|
else if (target === "openai-compatible") await connectOpenAiCompatible(deps);
|
|
712
866
|
else if (target === "codex") await connectCodex(deps);
|
|
713
867
|
else if (target === "openclaw") await connectOpenClaw(deps);
|
|
868
|
+
else if (target === "crush") await connectCrush(deps);
|
|
869
|
+
else if (target === "kilo") await connectKilo(deps);
|
|
714
870
|
else if (target === "hermes") await connectHermes(deps);
|
|
715
871
|
else await connectClaudeCode(deps);
|
|
716
872
|
return 0;
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
readLine,
|
|
6
6
|
readSecret,
|
|
7
7
|
runLogin
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-KJIXA6MP.js";
|
|
9
|
+
import "./chunk-3CYQYHPK.js";
|
|
10
|
+
import "./chunk-TLCL6DC7.js";
|
|
11
|
+
import "./chunk-R754XIBJ.js";
|
|
12
12
|
export {
|
|
13
13
|
defaultLoginDeps,
|
|
14
14
|
echoFor,
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CATALOG,
|
|
4
4
|
fillTemplate
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JUC3ZOCV.js";
|
|
6
6
|
import {
|
|
7
7
|
authorizeMcpServer,
|
|
8
8
|
clearTokens
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3CYQYHPK.js";
|
|
10
10
|
import {
|
|
11
11
|
addGlobalServer,
|
|
12
12
|
globalMcpPath,
|
|
13
13
|
readMcpFile,
|
|
14
14
|
removeGlobalServer
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Q42ZGVAQ.js";
|
|
16
16
|
import {
|
|
17
17
|
bccliHome
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TLCL6DC7.js";
|
|
19
19
|
import {
|
|
20
20
|
t
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-R754XIBJ.js";
|
|
22
22
|
|
|
23
23
|
// src/mcpCli.ts
|
|
24
24
|
async function runMcpCommand(args, deps) {
|
|
25
25
|
const home = bccliHome(deps.env);
|
|
26
26
|
const [action = "list", name] = args.subArgs;
|
|
27
27
|
if (action === "serve") {
|
|
28
|
-
const { runMcpServe } = await import("./serve-
|
|
28
|
+
const { runMcpServe } = await import("./serve-V6YVZTNR.js");
|
|
29
29
|
return runMcpServe(args, deps);
|
|
30
30
|
}
|
|
31
31
|
const installed = readMcpFile(globalMcpPath(home));
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
listAllModels
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-INMSTUB2.js";
|
|
5
|
+
import "./chunk-6SDRWEPN.js";
|
|
6
|
+
import "./chunk-6JK4IBGK.js";
|
|
7
|
+
import "./chunk-7XD47KN5.js";
|
|
8
8
|
import {
|
|
9
9
|
loadConfig,
|
|
10
10
|
resolveModel
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TLCL6DC7.js";
|
|
12
12
|
import {
|
|
13
13
|
t
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-R754XIBJ.js";
|
|
15
15
|
|
|
16
16
|
// src/modelsCli.ts
|
|
17
17
|
async function runModelsCommand(args, deps) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
bccliHome,
|
|
4
4
|
globalConfigPath
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TLCL6DC7.js";
|
|
6
6
|
import {
|
|
7
7
|
t
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-R754XIBJ.js";
|
|
9
9
|
|
|
10
10
|
// src/pluginsCli.ts
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "fs";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
addProviderKey,
|
|
4
|
+
runProviderCommand
|
|
5
|
+
} from "./chunk-SWNRA3EW.js";
|
|
6
|
+
import "./chunk-INMSTUB2.js";
|
|
7
|
+
import "./chunk-6SDRWEPN.js";
|
|
8
|
+
import "./chunk-6JK4IBGK.js";
|
|
9
|
+
import "./chunk-7XD47KN5.js";
|
|
10
|
+
import "./chunk-TLCL6DC7.js";
|
|
11
|
+
import "./chunk-R754XIBJ.js";
|
|
12
|
+
export {
|
|
13
|
+
addProviderKey,
|
|
14
|
+
runProviderCommand
|
|
15
|
+
};
|
package/dist/sdk.js
CHANGED
|
@@ -168,7 +168,7 @@ Usage:
|
|
|
168
168
|
bccli import <file> import a session JSONL into the current project
|
|
169
169
|
bccli pr <number> [--repo owner/name] [task] check out a GitHub PR and run a task on it
|
|
170
170
|
bccli integrations show the status of external agent integrations
|
|
171
|
-
bccli connect <agent> opencode, aider, cline, dsh, codex, claude-code, cursor, openai-cli, openai-sdk, openai-compatible
|
|
171
|
+
bccli connect <agent> opencode, aider, cline, dsh, codex, claude-code, openclaw, hermes, crush, kilo, cursor, openai-cli, openai-sdk, openai-compatible
|
|
172
172
|
bccli disconnect <agent> remove an integration and restore the previous config
|
|
173
173
|
|
|
174
174
|
Options:
|
|
@@ -199,7 +199,7 @@ Pemakaian:
|
|
|
199
199
|
bccli provider list|add <id>|remove <id> kelola provider (custom: --url <url> [--name N] [--key-env ENV])
|
|
200
200
|
bccli mcp list|add <nama>|remove <nama>|auth <nama>|logout <nama>|serve [--base-url <url>] kelola server MCP, atau layani tools akun ini lewat stdio
|
|
201
201
|
bccli integrations lihat status integrasi agent eksternal
|
|
202
|
-
bccli connect <agent> opencode, aider, cline, dsh, codex, claude-code, cursor, openai-cli, openai-sdk, openai-compatible
|
|
202
|
+
bccli connect <agent> opencode, aider, cline, dsh, codex, claude-code, openclaw, hermes, crush, kilo, cursor, openai-cli, openai-sdk, openai-compatible
|
|
203
203
|
bccli disconnect <agent> lepas integrasi dan pulihkan config sebelumnya
|
|
204
204
|
|
|
205
205
|
Opsi:
|
|
@@ -377,7 +377,12 @@ Opsi:
|
|
|
377
377
|
'-p mode needs a task, e.g. bccli -p "explain this repo"': 'Mode -p butuh tugas, contoh: bccli -p "jelaskan repo ini"',
|
|
378
378
|
'Project MCP server "{name}" skipped (not approved yet; run interactive bccli once to approve it).': 'Server MCP project "{name}" dilewati (belum diizinkan; jalankan bccli interaktif sekali untuk menyetujuinya).',
|
|
379
379
|
'Interactive mode needs a terminal. For scripts/CI use: bccli -p "task"': 'Mode interaktif butuh terminal. Untuk skrip/CI pakai: bccli -p "tugas"',
|
|
380
|
-
"Agent must be one of: opencode, aider, cline, deepseek-harness (dsh), cursor, openai-cli, openai-sdk, openai-compatible, codex, claude-code, openclaw, hermes": "Agent harus salah satu dari: opencode, aider, cline, deepseek-harness (dsh), cursor, openai-cli, openai-sdk, openai-compatible, codex, claude-code, openclaw, hermes",
|
|
380
|
+
"Agent must be one of: opencode, aider, cline, deepseek-harness (dsh), cursor, openai-cli, openai-sdk, openai-compatible, codex, claude-code, openclaw, hermes, crush, kilo": "Agent harus salah satu dari: opencode, aider, cline, deepseek-harness (dsh), cursor, openai-cli, openai-sdk, openai-compatible, codex, claude-code, openclaw, hermes, crush, kilo",
|
|
381
|
+
"Crush already has a botconnector provider outside the BCCLI block: {path}": "Crush sudah memiliki provider botconnector di luar blok BCCLI: {path}",
|
|
382
|
+
"Crush is connected to BotConnector ({n} models available; large model {model}).": "Crush terhubung ke BotConnector ({n} model tersedia; model large {model}).",
|
|
383
|
+
"The Kilo global kilo.json is not valid JSON: {path}": "kilo.json global Kilo tidak valid JSON: {path}",
|
|
384
|
+
'Kilo already has a provider "{id}" with a different endpoint.': 'Kilo sudah memiliki provider "{id}" dengan endpoint lain.',
|
|
385
|
+
"Kilo Code is connected to BotConnector ({n} models available; suggested model {model}).": "Kilo Code terhubung ke BotConnector ({n} model tersedia; model yang disarankan {model}).",
|
|
381
386
|
"Cannot determine the home directory.": "Home directory tidak dapat ditentukan.",
|
|
382
387
|
"No BotConnector API key yet. Run bccli login bc-cloud first.": "API key BotConnector belum tersedia. Jalankan bccli login bc-cloud terlebih dahulu.",
|
|
383
388
|
"Could not load the BotConnector model catalog (HTTP {status}).": "Katalog model BotConnector gagal dimuat (HTTP {status}).",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createRuntime
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZJRZTMJF.js";
|
|
5
5
|
import "./chunk-OK2USAXX.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-KDVL2NP6.js";
|
|
7
|
+
import "./chunk-7GM6NN5E.js";
|
|
8
8
|
import "./chunk-PSO7R5AD.js";
|
|
9
9
|
import {
|
|
10
10
|
VERSION
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-F6NNUUF3.js";
|
|
12
12
|
import {
|
|
13
13
|
LOOPBACK_BIND,
|
|
14
14
|
MAX_FRAME_BYTES,
|
|
@@ -17,25 +17,25 @@ import {
|
|
|
17
17
|
parseClientFrame,
|
|
18
18
|
randomToken,
|
|
19
19
|
trustFence
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ISOKH5WB.js";
|
|
21
21
|
import "./chunk-YYTFJUO2.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-SWNRA3EW.js";
|
|
23
23
|
import {
|
|
24
24
|
listAllModels
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-INMSTUB2.js";
|
|
26
|
+
import "./chunk-6SDRWEPN.js";
|
|
27
|
+
import "./chunk-3CYQYHPK.js";
|
|
28
28
|
import {
|
|
29
29
|
Session
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-KEKDRROL.js";
|
|
31
|
+
import "./chunk-6JK4IBGK.js";
|
|
32
|
+
import "./chunk-7XD47KN5.js";
|
|
33
|
+
import "./chunk-Q42ZGVAQ.js";
|
|
34
34
|
import {
|
|
35
35
|
bccliHome,
|
|
36
36
|
loadConfig
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-TLCL6DC7.js";
|
|
38
|
+
import "./chunk-R754XIBJ.js";
|
|
39
39
|
|
|
40
40
|
// src/serve.ts
|
|
41
41
|
import { randomBytes } from "crypto";
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
createFetchTool,
|
|
4
4
|
createWebSearchTool,
|
|
5
5
|
isPrivateHost
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7GM6NN5E.js";
|
|
7
7
|
import "./chunk-PSO7R5AD.js";
|
|
8
8
|
import {
|
|
9
9
|
loadConfig,
|
|
10
10
|
readCredentials
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TLCL6DC7.js";
|
|
12
12
|
import {
|
|
13
13
|
t
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-R754XIBJ.js";
|
|
15
15
|
|
|
16
16
|
// src/mcpServer/serve.ts
|
|
17
17
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
createRuntime,
|
|
4
|
+
lunaPtcAutoEnabled
|
|
5
|
+
} from "./chunk-ZJRZTMJF.js";
|
|
6
|
+
import "./chunk-OK2USAXX.js";
|
|
7
|
+
import "./chunk-KDVL2NP6.js";
|
|
8
|
+
import "./chunk-7GM6NN5E.js";
|
|
9
|
+
import "./chunk-PSO7R5AD.js";
|
|
10
|
+
import "./chunk-YYTFJUO2.js";
|
|
11
|
+
import "./chunk-SWNRA3EW.js";
|
|
12
|
+
import "./chunk-INMSTUB2.js";
|
|
13
|
+
import "./chunk-6SDRWEPN.js";
|
|
14
|
+
import "./chunk-3CYQYHPK.js";
|
|
15
|
+
import "./chunk-KEKDRROL.js";
|
|
16
|
+
import "./chunk-6JK4IBGK.js";
|
|
17
|
+
import "./chunk-7XD47KN5.js";
|
|
18
|
+
import "./chunk-Q42ZGVAQ.js";
|
|
19
|
+
import "./chunk-TLCL6DC7.js";
|
|
20
|
+
import "./chunk-R754XIBJ.js";
|
|
21
|
+
export {
|
|
22
|
+
createRuntime,
|
|
23
|
+
lunaPtcAutoEnabled
|
|
24
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
Session
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-KEKDRROL.js";
|
|
5
|
+
import "./chunk-6JK4IBGK.js";
|
|
6
|
+
import "./chunk-7XD47KN5.js";
|
|
7
7
|
import {
|
|
8
8
|
t
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R754XIBJ.js";
|
|
10
10
|
|
|
11
11
|
// src/transferCli.ts
|
|
12
12
|
import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "fs";
|