@botconnector/bccli 0.4.0-beta.42 → 0.4.0-beta.43
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-PP7ZONVQ.js → acp-U25MNDND.js} +2 -2
- package/dist/{args-3DGIMRTG.js → args-MFTMBNRN.js} +4 -4
- package/dist/{chunk-LYFN6AEV.js → chunk-25DSN3Y3.js} +4 -4
- package/dist/{chunk-A2XKKKKU.js → chunk-2ON3WIDP.js} +4 -4
- package/dist/{chunk-HVGXCPDG.js → chunk-BQHKN7JI.js} +1 -1
- package/dist/{chunk-ADS5FDWL.js → chunk-CYTRCZXI.js} +20 -7
- package/dist/{chunk-Q2ZBR4OU.js → chunk-DUSVS3XK.js} +1 -1
- package/dist/{chunk-AGIZBZ64.js → chunk-GIGWZFCY.js} +1 -1
- package/dist/{chunk-3P5N6UPF.js → chunk-I7GXIJCY.js} +2 -2
- package/dist/{chunk-QZM66F3A.js → chunk-NVRNFR4S.js} +1 -1
- package/dist/{chunk-DRK3XTVZ.js → chunk-PSRNKKGA.js} +1 -1
- package/dist/{chunk-NFJPKNHL.js → chunk-PZC2Q6MJ.js} +2 -2
- package/dist/{chunk-VBEX5YHF.js → chunk-QHNWI3OT.js} +22 -1
- package/dist/{chunk-LYQHLA43.js → chunk-RMDW3OQ6.js} +2 -2
- package/dist/{chunk-O74EQFYI.js → chunk-TW5HZOTB.js} +3 -3
- package/dist/chunk-U6PCNS4B.js +20 -0
- package/dist/{chunk-I422TPGX.js → chunk-VO6MF6JJ.js} +1 -1
- package/dist/{chunk-I4THUZRD.js → chunk-Y3QKYORR.js} +6 -6
- package/dist/{chunk-HQB227LD.js → chunk-ZGH4B7OU.js} +15 -23
- package/dist/{chunk-AWNQDAOY.js → chunk-ZKMSTD6G.js} +1 -1
- package/dist/cli.js +52 -31
- package/dist/completion-6K4AXKK2.js +125 -0
- package/dist/{config-UKEKWMCG.js → config-LCY27K3L.js} +2 -2
- package/dist/{config-LFT2FNSE.js → config-Z4HSA435.js} +3 -3
- package/dist/{ghBotCli-DWQXAIKE.js → ghBotCli-TJMKJU3E.js} +14 -13
- package/dist/{integrationCli-RSJCJ3NW.js → integrationCli-33KU6GIK.js} +2 -2
- package/dist/{login-L3SUO4H4.js → login-LNF7ZV2S.js} +3 -3
- package/dist/{mcpCli-RSLEDQQ7.js → mcpCli-TXFS3AOJ.js} +5 -5
- package/dist/{modelsCli-IKZLORLH.js → modelsCli-IZSMIYVB.js} +6 -6
- package/dist/{oauthLogin-XHEMYL6L.js → oauthLogin-QGDYTOW7.js} +1 -1
- package/dist/{pluginsCli-MRS547WG.js → pluginsCli-RD4QW3DX.js} +2 -2
- package/dist/prCli-NR3ZQMST.js +73 -0
- package/dist/providerCli-AA3CHCGV.js +15 -0
- package/dist/sdk.js +34 -5
- package/dist/{serve-GFNJ5PSL.js → serve-F7BYQ7X6.js} +15 -14
- package/dist/{serve-A4E67R5E.js → serve-YNKE332Z.js} +3 -3
- package/dist/session-KRV2UP5C.js +12 -0
- package/dist/setup-L4OPF3XW.js +24 -0
- package/dist/statsCli-RPCIMT5R.js +109 -0
- package/dist/transferCli-RQBB6RVY.js +71 -0
- package/dist/{ui-STI6HSOR.js → ui-4ZTUMTYM.js} +12 -12
- package/dist/{update-KMWE2P2I.js → update-7SSREI2O.js} +2 -2
- package/package.json +1 -1
- package/dist/providerCli-7GRUL3BS.js +0 -15
- package/dist/session-VKVBMGCC.js +0 -12
- package/dist/setup-XWX64X5Q.js +0 -23
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
t
|
|
4
|
+
} from "./chunk-QHNWI3OT.js";
|
|
5
|
+
|
|
6
|
+
// src/completion.ts
|
|
7
|
+
var SHELLS = ["bash", "zsh", "fish", "powershell"];
|
|
8
|
+
function isCompletionShell(value) {
|
|
9
|
+
return SHELLS.includes(value);
|
|
10
|
+
}
|
|
11
|
+
var COMMANDS = [
|
|
12
|
+
"completion",
|
|
13
|
+
"stats",
|
|
14
|
+
"export",
|
|
15
|
+
"import",
|
|
16
|
+
"pr",
|
|
17
|
+
"login",
|
|
18
|
+
"models",
|
|
19
|
+
"update",
|
|
20
|
+
"acp",
|
|
21
|
+
"serve",
|
|
22
|
+
"plugins",
|
|
23
|
+
"gh-bot",
|
|
24
|
+
"provider",
|
|
25
|
+
"mcp",
|
|
26
|
+
"connect",
|
|
27
|
+
"disconnect",
|
|
28
|
+
"integrations"
|
|
29
|
+
];
|
|
30
|
+
var FLAGS = [
|
|
31
|
+
"-p",
|
|
32
|
+
"--print",
|
|
33
|
+
"-m",
|
|
34
|
+
"--model",
|
|
35
|
+
"--reasoning",
|
|
36
|
+
"-c",
|
|
37
|
+
"--continue",
|
|
38
|
+
"-r",
|
|
39
|
+
"--resume",
|
|
40
|
+
"--allow-all",
|
|
41
|
+
"--allowed-tools",
|
|
42
|
+
"-w",
|
|
43
|
+
"--worktree",
|
|
44
|
+
"--output-format",
|
|
45
|
+
"--permission-mode",
|
|
46
|
+
"--lang",
|
|
47
|
+
"-v",
|
|
48
|
+
"--version",
|
|
49
|
+
"-h",
|
|
50
|
+
"--help"
|
|
51
|
+
];
|
|
52
|
+
var WORDS = [...COMMANDS, ...FLAGS].join(" ");
|
|
53
|
+
function bashScript() {
|
|
54
|
+
return `# bccli bash completion \u2014 add to your shell rc:
|
|
55
|
+
# bccli completion bash > ~/.local/share/bash-completion/completions/bccli
|
|
56
|
+
_bccli_complete() {
|
|
57
|
+
local cur
|
|
58
|
+
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
59
|
+
COMPREPLY=( $(compgen -W "${WORDS}" -- "$cur") )
|
|
60
|
+
}
|
|
61
|
+
complete -F _bccli_complete bccli
|
|
62
|
+
`;
|
|
63
|
+
}
|
|
64
|
+
function zshScript() {
|
|
65
|
+
return `# bccli zsh completion \u2014 add to your shell rc:
|
|
66
|
+
# bccli completion zsh > "\${fpath[1]}/_bccli"
|
|
67
|
+
#compdef bccli
|
|
68
|
+
_bccli() {
|
|
69
|
+
local -a words_list
|
|
70
|
+
words_list=(${WORDS})
|
|
71
|
+
_describe 'command' words_list
|
|
72
|
+
}
|
|
73
|
+
compdef _bccli bccli
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
function fishScript() {
|
|
77
|
+
const lines = [
|
|
78
|
+
"# bccli fish completion \u2014 add to your config:",
|
|
79
|
+
"# bccli completion fish > ~/.config/fish/completions/bccli.fish",
|
|
80
|
+
`# flags: ${FLAGS.join(" ")}`
|
|
81
|
+
];
|
|
82
|
+
for (const w of COMMANDS) lines.push(`complete -c bccli -f -a '${w}'`);
|
|
83
|
+
for (const f of FLAGS) lines.push(`complete -c bccli -l '${f.replace(/^-+/, "")}'`);
|
|
84
|
+
return `${lines.join("\n")}
|
|
85
|
+
`;
|
|
86
|
+
}
|
|
87
|
+
function powershellScript() {
|
|
88
|
+
return `# bccli powershell completion \u2014 add to your profile:
|
|
89
|
+
# bccli completion powershell >> $PROFILE
|
|
90
|
+
Register-ArgumentCompleter -Native -CommandName bccli -ScriptBlock {
|
|
91
|
+
param($wordToComplete, $commandAst, $cursorPosition)
|
|
92
|
+
$words = '${WORDS}' -split ' '
|
|
93
|
+
$words | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object {
|
|
94
|
+
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
}
|
|
99
|
+
function completionScript(shell) {
|
|
100
|
+
switch (shell) {
|
|
101
|
+
case "bash":
|
|
102
|
+
return bashScript();
|
|
103
|
+
case "zsh":
|
|
104
|
+
return zshScript();
|
|
105
|
+
case "fish":
|
|
106
|
+
return fishScript();
|
|
107
|
+
case "powershell":
|
|
108
|
+
return powershellScript();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function runCompletionCommand(args, deps) {
|
|
112
|
+
const shell = (args.subArgs[0] ?? "").trim();
|
|
113
|
+
if (!shell || !isCompletionShell(shell)) {
|
|
114
|
+
deps.err?.(t("usage: bccli completion <{shells}>", { shells: SHELLS.join(", ") }));
|
|
115
|
+
return 1;
|
|
116
|
+
}
|
|
117
|
+
for (const line of completionScript(shell).split("\n")) deps.out(line);
|
|
118
|
+
return 0;
|
|
119
|
+
}
|
|
120
|
+
export {
|
|
121
|
+
SHELLS,
|
|
122
|
+
completionScript,
|
|
123
|
+
isCompletionShell,
|
|
124
|
+
runCompletionCommand
|
|
125
|
+
};
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
removeGlobalServer,
|
|
10
10
|
serversToStart,
|
|
11
11
|
setProjectTrust
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-PZC2Q6MJ.js";
|
|
13
|
+
import "./chunk-GIGWZFCY.js";
|
|
14
|
+
import "./chunk-QHNWI3OT.js";
|
|
15
15
|
export {
|
|
16
16
|
addGlobalServer,
|
|
17
17
|
expandEnvVars,
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createRuntime
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-ZGH4B7OU.js";
|
|
5
|
+
import "./chunk-U6PCNS4B.js";
|
|
6
|
+
import "./chunk-PSRNKKGA.js";
|
|
7
|
+
import "./chunk-NVRNFR4S.js";
|
|
7
8
|
import "./chunk-PSO7R5AD.js";
|
|
8
9
|
import {
|
|
9
10
|
LOOPBACK_BIND,
|
|
10
11
|
parseCliArgs
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CYTRCZXI.js";
|
|
12
13
|
import "./chunk-GAFJEQTJ.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-2ON3WIDP.js";
|
|
15
|
+
import "./chunk-25DSN3Y3.js";
|
|
16
|
+
import "./chunk-VO6MF6JJ.js";
|
|
16
17
|
import "./chunk-7F3IWBPQ.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-BQHKN7JI.js";
|
|
19
|
+
import "./chunk-RMDW3OQ6.js";
|
|
20
|
+
import "./chunk-ZKMSTD6G.js";
|
|
21
|
+
import "./chunk-PZC2Q6MJ.js";
|
|
21
22
|
import {
|
|
22
23
|
ConfigError,
|
|
23
24
|
globalConfigPath,
|
|
24
25
|
readJsonConfig
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-GIGWZFCY.js";
|
|
26
27
|
import {
|
|
27
28
|
t
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QHNWI3OT.js";
|
|
29
30
|
|
|
30
31
|
// src/ghBotWebhook.ts
|
|
31
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-GIGWZFCY.js";
|
|
9
9
|
import {
|
|
10
10
|
t
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QHNWI3OT.js";
|
|
12
12
|
|
|
13
13
|
// src/integrationCli.ts
|
|
14
14
|
import { chmodSync, copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
readLine,
|
|
5
5
|
readSecret,
|
|
6
6
|
runLogin
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Y3QKYORR.js";
|
|
8
8
|
import "./chunk-7F3IWBPQ.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-GIGWZFCY.js";
|
|
10
|
+
import "./chunk-QHNWI3OT.js";
|
|
11
11
|
export {
|
|
12
12
|
defaultLoginDeps,
|
|
13
13
|
readLine,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CATALOG,
|
|
4
4
|
fillTemplate
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-I7GXIJCY.js";
|
|
6
6
|
import {
|
|
7
7
|
authorizeMcpServer,
|
|
8
8
|
clearTokens
|
|
@@ -12,20 +12,20 @@ import {
|
|
|
12
12
|
globalMcpPath,
|
|
13
13
|
readMcpFile,
|
|
14
14
|
removeGlobalServer
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PZC2Q6MJ.js";
|
|
16
16
|
import {
|
|
17
17
|
bccliHome
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GIGWZFCY.js";
|
|
19
19
|
import {
|
|
20
20
|
t
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QHNWI3OT.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-YNKE332Z.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-25DSN3Y3.js";
|
|
5
|
+
import "./chunk-VO6MF6JJ.js";
|
|
6
|
+
import "./chunk-RMDW3OQ6.js";
|
|
7
|
+
import "./chunk-ZKMSTD6G.js";
|
|
8
8
|
import {
|
|
9
9
|
loadConfig,
|
|
10
10
|
resolveModel
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GIGWZFCY.js";
|
|
12
12
|
import {
|
|
13
13
|
t
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QHNWI3OT.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-GIGWZFCY.js";
|
|
6
6
|
import {
|
|
7
7
|
t
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QHNWI3OT.js";
|
|
9
9
|
|
|
10
10
|
// src/pluginsCli.ts
|
|
11
11
|
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "fs";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
t
|
|
4
|
+
} from "./chunk-QHNWI3OT.js";
|
|
5
|
+
|
|
6
|
+
// src/prCli.ts
|
|
7
|
+
import { spawn } from "child_process";
|
|
8
|
+
function defaultGh(argv) {
|
|
9
|
+
return new Promise((resolve) => {
|
|
10
|
+
const child = spawn("gh", argv, { shell: false, stdio: ["ignore", "pipe", "pipe"] });
|
|
11
|
+
let stdout = "";
|
|
12
|
+
let stderr = "";
|
|
13
|
+
child.stdout?.on("data", (d) => {
|
|
14
|
+
stdout += d;
|
|
15
|
+
});
|
|
16
|
+
child.stderr?.on("data", (d) => {
|
|
17
|
+
stderr += d;
|
|
18
|
+
});
|
|
19
|
+
child.on("error", (e) => resolve({ code: 127, stdout, stderr: String(e) }));
|
|
20
|
+
child.on("close", (code) => resolve({ code: code ?? 1, stdout, stderr }));
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
async function defaultRunTask(opts) {
|
|
24
|
+
const argv = process.execPath ? [new URL("../cli.js", import.meta.url).pathname, ...opts.prompt ? ["-p", opts.prompt] : [], "--allow-all"] : [];
|
|
25
|
+
return new Promise((resolve) => {
|
|
26
|
+
const entry = new URL("../cli.js", import.meta.url).pathname.replace(/^\/([A-Za-z]:)/, "$1");
|
|
27
|
+
const child = spawn(process.execPath, [entry, ...opts.prompt ? ["-p", opts.prompt] : [], "--allow-all"], {
|
|
28
|
+
shell: false,
|
|
29
|
+
stdio: "inherit",
|
|
30
|
+
cwd: opts.cwd
|
|
31
|
+
});
|
|
32
|
+
child.on("error", () => resolve(1));
|
|
33
|
+
child.on("close", (code) => resolve(code ?? 1));
|
|
34
|
+
void argv;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
async function runPrCommand(args, deps) {
|
|
38
|
+
const rest = [...args.subArgs];
|
|
39
|
+
let repo;
|
|
40
|
+
const words = [];
|
|
41
|
+
for (let i = 0; i < rest.length; i++) {
|
|
42
|
+
if (rest[i] === "--repo") {
|
|
43
|
+
repo = rest[++i];
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
words.push(rest[i]);
|
|
47
|
+
}
|
|
48
|
+
const number = words.shift();
|
|
49
|
+
if (!number || !/^\d+$/.test(number)) {
|
|
50
|
+
deps.err?.(t("usage: bccli pr <number> [--repo owner/name] [task]"));
|
|
51
|
+
return 1;
|
|
52
|
+
}
|
|
53
|
+
const task = words.length ? words.join(" ") : void 0;
|
|
54
|
+
const gh = deps.gh ?? defaultGh;
|
|
55
|
+
const checkoutArgv = ["pr", "checkout", number, ...repo ? ["--repo", repo] : []];
|
|
56
|
+
let res;
|
|
57
|
+
try {
|
|
58
|
+
res = await gh(checkoutArgv);
|
|
59
|
+
} catch (e) {
|
|
60
|
+
deps.err?.(t("gh is not available ({error}); install GitHub CLI first", { error: String(e) }));
|
|
61
|
+
return 1;
|
|
62
|
+
}
|
|
63
|
+
if (res.code !== 0) {
|
|
64
|
+
deps.err?.(t("gh pr checkout {n} failed (exit {code})", { n: number, code: String(res.code) }));
|
|
65
|
+
return 1;
|
|
66
|
+
}
|
|
67
|
+
deps.out(t("checked out PR #{n}", { n: number }));
|
|
68
|
+
const runTask = deps.runTask ?? defaultRunTask;
|
|
69
|
+
return runTask({ prompt: task, allowAll: true, cwd: args.cwd });
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
runPrCommand
|
|
73
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
addProviderKey,
|
|
4
|
+
runProviderCommand
|
|
5
|
+
} from "./chunk-2ON3WIDP.js";
|
|
6
|
+
import "./chunk-25DSN3Y3.js";
|
|
7
|
+
import "./chunk-VO6MF6JJ.js";
|
|
8
|
+
import "./chunk-RMDW3OQ6.js";
|
|
9
|
+
import "./chunk-ZKMSTD6G.js";
|
|
10
|
+
import "./chunk-GIGWZFCY.js";
|
|
11
|
+
import "./chunk-QHNWI3OT.js";
|
|
12
|
+
export {
|
|
13
|
+
addProviderKey,
|
|
14
|
+
runProviderCommand
|
|
15
|
+
};
|
package/dist/sdk.js
CHANGED
|
@@ -154,6 +154,11 @@ Usage:
|
|
|
154
154
|
bccli gh-bot [serve] GitHub comment bot (off-by-default; needs config)
|
|
155
155
|
bccli provider list|add <id>|remove <id> manage providers (custom: --url <url> [--name N] [--key-env ENV])
|
|
156
156
|
bccli mcp list|add <name>|remove <name>|auth <name>|logout <name>|serve [--base-url <url>] manage MCP servers, or serve this account's tools over stdio
|
|
157
|
+
bccli completion <shell> print a shell completion script (bash, zsh, fish, powershell)
|
|
158
|
+
bccli stats [--days N] show token usage from local sessions (default: last 7 days)
|
|
159
|
+
bccli export [session] [file] copy a session JSONL to a file (default: last session here)
|
|
160
|
+
bccli import <file> import a session JSONL into the current project
|
|
161
|
+
bccli pr <number> [--repo owner/name] [task] check out a GitHub PR and run a task on it
|
|
157
162
|
bccli integrations show the status of external agent integrations
|
|
158
163
|
bccli connect <agent> opencode, aider, cline, dsh, codex, claude-code, cursor, openai-cli, openai-sdk, openai-compatible, openclaw, hermes
|
|
159
164
|
bccli disconnect <agent> remove an integration and restore the previous config
|
|
@@ -475,7 +480,23 @@ Opsi:
|
|
|
475
480
|
"Run: dsh web": "Jalankan: dsh web",
|
|
476
481
|
"timeout after {n} seconds": "timeout {n} detik",
|
|
477
482
|
"Could not start MCP servers: {error}": "Tidak bisa menjalankan server MCP: {error}",
|
|
478
|
-
"Blocked: {host} resolves to a private address ({addr}). Fetching an internal host through a public DNS name is not allowed.": "Diblokir: {host} mengarah ke alamat privat ({addr}). Mengambil host internal lewat nama DNS publik tidak diizinkan."
|
|
483
|
+
"Blocked: {host} resolves to a private address ({addr}). Fetching an internal host through a public DNS name is not allowed.": "Diblokir: {host} mengarah ke alamat privat ({addr}). Mengambil host internal lewat nama DNS publik tidak diizinkan.",
|
|
484
|
+
"usage: bccli completion <{shells}>": "pakai: bccli completion <{shells}>",
|
|
485
|
+
"--days must be a positive integer": "--days harus bilangan bulat positif",
|
|
486
|
+
"no sessions in the last {days} day(s)": "tidak ada sesi dalam {days} hari terakhir",
|
|
487
|
+
"sessions (last {days} day(s)):": "sesi ({days} hari terakhir):",
|
|
488
|
+
"session(s)": "sesi",
|
|
489
|
+
"message(s)": "pesan",
|
|
490
|
+
"recorded": "tercatat",
|
|
491
|
+
"no session to export in this folder": "tidak ada sesi untuk diekspor di folder ini",
|
|
492
|
+
"exported {file}": "diekspor ke {file}",
|
|
493
|
+
"file not found: {file}": "file tidak ditemukan: {file}",
|
|
494
|
+
"invalid session file (non-JSON line): {file}": "file sesi tidak valid (baris bukan JSON): {file}",
|
|
495
|
+
"imported {n} record(s) into {file}": "impor {n} rekaman ke {file}",
|
|
496
|
+
"usage: bccli pr <number> [--repo owner/name] [task]": "pakai: bccli pr <nomor> [--repo owner/name] [tugas]",
|
|
497
|
+
"gh is not available ({error}); install GitHub CLI first": "gh tidak tersedia ({error}); pasang GitHub CLI dulu",
|
|
498
|
+
"gh pr checkout {n} failed (exit {code})": "gh pr checkout {n} gagal (exit {code})",
|
|
499
|
+
"checked out PR #{n}": "checkout PR #{n} selesai"
|
|
479
500
|
};
|
|
480
501
|
|
|
481
502
|
// src/i18n.ts
|
|
@@ -881,7 +902,9 @@ function parseCliArgs(argv) {
|
|
|
881
902
|
port: { type: "string" },
|
|
882
903
|
host: { type: "string" },
|
|
883
904
|
token: { type: "string" },
|
|
884
|
-
"base-url": { type: "string" }
|
|
905
|
+
"base-url": { type: "string" },
|
|
906
|
+
days: { type: "string" },
|
|
907
|
+
repo: { type: "string" }
|
|
885
908
|
}
|
|
886
909
|
});
|
|
887
910
|
const reasoning = values.reasoning;
|
|
@@ -898,13 +921,17 @@ function parseCliArgs(argv) {
|
|
|
898
921
|
throw new ConfigError(t("--output-format must be one of: {formats}", { formats: "text, json, stream-json" }));
|
|
899
922
|
}
|
|
900
923
|
const [first, ...rest] = positionals;
|
|
901
|
-
const SUBCOMMANDS = ["login", "models", "update", "acp", "serve", "plugins", "gh-bot", "provider", "mcp", "connect", "disconnect", "integrations"];
|
|
924
|
+
const SUBCOMMANDS = ["login", "models", "update", "acp", "serve", "plugins", "gh-bot", "provider", "mcp", "connect", "disconnect", "integrations", "completion", "stats", "export", "import", "pr"];
|
|
902
925
|
const command = SUBCOMMANDS.includes(first) ? first : "run";
|
|
903
926
|
const words2 = command === "run" ? positionals : rest;
|
|
904
927
|
const port = values.port !== void 0 ? Number(values.port) : void 0;
|
|
905
928
|
if (port !== void 0 && (!Number.isInteger(port) || port < 0 || port > 65535)) {
|
|
906
929
|
throw new ConfigError(t("--port must be a number between 0 and 65535"));
|
|
907
930
|
}
|
|
931
|
+
const days = values.days !== void 0 ? Number(values.days) : void 0;
|
|
932
|
+
if (days !== void 0 && (!Number.isInteger(days) || days < 1)) {
|
|
933
|
+
throw new ConfigError(t("--days must be a positive integer"));
|
|
934
|
+
}
|
|
908
935
|
if (values.host !== void 0 && !LOOPBACK_BIND.has(values.host)) {
|
|
909
936
|
throw new ConfigError(t("serve only accepts loopback --host (127.0.0.1, localhost, ::1)"));
|
|
910
937
|
}
|
|
@@ -927,7 +954,7 @@ function parseCliArgs(argv) {
|
|
|
927
954
|
loginProvider: command === "login" ? rest[0] ?? "bc-cloud" : void 0,
|
|
928
955
|
key: !!values.key,
|
|
929
956
|
logout: !!values.logout,
|
|
930
|
-
subArgs: ["models", "plugins", "gh-bot", "provider", "mcp", "connect", "disconnect", "integrations"].includes(command) ? rest : [],
|
|
957
|
+
subArgs: ["models", "plugins", "gh-bot", "provider", "mcp", "connect", "disconnect", "integrations", "completion", "stats", "export", "import", "pr"].includes(command) ? rest : [],
|
|
931
958
|
url: values.url,
|
|
932
959
|
name: values.name,
|
|
933
960
|
keyEnv: values["key-env"],
|
|
@@ -935,7 +962,9 @@ function parseCliArgs(argv) {
|
|
|
935
962
|
port,
|
|
936
963
|
host: values.host,
|
|
937
964
|
token: values.token,
|
|
938
|
-
baseUrl: values["base-url"]
|
|
965
|
+
baseUrl: values["base-url"],
|
|
966
|
+
days,
|
|
967
|
+
repo: values.repo
|
|
939
968
|
};
|
|
940
969
|
}
|
|
941
970
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createRuntime
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-ZGH4B7OU.js";
|
|
5
|
+
import "./chunk-U6PCNS4B.js";
|
|
6
|
+
import "./chunk-PSRNKKGA.js";
|
|
7
|
+
import "./chunk-NVRNFR4S.js";
|
|
7
8
|
import "./chunk-PSO7R5AD.js";
|
|
8
9
|
import {
|
|
9
10
|
VERSION
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DUSVS3XK.js";
|
|
11
12
|
import {
|
|
12
13
|
LOOPBACK_BIND,
|
|
13
14
|
MAX_FRAME_BYTES,
|
|
@@ -16,25 +17,25 @@ import {
|
|
|
16
17
|
parseClientFrame,
|
|
17
18
|
randomToken,
|
|
18
19
|
trustFence
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-CYTRCZXI.js";
|
|
20
21
|
import "./chunk-GAFJEQTJ.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-2ON3WIDP.js";
|
|
22
23
|
import {
|
|
23
24
|
listAllModels
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-25DSN3Y3.js";
|
|
26
|
+
import "./chunk-VO6MF6JJ.js";
|
|
26
27
|
import "./chunk-7F3IWBPQ.js";
|
|
27
28
|
import {
|
|
28
29
|
Session
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-BQHKN7JI.js";
|
|
31
|
+
import "./chunk-RMDW3OQ6.js";
|
|
32
|
+
import "./chunk-ZKMSTD6G.js";
|
|
33
|
+
import "./chunk-PZC2Q6MJ.js";
|
|
33
34
|
import {
|
|
34
35
|
bccliHome,
|
|
35
36
|
loadConfig
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
37
|
+
} from "./chunk-GIGWZFCY.js";
|
|
38
|
+
import "./chunk-QHNWI3OT.js";
|
|
38
39
|
|
|
39
40
|
// src/serve.ts
|
|
40
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-NVRNFR4S.js";
|
|
7
7
|
import "./chunk-PSO7R5AD.js";
|
|
8
8
|
import {
|
|
9
9
|
loadConfig,
|
|
10
10
|
readCredentials
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GIGWZFCY.js";
|
|
12
12
|
import {
|
|
13
13
|
t
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QHNWI3OT.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-ZGH4B7OU.js";
|
|
6
|
+
import "./chunk-U6PCNS4B.js";
|
|
7
|
+
import "./chunk-PSRNKKGA.js";
|
|
8
|
+
import "./chunk-NVRNFR4S.js";
|
|
9
|
+
import "./chunk-PSO7R5AD.js";
|
|
10
|
+
import "./chunk-GAFJEQTJ.js";
|
|
11
|
+
import "./chunk-2ON3WIDP.js";
|
|
12
|
+
import "./chunk-25DSN3Y3.js";
|
|
13
|
+
import "./chunk-VO6MF6JJ.js";
|
|
14
|
+
import "./chunk-7F3IWBPQ.js";
|
|
15
|
+
import "./chunk-BQHKN7JI.js";
|
|
16
|
+
import "./chunk-RMDW3OQ6.js";
|
|
17
|
+
import "./chunk-ZKMSTD6G.js";
|
|
18
|
+
import "./chunk-PZC2Q6MJ.js";
|
|
19
|
+
import "./chunk-GIGWZFCY.js";
|
|
20
|
+
import "./chunk-QHNWI3OT.js";
|
|
21
|
+
export {
|
|
22
|
+
createRuntime,
|
|
23
|
+
lunaPtcAutoEnabled
|
|
24
|
+
};
|