@botconnector/bccli 0.4.3 → 0.4.5
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-NU4HZHQO.js → acp-M22V2CHD.js} +2 -2
- package/dist/{args-NRTZWWEV.js → args-TFKRCKTY.js} +4 -4
- package/dist/{chunk-HQW4BROS.js → chunk-27REMLDV.js} +1 -1
- package/dist/{chunk-6UO5GX55.js → chunk-3JQZ2IKV.js} +3 -3
- package/dist/{chunk-3I5BW3ZT.js → chunk-6EGQI6HJ.js} +1 -1
- package/dist/{chunk-RX4UQX43.js → chunk-AK6TWKET.js} +1 -1
- package/dist/{chunk-XTOATEI6.js → chunk-BR63GX6T.js} +10 -8
- package/dist/{chunk-Z5NI5FIK.js → chunk-D2C6EOOS.js} +7 -7
- package/dist/{chunk-WDX62DFH.js → chunk-D7GAZKXT.js} +3 -3
- package/dist/{chunk-FUJGHCWN.js → chunk-DZPBWYTD.js} +1 -1
- package/dist/{chunk-3WHI4LN3.js → chunk-EOOWV6C6.js} +2 -0
- package/dist/{chunk-QNUJHKEL.js → chunk-FW6W5MN7.js} +11 -11
- package/dist/{chunk-7I2ZGPUS.js → chunk-JVQZWTPV.js} +4 -4
- package/dist/{chunk-GWVLPN4B.js → chunk-LHLNK7HP.js} +4 -4
- package/dist/{chunk-4W5SKQDC.js → chunk-NSARPM5C.js} +44 -21
- package/dist/{chunk-JXM6REER.js → chunk-O5ATYRUP.js} +1 -1
- package/dist/{chunk-6M55UPES.js → chunk-WTCWBY2D.js} +2 -2
- package/dist/{chunk-NQOGVP3I.js → chunk-XQVEAF3F.js} +2 -2
- package/dist/{chunk-KPTML72Q.js → chunk-XSUFHD67.js} +9 -1
- package/dist/{chunk-6AUROP2E.js → chunk-YNI4GHBI.js} +1 -1
- package/dist/cli.js +38 -38
- package/dist/{completion-D2BSBTQO.js → completion-JCBMQKNQ.js} +1 -1
- package/dist/{config-LAINORU5.js → config-2MR6V7U7.js} +2 -2
- package/dist/{config-ENDRMOTP.js → config-JCI7NAVY.js} +3 -3
- package/dist/{ghBotCli-GCIUUMKQ.js → ghBotCli-T7AWXAZ2.js} +14 -14
- package/dist/{integrationCli-HXCSEWH2.js → integrationCli-KOCF73GG.js} +2 -2
- package/dist/{login-YXSSB2HQ.js → login-OIYX4D3X.js} +4 -4
- package/dist/{mcpCli-SETTCL3K.js → mcpCli-IBC3WCHG.js} +6 -6
- package/dist/{modelsCli-656AKYZD.js → modelsCli-XZLHNWKL.js} +6 -6
- package/dist/{oauthLogin-XWY7OHCG.js → oauthLogin-TUXZLIQN.js} +1 -1
- package/dist/{pluginsCli-ZQNKWZHJ.js → pluginsCli-X7NZRU7X.js} +2 -2
- package/dist/{prCli-6PUWTMTP.js → prCli-GPDLWYWC.js} +1 -1
- package/dist/providerCli-WCFA36S4.js +15 -0
- package/dist/sdk.js +61 -26
- package/dist/{serve-K5AH4MGO.js → serve-A764QS5U.js} +3 -3
- package/dist/{serve-XPAGXIGS.js → serve-TJCT3TLE.js} +15 -15
- package/dist/session-ML2DPI7P.js +12 -0
- package/dist/setup-QYCA7ATT.js +24 -0
- package/dist/{statsCli-XR6BEZQQ.js → statsCli-FKGON32O.js} +1 -1
- package/dist/{transferCli-C6XS6QYH.js → transferCli-HA5IKJKF.js} +4 -4
- package/dist/{ui-43C6Y57K.js → ui-SMY7QSFF.js} +71 -34
- package/dist/{update-AVZO4XID.js → update-BUFIPEKY.js} +2 -2
- package/package.json +1 -1
- package/dist/providerCli-V2576JXE.js +0 -15
- package/dist/session-V2VCAF7E.js +0 -12
- package/dist/setup-HVVHOIL4.js +0 -24
package/dist/cli.js
CHANGED
|
@@ -3,47 +3,47 @@ import {
|
|
|
3
3
|
resolvePrintPrompt,
|
|
4
4
|
resolveWorktree,
|
|
5
5
|
runPrint
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D7GAZKXT.js";
|
|
7
7
|
import {
|
|
8
8
|
createRuntime
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FW6W5MN7.js";
|
|
10
10
|
import "./chunk-OK2USAXX.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-NSARPM5C.js";
|
|
12
|
+
import "./chunk-O5ATYRUP.js";
|
|
13
13
|
import "./chunk-PSO7R5AD.js";
|
|
14
14
|
import {
|
|
15
15
|
VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DZPBWYTD.js";
|
|
17
17
|
import {
|
|
18
18
|
helpText,
|
|
19
19
|
parseCliArgs
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3JQZ2IKV.js";
|
|
21
21
|
import "./chunk-WFZKJY3R.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-LHLNK7HP.js";
|
|
23
|
+
import "./chunk-JVQZWTPV.js";
|
|
24
24
|
import {
|
|
25
25
|
readGlobalConfigFile
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-27REMLDV.js";
|
|
27
27
|
import {
|
|
28
28
|
defaultLoginDeps,
|
|
29
29
|
runLogin
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-D2C6EOOS.js";
|
|
31
|
+
import "./chunk-6EGQI6HJ.js";
|
|
32
32
|
import {
|
|
33
33
|
pruneSessions
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
34
|
+
} from "./chunk-YNI4GHBI.js";
|
|
35
|
+
import "./chunk-BR63GX6T.js";
|
|
36
|
+
import "./chunk-XSUFHD67.js";
|
|
37
|
+
import "./chunk-WTCWBY2D.js";
|
|
38
38
|
import {
|
|
39
39
|
ConfigError,
|
|
40
40
|
setTheme
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-AK6TWKET.js";
|
|
42
42
|
import {
|
|
43
43
|
resolveLanguage,
|
|
44
44
|
setLanguage,
|
|
45
45
|
t
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-EOOWV6C6.js";
|
|
47
47
|
|
|
48
48
|
// src/exit.ts
|
|
49
49
|
var EXIT_GRACE_MS = 1e3;
|
|
@@ -85,17 +85,17 @@ async function main() {
|
|
|
85
85
|
if (args.worktree) cwd = (await resolveWorktree(cwd, args.worktree)).path;
|
|
86
86
|
if (args.command === "login") return runLogin(args.loginProvider ?? "bc-cloud", cwd, args, defaultLoginDeps());
|
|
87
87
|
if (args.command === "mcp") {
|
|
88
|
-
const { runMcpCommand } = await import("./mcpCli-
|
|
89
|
-
const { readSecret } = await import("./login-
|
|
88
|
+
const { runMcpCommand } = await import("./mcpCli-IBC3WCHG.js");
|
|
89
|
+
const { readSecret } = await import("./login-OIYX4D3X.js");
|
|
90
90
|
return runMcpCommand(args, { env: process.env, cwd, out: (s) => console.log(s), err: (s) => console.error(s), readSecret });
|
|
91
91
|
}
|
|
92
92
|
if (args.command === "provider") {
|
|
93
|
-
const { runProviderCommand } = await import("./providerCli-
|
|
94
|
-
const { readSecret } = await import("./login-
|
|
93
|
+
const { runProviderCommand } = await import("./providerCli-WCFA36S4.js");
|
|
94
|
+
const { readSecret } = await import("./login-OIYX4D3X.js");
|
|
95
95
|
return runProviderCommand(args, { env: process.env, cwd, out: (s) => console.log(s), err: (s) => console.error(s), readSecret });
|
|
96
96
|
}
|
|
97
97
|
if (args.command === "connect" || args.command === "disconnect" || args.command === "integrations") {
|
|
98
|
-
const { runIntegrationCommand } = await import("./integrationCli-
|
|
98
|
+
const { runIntegrationCommand } = await import("./integrationCli-KOCF73GG.js");
|
|
99
99
|
return runIntegrationCommand(args, {
|
|
100
100
|
env: process.env,
|
|
101
101
|
cwd,
|
|
@@ -105,20 +105,20 @@ async function main() {
|
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
107
|
if (args.command === "models") {
|
|
108
|
-
const { runModelsCommand } = await import("./modelsCli-
|
|
108
|
+
const { runModelsCommand } = await import("./modelsCli-XZLHNWKL.js");
|
|
109
109
|
return runModelsCommand(args, { env: process.env, cwd, out: (s) => console.log(s), err: (s) => console.error(s), fetch: globalThis.fetch });
|
|
110
110
|
}
|
|
111
111
|
if (args.command === "update") {
|
|
112
|
-
const { runUpdateCommand } = await import("./update-
|
|
112
|
+
const { runUpdateCommand } = await import("./update-BUFIPEKY.js");
|
|
113
113
|
return runUpdateCommand({ env: process.env });
|
|
114
114
|
}
|
|
115
115
|
if (args.command === "acp") {
|
|
116
|
-
const { runtimeAgent, runAcp } = await import("./acp-
|
|
116
|
+
const { runtimeAgent, runAcp } = await import("./acp-M22V2CHD.js");
|
|
117
117
|
await runAcp(process.stdin, process.stdout, { cwd, newAgent: (c) => runtimeAgent(c, args.allowAll) });
|
|
118
118
|
return 0;
|
|
119
119
|
}
|
|
120
120
|
if (args.command === "serve") {
|
|
121
|
-
const { serveBanner, startServe } = await import("./serve-
|
|
121
|
+
const { serveBanner, startServe } = await import("./serve-TJCT3TLE.js");
|
|
122
122
|
const handle = await startServe({ port: args.port, host: args.host, token: args.token, cwd, env: process.env });
|
|
123
123
|
process.stderr.write(serveBanner(handle, { token: args.token }));
|
|
124
124
|
await new Promise((resolve) => {
|
|
@@ -131,8 +131,8 @@ async function main() {
|
|
|
131
131
|
return 0;
|
|
132
132
|
}
|
|
133
133
|
if (args.command === "plugins") {
|
|
134
|
-
const { runPluginsCommand } = await import("./pluginsCli-
|
|
135
|
-
const { readGlobalPlugins, updateGlobalConfig } = await import("./config-
|
|
134
|
+
const { runPluginsCommand } = await import("./pluginsCli-X7NZRU7X.js");
|
|
135
|
+
const { readGlobalPlugins, updateGlobalConfig } = await import("./config-2MR6V7U7.js");
|
|
136
136
|
const { runNpmSync } = await import("./npmRunner-LU43GM3W.js");
|
|
137
137
|
return runPluginsCommand(args, {
|
|
138
138
|
out: (s) => console.log(s),
|
|
@@ -146,30 +146,30 @@ async function main() {
|
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
if (args.command === "gh-bot") {
|
|
149
|
-
const { runGhBotCommand } = await import("./ghBotCli-
|
|
149
|
+
const { runGhBotCommand } = await import("./ghBotCli-T7AWXAZ2.js");
|
|
150
150
|
return runGhBotCommand(args, { env: process.env, cwd, out: (s) => console.log(s), err: (s) => console.error(s) });
|
|
151
151
|
}
|
|
152
152
|
if (args.command === "completion") {
|
|
153
|
-
const { runCompletionCommand } = await import("./completion-
|
|
153
|
+
const { runCompletionCommand } = await import("./completion-JCBMQKNQ.js");
|
|
154
154
|
return runCompletionCommand(args, { out: (s) => console.log(s), err: (s) => console.error(s) });
|
|
155
155
|
}
|
|
156
156
|
if (args.command === "stats") {
|
|
157
|
-
const { runStatsCommand } = await import("./statsCli-
|
|
158
|
-
const { bccliHome } = await import("./config-
|
|
157
|
+
const { runStatsCommand } = await import("./statsCli-FKGON32O.js");
|
|
158
|
+
const { bccliHome } = await import("./config-2MR6V7U7.js");
|
|
159
159
|
return runStatsCommand(
|
|
160
160
|
{ subArgs: args.subArgs, home: bccliHome(process.env), cwd, days: args.days, tools: args.tools, models: args.models, project: args.project },
|
|
161
161
|
{ out: (s) => console.log(s), err: (s) => console.error(s) }
|
|
162
162
|
);
|
|
163
163
|
}
|
|
164
164
|
if (args.command === "export" || args.command === "import") {
|
|
165
|
-
const { runExportCommand, runImportCommand } = await import("./transferCli-
|
|
166
|
-
const { bccliHome } = await import("./config-
|
|
165
|
+
const { runExportCommand, runImportCommand } = await import("./transferCli-HA5IKJKF.js");
|
|
166
|
+
const { bccliHome } = await import("./config-2MR6V7U7.js");
|
|
167
167
|
const deps = { subArgs: args.subArgs, home: bccliHome(process.env), cwd };
|
|
168
168
|
const io = { out: (s) => console.log(s), err: (s) => console.error(s) };
|
|
169
169
|
return args.command === "export" ? runExportCommand(deps, io) : runImportCommand(deps, io);
|
|
170
170
|
}
|
|
171
171
|
if (args.command === "pr") {
|
|
172
|
-
const { runPrCommand } = await import("./prCli-
|
|
172
|
+
const { runPrCommand } = await import("./prCli-GPDLWYWC.js");
|
|
173
173
|
return runPrCommand(
|
|
174
174
|
{
|
|
175
175
|
subArgs: args.subArgs,
|
|
@@ -199,7 +199,7 @@ async function main() {
|
|
|
199
199
|
}
|
|
200
200
|
const finalPrompt = resolvePrintPrompt(args.prompt, stdinText);
|
|
201
201
|
if (!finalPrompt) throw new ConfigError(t('-p mode needs a task, e.g. bccli -p "explain this repo"'));
|
|
202
|
-
const { serversToStart } = await import("./config-
|
|
202
|
+
const { serversToStart } = await import("./config-JCI7NAVY.js");
|
|
203
203
|
const plan = serversToStart(rt.home, cwd);
|
|
204
204
|
for (const s of plan.needTrust) {
|
|
205
205
|
console.error(t('Project MCP server "{name}" skipped (not approved yet; run interactive bccli once to approve it).', { name: s.name }));
|
|
@@ -215,13 +215,13 @@ async function main() {
|
|
|
215
215
|
let updateMessage;
|
|
216
216
|
if (rt.config.updateCheck !== "off" && !process.env.BCCLI_NO_UPDATE_CHECK) {
|
|
217
217
|
try {
|
|
218
|
-
const { checkForUpdate } = await import("./update-
|
|
218
|
+
const { checkForUpdate } = await import("./update-BUFIPEKY.js");
|
|
219
219
|
const update = await checkForUpdate({ home: rt.home, fetch: globalThis.fetch, now: /* @__PURE__ */ new Date() });
|
|
220
220
|
updateMessage = update;
|
|
221
221
|
} catch {
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
const { startInteractive } = await import("./ui-
|
|
224
|
+
const { startInteractive } = await import("./ui-SMY7QSFF.js");
|
|
225
225
|
return startInteractive(rt, { initialPrompt: args.prompt, resume: args.resume, version: VERSION, updateMessage });
|
|
226
226
|
}
|
|
227
227
|
main().then(
|
|
@@ -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-WTCWBY2D.js";
|
|
13
|
+
import "./chunk-AK6TWKET.js";
|
|
14
|
+
import "./chunk-EOOWV6C6.js";
|
|
15
15
|
export {
|
|
16
16
|
addGlobalServer,
|
|
17
17
|
expandEnvVars,
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createRuntime
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FW6W5MN7.js";
|
|
5
5
|
import "./chunk-OK2USAXX.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-NSARPM5C.js";
|
|
7
|
+
import "./chunk-O5ATYRUP.js";
|
|
8
8
|
import "./chunk-PSO7R5AD.js";
|
|
9
9
|
import {
|
|
10
10
|
LOOPBACK_BIND,
|
|
11
11
|
parseCliArgs
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3JQZ2IKV.js";
|
|
13
13
|
import "./chunk-WFZKJY3R.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-LHLNK7HP.js";
|
|
15
|
+
import "./chunk-JVQZWTPV.js";
|
|
16
|
+
import "./chunk-27REMLDV.js";
|
|
17
|
+
import "./chunk-6EGQI6HJ.js";
|
|
18
|
+
import "./chunk-YNI4GHBI.js";
|
|
19
|
+
import "./chunk-BR63GX6T.js";
|
|
20
|
+
import "./chunk-XSUFHD67.js";
|
|
21
|
+
import "./chunk-WTCWBY2D.js";
|
|
22
22
|
import {
|
|
23
23
|
ConfigError,
|
|
24
24
|
globalConfigPath,
|
|
25
25
|
readJsonConfig
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-AK6TWKET.js";
|
|
27
27
|
import {
|
|
28
28
|
t
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-EOOWV6C6.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-AK6TWKET.js";
|
|
9
9
|
import {
|
|
10
10
|
t
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EOOWV6C6.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-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-D2C6EOOS.js";
|
|
8
|
+
import "./chunk-6EGQI6HJ.js";
|
|
9
|
+
import "./chunk-AK6TWKET.js";
|
|
10
|
+
import "./chunk-EOOWV6C6.js";
|
|
11
11
|
export {
|
|
12
12
|
defaultLoginDeps,
|
|
13
13
|
readLine,
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CATALOG,
|
|
4
4
|
fillTemplate
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-XQVEAF3F.js";
|
|
6
6
|
import {
|
|
7
7
|
authorizeMcpServer,
|
|
8
8
|
clearTokens
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6EGQI6HJ.js";
|
|
10
10
|
import {
|
|
11
11
|
addGlobalServer,
|
|
12
12
|
globalMcpPath,
|
|
13
13
|
readMcpFile,
|
|
14
14
|
removeGlobalServer
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WTCWBY2D.js";
|
|
16
16
|
import {
|
|
17
17
|
bccliHome
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AK6TWKET.js";
|
|
19
19
|
import {
|
|
20
20
|
t
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EOOWV6C6.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-A764QS5U.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-JVQZWTPV.js";
|
|
5
|
+
import "./chunk-27REMLDV.js";
|
|
6
|
+
import "./chunk-BR63GX6T.js";
|
|
7
|
+
import "./chunk-XSUFHD67.js";
|
|
8
8
|
import {
|
|
9
9
|
loadConfig,
|
|
10
10
|
resolveModel
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AK6TWKET.js";
|
|
12
12
|
import {
|
|
13
13
|
t
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EOOWV6C6.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-AK6TWKET.js";
|
|
6
6
|
import {
|
|
7
7
|
t
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EOOWV6C6.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-LHLNK7HP.js";
|
|
6
|
+
import "./chunk-JVQZWTPV.js";
|
|
7
|
+
import "./chunk-27REMLDV.js";
|
|
8
|
+
import "./chunk-BR63GX6T.js";
|
|
9
|
+
import "./chunk-XSUFHD67.js";
|
|
10
|
+
import "./chunk-AK6TWKET.js";
|
|
11
|
+
import "./chunk-EOOWV6C6.js";
|
|
12
|
+
export {
|
|
13
|
+
addProviderKey,
|
|
14
|
+
runProviderCommand
|
|
15
|
+
};
|
package/dist/sdk.js
CHANGED
|
@@ -69,6 +69,7 @@ var ID = {
|
|
|
69
69
|
"shift+tab switch mode": "shift+tab ganti mode",
|
|
70
70
|
"{n} tokens": "{n} token",
|
|
71
71
|
"\u273B Thinking": "\u273B Berpikir",
|
|
72
|
+
"\u273B Thinking \xB7 {n} lines": "\u273B Berpikir \xB7 {n} baris",
|
|
72
73
|
"click to toggle": "klik untuk buka/tutup",
|
|
73
74
|
"Model: {model} \xB7 reasoning: {level}": "Model: {model} \xB7 penalaran: {level}",
|
|
74
75
|
"No reasoning summary received yet; tool activity remains visible above.": "Belum ada ringkasan penalaran dari model; aktivitas tool tetap terlihat di atas.",
|
|
@@ -78,6 +79,7 @@ var ID = {
|
|
|
78
79
|
"\u2717 failed": "\u2717 gagal",
|
|
79
80
|
"\u2713 done": "\u2713 selesai",
|
|
80
81
|
"\u2026 {n} more lines ({bind})": "\u2026 {n} baris lagi ({bind})",
|
|
82
|
+
"\u2026 ({bind} to collapse)": "\u2026 ({bind} untuk menutup)",
|
|
81
83
|
"No sessions in this folder yet; starting a new one.": "Belum ada sesi di folder ini; memulai sesi baru.",
|
|
82
84
|
"Session number (enter = new): ": "Nomor sesi (enter = baru): ",
|
|
83
85
|
'This repo wants to run the MCP server "{name}" ({what}). Allow? [y/N] ': 'Repo ini ingin menjalankan server MCP "{name}" ({what}). Izinkan? [y/N] ',
|
|
@@ -925,6 +927,14 @@ function reasoningCapability(providerId) {
|
|
|
925
927
|
case "bc-cloud":
|
|
926
928
|
return { levels: BOTCONNECTOR_LEVELS, parameter: "reasoning_effort" };
|
|
927
929
|
case "openai":
|
|
930
|
+
case "gmi":
|
|
931
|
+
case "gmicloud":
|
|
932
|
+
case "vertex-maas":
|
|
933
|
+
case "deepseek":
|
|
934
|
+
case "groq":
|
|
935
|
+
case "together":
|
|
936
|
+
case "fireworks":
|
|
937
|
+
case "mistral":
|
|
928
938
|
return { levels: OPENAI_LEVELS, parameter: "reasoning_effort" };
|
|
929
939
|
case "openrouter":
|
|
930
940
|
return { levels: ["auto", "low", "medium", "high"], parameter: "reasoning" };
|
|
@@ -1230,7 +1240,7 @@ async function readStream(res, onText, onThinking) {
|
|
|
1230
1240
|
if (!choice) return;
|
|
1231
1241
|
if (choice.finish_reason) finishReason = choice.finish_reason;
|
|
1232
1242
|
const delta = choice.delta ?? {};
|
|
1233
|
-
const reasoning = delta.reasoning_content || delta.reasoning;
|
|
1243
|
+
const reasoning = delta.reasoning_content || delta.reasoning || delta.thinking;
|
|
1234
1244
|
if (reasoning) emit({ text: "", thinking: reasoning });
|
|
1235
1245
|
if (delta.content) emit(splitter.push(delta.content));
|
|
1236
1246
|
for (const tc of delta.tool_calls ?? []) {
|
|
@@ -1261,7 +1271,7 @@ async function readStream(res, onText, onThinking) {
|
|
|
1261
1271
|
const toolCalls = calls.map((call, index) => ({ ...call, id: call.id || `call_${index}` }));
|
|
1262
1272
|
return { text, toolCalls, thinking: thinking || void 0, usage, finishReason };
|
|
1263
1273
|
}
|
|
1264
|
-
async function readJson(res) {
|
|
1274
|
+
async function readJson(res, onText, onThinking) {
|
|
1265
1275
|
const body = await res.json();
|
|
1266
1276
|
const choice = body.choices?.[0];
|
|
1267
1277
|
const toolCalls = (choice?.message?.tool_calls ?? []).map((tc, i) => ({
|
|
@@ -1270,7 +1280,9 @@ async function readJson(res) {
|
|
|
1270
1280
|
arguments: tc.function?.arguments ?? ""
|
|
1271
1281
|
}));
|
|
1272
1282
|
const split = splitThinking(choice?.message?.content ?? "");
|
|
1273
|
-
const thinking = (choice?.message?.reasoning_content || choice?.message?.reasoning || "") + split.thinking;
|
|
1283
|
+
const thinking = (choice?.message?.reasoning_content || choice?.message?.reasoning || choice?.message?.thinking || "") + split.thinking;
|
|
1284
|
+
if (thinking) onThinking?.(thinking);
|
|
1285
|
+
if (split.text) onText?.(split.text);
|
|
1274
1286
|
return { text: split.text, toolCalls, thinking: thinking || void 0, usage: toUsage(body.usage), finishReason: choice?.finish_reason };
|
|
1275
1287
|
}
|
|
1276
1288
|
function contentText(content) {
|
|
@@ -1829,7 +1841,7 @@ function createProvider(options) {
|
|
|
1829
1841
|
const isBotConnectorCloud = /^https:\/\/api\.botconnector\.id\/v1\/?$/.test(baseURL) && apiKey?.startsWith("bc_live_");
|
|
1830
1842
|
if (isBotConnectorCloud) {
|
|
1831
1843
|
headers["x-botconnector-client"] = "bccli";
|
|
1832
|
-
headers["x-botconnector-client-version"] = "0.4.
|
|
1844
|
+
headers["x-botconnector-client-version"] = "0.4.5";
|
|
1833
1845
|
}
|
|
1834
1846
|
const useNativeResponses = isBotConnectorCloud && providerId === "bc-cloud" && model === "gpt-6-luna";
|
|
1835
1847
|
const useResponsesWebSocket = useNativeResponses && Boolean(apiKey) && (fetchOverride === void 0 || responsesWebSocketFactory !== void 0);
|
|
@@ -1860,7 +1872,7 @@ function createProvider(options) {
|
|
|
1860
1872
|
baseURL: baseURL.replace(/\/+$/, ""),
|
|
1861
1873
|
defaultHeaders: {
|
|
1862
1874
|
"x-botconnector-client": "bccli",
|
|
1863
|
-
"x-botconnector-client-version": "0.4.
|
|
1875
|
+
"x-botconnector-client-version": "0.4.5"
|
|
1864
1876
|
}
|
|
1865
1877
|
});
|
|
1866
1878
|
lunaWs = responsesWebSocketFactory ? responsesWebSocketFactory(client) : new ResponsesWS(client, { reconnect: null });
|
|
@@ -2013,7 +2025,7 @@ function createProvider(options) {
|
|
|
2013
2025
|
{ model, messages, stream: true, stream_options: { include_usage: true }, ...tools?.length ? { tools } : {}, ...reasoningOverride },
|
|
2014
2026
|
signal
|
|
2015
2027
|
);
|
|
2016
|
-
if ((res.headers.get("content-type") ?? "").includes("application/json")) return readJson(res);
|
|
2028
|
+
if ((res.headers.get("content-type") ?? "").includes("application/json")) return readJson(res, onText, onThinking);
|
|
2017
2029
|
if (!res.body) throw new ProviderError(t("Empty response from the provider"));
|
|
2018
2030
|
return readStream(res, onText, onThinking);
|
|
2019
2031
|
},
|
|
@@ -2425,10 +2437,14 @@ function startBackground(command, cwd, env, shell) {
|
|
|
2425
2437
|
task.status = "exited";
|
|
2426
2438
|
task.head += `${task.head ? "\n" : ""}${error.message}`;
|
|
2427
2439
|
});
|
|
2428
|
-
child.on("
|
|
2440
|
+
child.on("exit", (code) => {
|
|
2429
2441
|
task.status = "exited";
|
|
2430
2442
|
task.exitCode = code;
|
|
2431
2443
|
});
|
|
2444
|
+
child.on("close", (code) => {
|
|
2445
|
+
task.status = "exited";
|
|
2446
|
+
if (task.exitCode === null) task.exitCode = code;
|
|
2447
|
+
});
|
|
2432
2448
|
return task;
|
|
2433
2449
|
}
|
|
2434
2450
|
function backgroundStatus(task) {
|
|
@@ -2522,8 +2538,40 @@ function runCommand(command, opts) {
|
|
|
2522
2538
|
};
|
|
2523
2539
|
child.stdout.on("data", onData);
|
|
2524
2540
|
child.stderr.on("data", onData);
|
|
2541
|
+
let settled = false;
|
|
2542
|
+
let exitDrainTimer;
|
|
2543
|
+
let killDrainTimer;
|
|
2544
|
+
const finish = (exitCode, extra = "") => {
|
|
2545
|
+
if (settled) return;
|
|
2546
|
+
settled = true;
|
|
2547
|
+
active.delete(killAsAborted);
|
|
2548
|
+
clearTimeout(timer);
|
|
2549
|
+
if (exitDrainTimer) clearTimeout(exitDrainTimer);
|
|
2550
|
+
if (killDrainTimer) clearTimeout(killDrainTimer);
|
|
2551
|
+
opts.signal.removeEventListener("abort", onAbort);
|
|
2552
|
+
child.stdout.removeListener("data", onData);
|
|
2553
|
+
child.stderr.removeListener("data", onData);
|
|
2554
|
+
child.stdout.destroy();
|
|
2555
|
+
child.stderr.destroy();
|
|
2556
|
+
let spillNote = "";
|
|
2557
|
+
if (dropped && fullChunks.length) {
|
|
2558
|
+
try {
|
|
2559
|
+
const spillPath = join2(tmpdir(), `bccli-bash-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.log`);
|
|
2560
|
+
writeFileSync2(spillPath, fullChunks.join(""), "utf8");
|
|
2561
|
+
spillNote = `; full output saved to ${spillPath}`;
|
|
2562
|
+
} catch {
|
|
2563
|
+
}
|
|
2564
|
+
}
|
|
2565
|
+
const output = dropped ? `${head}
|
|
2566
|
+
\u2026 [${dropped} characters truncated${spillNote}] \u2026
|
|
2567
|
+
${tail}` : head + tail;
|
|
2568
|
+
resolve5({ output: output + extra, exitCode, timedOut, aborted });
|
|
2569
|
+
};
|
|
2525
2570
|
const kill = () => {
|
|
2526
2571
|
if (child.pid !== void 0) killProcessTree(child.pid);
|
|
2572
|
+
if (!killDrainTimer) {
|
|
2573
|
+
killDrainTimer = setTimeout(() => finish(child.exitCode), 500);
|
|
2574
|
+
}
|
|
2527
2575
|
};
|
|
2528
2576
|
const killAsAborted = () => {
|
|
2529
2577
|
aborted = true;
|
|
@@ -2540,29 +2588,16 @@ function runCommand(command, opts) {
|
|
|
2540
2588
|
};
|
|
2541
2589
|
if (opts.signal.aborted) onAbort();
|
|
2542
2590
|
opts.signal.addEventListener("abort", onAbort, { once: true });
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
opts.signal.removeEventListener("abort", onAbort);
|
|
2547
|
-
let spillNote = "";
|
|
2548
|
-
if (dropped && fullChunks.length) {
|
|
2549
|
-
try {
|
|
2550
|
-
const spillPath = join2(tmpdir(), `bccli-bash-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.log`);
|
|
2551
|
-
writeFileSync2(spillPath, fullChunks.join(""), "utf8");
|
|
2552
|
-
spillNote = `; full output saved to ${spillPath}`;
|
|
2553
|
-
} catch {
|
|
2554
|
-
}
|
|
2591
|
+
child.on("exit", (code) => {
|
|
2592
|
+
if (!exitDrainTimer) {
|
|
2593
|
+
exitDrainTimer = setTimeout(() => finish(code), 200);
|
|
2555
2594
|
}
|
|
2556
|
-
|
|
2557
|
-
\u2026 [${dropped} characters truncated${spillNote}] \u2026
|
|
2558
|
-
${tail}` : head + tail;
|
|
2559
|
-
resolve5({ output: output + extra, exitCode, timedOut, aborted });
|
|
2560
|
-
};
|
|
2595
|
+
});
|
|
2561
2596
|
child.on("error", (error) => finish(null, error.message));
|
|
2562
|
-
child.on("close", (code) => finish(code));
|
|
2597
|
+
child.on("close", (code) => finish(code ?? child.exitCode));
|
|
2563
2598
|
});
|
|
2564
2599
|
}
|
|
2565
|
-
var BASH_DESCRIPTION = "Run a shell command in the project directory. No interactive input. Default timeout 2 minutes (max 10). Use for tests, builds, git, and other CLI tasks. Set background: true for long-running jobs, then poll with task_id (stop with kill: true) or use the /tasks command.";
|
|
2600
|
+
var BASH_DESCRIPTION = "Run a shell command in the project directory. No interactive input. Default timeout 2 minutes (max 10). Use for tests, builds, git, and other CLI tasks. Set background: true for long-running jobs, then poll with task_id (stop with kill: true) or use the /tasks command. Do not pipe commands that start background daemons (such as agent-browser) through | head or | tail.";
|
|
2566
2601
|
var BASH_SCHEMA = z.object({
|
|
2567
2602
|
command: z.string().optional().describe("The shell command to run (required unless task_id is set)"),
|
|
2568
2603
|
timeout_ms: z.number().int().min(1e3).max(6e5).optional().describe("Timeout in milliseconds"),
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
createFetchTool,
|
|
4
4
|
createWebSearchTool,
|
|
5
5
|
isPrivateHost
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-O5ATYRUP.js";
|
|
7
7
|
import "./chunk-PSO7R5AD.js";
|
|
8
8
|
import {
|
|
9
9
|
loadConfig,
|
|
10
10
|
readCredentials
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AK6TWKET.js";
|
|
12
12
|
import {
|
|
13
13
|
t
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-EOOWV6C6.js";
|
|
15
15
|
|
|
16
16
|
// src/mcpServer/serve.ts
|
|
17
17
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|