@botconnector/bccli 0.4.0-beta.46 → 0.4.0-beta.47
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-YXBMSWYP.js → acp-QMD7IKKI.js} +2 -2
- package/dist/{args-6MWRODGH.js → args-6T55MFPG.js} +4 -4
- package/dist/{chunk-IHYNME3G.js → chunk-226R2FBX.js} +1 -1
- package/dist/{chunk-2QNYWBDG.js → chunk-3ETD6HSV.js} +31 -18
- package/dist/{chunk-OZPSNMUD.js → chunk-5D35DOMD.js} +3 -3
- package/dist/{chunk-PBBD37E7.js → chunk-5YTZXUGU.js} +4 -4
- package/dist/{chunk-7PRH5NDO.js → chunk-DAFJ7VOQ.js} +1 -1
- package/dist/{chunk-ASJRO2WF.js → chunk-EC67VAZX.js} +2 -2
- package/dist/{chunk-K3SWFB5S.js → chunk-FNECQ433.js} +2 -2
- package/dist/{chunk-IA5PRX4Z.js → chunk-HBR62GF2.js} +1 -1
- package/dist/{chunk-GI5GVU2L.js → chunk-JRUQQRP6.js} +1 -4
- package/dist/{chunk-KDVKD3QA.js → chunk-KVXONGYT.js} +4 -4
- package/dist/{chunk-6RML6SN7.js → chunk-QGTAINBU.js} +6 -6
- package/dist/{chunk-GF6CRNT3.js → chunk-R72DRWZ6.js} +1 -1
- package/dist/{chunk-PQB4CGSL.js → chunk-SJTJHATK.js} +2 -2
- package/dist/{chunk-33OBF43H.js → chunk-SVGARF5B.js} +3 -3
- package/dist/{chunk-NGHOZRIM.js → chunk-TSZFE2RV.js} +1 -1
- package/dist/{chunk-65OGHOGS.js → chunk-Y7F5CZ4D.js} +1 -1
- package/dist/{chunk-FIY424O5.js → chunk-YGITX6JU.js} +1 -1
- package/dist/cli.js +37 -37
- package/dist/{completion-D3HXSAQY.js → completion-QO5B6N4R.js} +1 -1
- package/dist/{config-BAAESXVB.js → config-67RNJLDR.js} +3 -3
- package/dist/{config-CJGPM5MJ.js → config-TBRDIB7O.js} +2 -2
- package/dist/{ghBotCli-DCCFACAA.js → ghBotCli-4SXXJQGT.js} +13 -13
- package/dist/{integrationCli-EYAHT6VL.js → integrationCli-KTHSQC4Y.js} +2 -2
- package/dist/{login-FXTMDCCC.js → login-7T6M25XB.js} +3 -3
- package/dist/{mcpCli-57JTECJY.js → mcpCli-7RR5N7SX.js} +5 -5
- package/dist/{modelsCli-NH7W6MAZ.js → modelsCli-GDE5RVD4.js} +6 -6
- package/dist/{oauthLogin-FTOPZW7X.js → oauthLogin-ZVKAVGJH.js} +1 -1
- package/dist/{pluginsCli-UUPFG2CF.js → pluginsCli-UKMRWPVT.js} +2 -2
- package/dist/{prCli-6OQ5ZUBO.js → prCli-26OUBDFO.js} +1 -1
- package/dist/providerCli-QVYG6PFQ.js +15 -0
- package/dist/sdk.js +22 -12
- package/dist/{serve-HZZYEI3J.js → serve-PAXJYBVI.js} +3 -3
- package/dist/{serve-HPQ2K7UE.js → serve-SEGKQ5DM.js} +14 -14
- package/dist/session-GDPYDGOX.js +12 -0
- package/dist/setup-HRZW73ZW.js +24 -0
- package/dist/{statsCli-G7GYLCPM.js → statsCli-ZHURTHK7.js} +1 -1
- package/dist/{transferCli-7FW2SJY4.js → transferCli-PQCFSIVT.js} +4 -4
- package/dist/{ui-KHNDA2RT.js → ui-52SWT2AL.js} +66 -59
- package/dist/{update-UG7GWBXT.js → update-URVV6UXT.js} +2 -2
- package/package.json +1 -1
- package/dist/providerCli-L6SQHIRK.js +0 -15
- package/dist/session-QIZKAZK3.js +0 -12
- package/dist/setup-4I5FXW37.js +0 -24
|
@@ -97,8 +97,8 @@ function runAcp(input, output, opts) {
|
|
|
97
97
|
function runtimeAgent(cwd) {
|
|
98
98
|
return {
|
|
99
99
|
async run(text, onChunk, signal) {
|
|
100
|
-
const { parseCliArgs } = await import("./args-
|
|
101
|
-
const { createRuntime } = await import("./setup-
|
|
100
|
+
const { parseCliArgs } = await import("./args-6T55MFPG.js");
|
|
101
|
+
const { createRuntime } = await import("./setup-HRZW73ZW.js");
|
|
102
102
|
const rt = createRuntime({ cwd, args: { ...parseCliArgs([]), allowAll: true } });
|
|
103
103
|
rt.agent.onEvent = (event) => {
|
|
104
104
|
if (event.type === "text") onChunk(event.delta);
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
helpText,
|
|
4
4
|
parseCliArgs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5D35DOMD.js";
|
|
6
6
|
import "./chunk-GAFJEQTJ.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-YGITX6JU.js";
|
|
8
|
+
import "./chunk-TSZFE2RV.js";
|
|
9
|
+
import "./chunk-JRUQQRP6.js";
|
|
10
10
|
export {
|
|
11
11
|
helpText,
|
|
12
12
|
parseCliArgs
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
parseFrontmatter,
|
|
21
21
|
runHooks,
|
|
22
22
|
validateGlobPattern
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DAFJ7VOQ.js";
|
|
24
24
|
import {
|
|
25
25
|
createWebSearchTool,
|
|
26
26
|
fetchTool
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-R72DRWZ6.js";
|
|
28
28
|
import {
|
|
29
29
|
defineTool
|
|
30
30
|
} from "./chunk-PSO7R5AD.js";
|
|
@@ -33,38 +33,38 @@ import {
|
|
|
33
33
|
} from "./chunk-GAFJEQTJ.js";
|
|
34
34
|
import {
|
|
35
35
|
addProviderKey
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-KVXONGYT.js";
|
|
37
37
|
import {
|
|
38
38
|
listAllModels
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-5YTZXUGU.js";
|
|
40
40
|
import {
|
|
41
41
|
providerName
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-Y7F5CZ4D.js";
|
|
43
43
|
import {
|
|
44
44
|
FileOAuthProvider,
|
|
45
45
|
hasStoredTokens
|
|
46
46
|
} from "./chunk-7F3IWBPQ.js";
|
|
47
47
|
import {
|
|
48
48
|
Session
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-HBR62GF2.js";
|
|
50
50
|
import {
|
|
51
51
|
completionAssistantMessage,
|
|
52
52
|
createProvider,
|
|
53
53
|
hasPendingProgrammaticReplay,
|
|
54
54
|
imageUserMessage
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-EC67VAZX.js";
|
|
56
56
|
import {
|
|
57
57
|
expandEnvVars
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-SJTJHATK.js";
|
|
59
59
|
import {
|
|
60
60
|
ConfigError,
|
|
61
61
|
bccliHome,
|
|
62
62
|
loadConfig,
|
|
63
63
|
resolveModel
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-TSZFE2RV.js";
|
|
65
65
|
import {
|
|
66
66
|
t
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-JRUQQRP6.js";
|
|
68
68
|
|
|
69
69
|
// src/textToolCalls.ts
|
|
70
70
|
var PAIR = /(?:<arg_key>\s*|`)?([A-Za-z_]\w*)(?:\s*<\/arg_key>)?`?\s*(?:=\s*`|<arg_value>)([\s\S]*?)<\/arg_value>/g;
|
|
@@ -750,13 +750,15 @@ var Agent = class {
|
|
|
750
750
|
const keepTokens = Math.min(15e3, Math.floor(this.contextWindow * 0.1));
|
|
751
751
|
const [older, keep] = splitKeepRecent(this.messages, keepTokens);
|
|
752
752
|
const history = trimToFit(older, Math.floor(this.contextWindow * 0.8));
|
|
753
|
-
const
|
|
753
|
+
const pending = this.provider.chat({
|
|
754
754
|
messages: [{ role: "system", content: this.systemPrompt }, ...history, { role: "user", content: COMPACT_PROMPT }],
|
|
755
755
|
// Some gateways reject tool_calls in history when no tools are declared.
|
|
756
756
|
tools: this.definitions,
|
|
757
757
|
signal,
|
|
758
758
|
reasoning: this.reasoning
|
|
759
759
|
});
|
|
760
|
+
const completion = await raceAbort(pending, signal);
|
|
761
|
+
if (completion === ABORTED) throw new Error("aborted");
|
|
760
762
|
this.clear();
|
|
761
763
|
this.push({ role: "user", content: `Summary of the previous conversation:
|
|
762
764
|
${completion.text}` });
|
|
@@ -798,15 +800,26 @@ ${completion.text}` });
|
|
|
798
800
|
this.onEvent({ type: "budgetExceeded", ...over });
|
|
799
801
|
return;
|
|
800
802
|
}
|
|
801
|
-
|
|
803
|
+
const pendingCompletion = this.provider.chat({
|
|
802
804
|
messages: [{ role: "system", content: this.systemPrompt }, ...this.messages],
|
|
803
805
|
tools: this.turnDefinitions,
|
|
804
806
|
programmaticToolNames: this.turnTools.filter((tool) => tool.programmaticSafe).map((tool) => tool.name),
|
|
805
807
|
signal,
|
|
806
|
-
|
|
807
|
-
|
|
808
|
+
// Late output from a cancelled provider must not leak into the next turn.
|
|
809
|
+
onText: (delta) => {
|
|
810
|
+
if (!signal.aborted) this.onEvent({ type: "text", delta });
|
|
811
|
+
},
|
|
812
|
+
onThinking: (delta) => {
|
|
813
|
+
if (!signal.aborted) this.onEvent({ type: "thinking", delta });
|
|
814
|
+
},
|
|
808
815
|
reasoning: this.reasoning
|
|
809
816
|
});
|
|
817
|
+
const outcome = await raceAbort(pendingCompletion, signal);
|
|
818
|
+
if (outcome === ABORTED) {
|
|
819
|
+
this.onEvent({ type: "aborted" });
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
let completion = outcome;
|
|
810
823
|
if (!completion.toolCalls.length && completion.finishReason !== "repetition") {
|
|
811
824
|
const recovered = recoverTextToolCalls(completion.text, this.turnDefinitions);
|
|
812
825
|
if (recovered) {
|
|
@@ -853,8 +866,8 @@ ${completion.text}` });
|
|
|
853
866
|
const batch = calls.slice(i, j);
|
|
854
867
|
const tickets = batch.map(() => ({ abandoned: false, open: false }));
|
|
855
868
|
const running = Promise.all(batch.map((c, k) => this.runTool(c, signal, tickets[k])));
|
|
856
|
-
const
|
|
857
|
-
if (
|
|
869
|
+
const outcome2 = await raceAbort(running, signal);
|
|
870
|
+
if (outcome2 === ABORTED) {
|
|
858
871
|
batch.forEach((c, k) => {
|
|
859
872
|
const ticket = tickets[k];
|
|
860
873
|
ticket.abandoned = true;
|
|
@@ -867,11 +880,11 @@ ${completion.text}` });
|
|
|
867
880
|
return;
|
|
868
881
|
}
|
|
869
882
|
batch.forEach((c, k) => {
|
|
870
|
-
roundImages.push(...
|
|
883
|
+
roundImages.push(...outcome2[k].images ?? []);
|
|
871
884
|
this.push({
|
|
872
885
|
role: "tool",
|
|
873
886
|
tool_call_id: c.id,
|
|
874
|
-
content:
|
|
887
|
+
content: outcome2[k].output,
|
|
875
888
|
...c.caller ? { responses_caller: c.caller } : {}
|
|
876
889
|
});
|
|
877
890
|
});
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
REASONING_LEVELS,
|
|
7
7
|
isReasoningLevel
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YGITX6JU.js";
|
|
9
9
|
import {
|
|
10
10
|
ConfigError
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TSZFE2RV.js";
|
|
12
12
|
import {
|
|
13
13
|
parseLang,
|
|
14
14
|
t
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JRUQQRP6.js";
|
|
16
16
|
|
|
17
17
|
// src/args.ts
|
|
18
18
|
import { parseArgs } from "util";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
hasKey,
|
|
4
4
|
providerName
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-Y7F5CZ4D.js";
|
|
6
6
|
import {
|
|
7
7
|
createProvider
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EC67VAZX.js";
|
|
9
9
|
import {
|
|
10
10
|
PRESETS,
|
|
11
11
|
readCredentials
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TSZFE2RV.js";
|
|
13
13
|
import {
|
|
14
14
|
t
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JRUQQRP6.js";
|
|
16
16
|
|
|
17
17
|
// src/models.ts
|
|
18
18
|
function order(ids) {
|
|
@@ -26,6 +26,7 @@ var ID = {
|
|
|
26
26
|
" enter save \xB7 esc cancel": " enter simpan \xB7 esc batal",
|
|
27
27
|
"shift+tab switch mode": "shift+tab ganti mode",
|
|
28
28
|
"{n} tokens": "{n} token",
|
|
29
|
+
"\u273B Thinking": "\u273B Berpikir",
|
|
29
30
|
"click to toggle": "klik untuk buka/tutup",
|
|
30
31
|
"Model: {model} \xB7 reasoning: {level}": "Model: {model} \xB7 penalaran: {level}",
|
|
31
32
|
"No reasoning summary received yet; tool activity remains visible above.": "Belum ada ringkasan penalaran dari model; aktivitas tool tetap terlihat di atas.",
|
|
@@ -410,15 +411,11 @@ Opsi:
|
|
|
410
411
|
"Unknown command: /{name}. Type /help.": "Perintah tidak dikenal: /{name}. Ketik /help.",
|
|
411
412
|
"Skill {name} cannot be read: {error}": "Skill {name} tidak bisa dibaca: {error}",
|
|
412
413
|
"{n} queued messages cancelled.": "{n} pesan antrian dibatalkan.",
|
|
413
|
-
"Thinking shown ({bind} to hide).": "Thinking ditampilkan ({bind} untuk menutup).",
|
|
414
|
-
"Thinking hidden ({bind} to show).": "Thinking disembunyikan ({bind} untuk membuka).",
|
|
415
414
|
"MCP {name} removed.": "MCP {name} dihapus.",
|
|
416
415
|
"MCP {name} installed, connecting\u2026": "MCP {name} dipasang, menghubungkan\u2026",
|
|
417
416
|
"MCP {name} active \xB7 {n} tools.": "MCP {name} aktif \xB7 {n} alat.",
|
|
418
417
|
"MCP {name} failed: {error}": "MCP {name} gagal: {error}",
|
|
419
418
|
"unknown": "tidak diketahui",
|
|
420
|
-
"\u273B Thinking \xB7 {n} lines \xB7 {bind} to show": "\u273B Berpikir \xB7 {n} baris \xB7 {bind} buka",
|
|
421
|
-
"\u273B Thinking ({bind} to hide)": "\u273B Berpikir ({bind} tutup)",
|
|
422
419
|
" \u23F3 queued: {q}": " \u23F3 antri: {q}",
|
|
423
420
|
"Thinking": "Berpikir",
|
|
424
421
|
"Cancelling": "Membatalkan",
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
listAllModels
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5YTZXUGU.js";
|
|
5
5
|
import {
|
|
6
6
|
hasKey,
|
|
7
7
|
providerName,
|
|
8
8
|
removeGlobalProvider,
|
|
9
9
|
writeGlobalConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Y7F5CZ4D.js";
|
|
11
11
|
import {
|
|
12
12
|
PRESETS,
|
|
13
13
|
loadConfig,
|
|
14
14
|
saveCredential
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TSZFE2RV.js";
|
|
16
16
|
import {
|
|
17
17
|
t
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JRUQQRP6.js";
|
|
19
19
|
|
|
20
20
|
// src/providerCli.ts
|
|
21
21
|
async function addProviderKey(providerId, key, deps) {
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
removeCredential,
|
|
7
7
|
saveCredential
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TSZFE2RV.js";
|
|
9
9
|
import {
|
|
10
10
|
t
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JRUQQRP6.js";
|
|
12
12
|
|
|
13
13
|
// src/login.ts
|
|
14
14
|
function readSecret(prompt) {
|
|
@@ -91,8 +91,8 @@ function defaultLoginDeps() {
|
|
|
91
91
|
fetch: globalThis.fetch,
|
|
92
92
|
// Wiring NYATA jalur lama: persis runLogin lama (provider add + prompt key).
|
|
93
93
|
legacyAdd: async (providerId, targetCwd) => {
|
|
94
|
-
const { runProviderCommand } = await import("./providerCli-
|
|
95
|
-
const { parseCliArgs: parse } = await import("./args-
|
|
94
|
+
const { runProviderCommand } = await import("./providerCli-QVYG6PFQ.js");
|
|
95
|
+
const { parseCliArgs: parse } = await import("./args-6T55MFPG.js");
|
|
96
96
|
return runProviderCommand(parse(["provider", "add", providerId]), {
|
|
97
97
|
env: process.env,
|
|
98
98
|
cwd: targetCwd,
|
|
@@ -117,12 +117,12 @@ async function runLogin(providerId, cwd, args, deps) {
|
|
|
117
117
|
);
|
|
118
118
|
return 1;
|
|
119
119
|
}
|
|
120
|
-
const { runOauthLogout } = await import("./oauthLogin-
|
|
120
|
+
const { runOauthLogout } = await import("./oauthLogin-ZVKAVGJH.js");
|
|
121
121
|
return runOauthLogout({ out: deps.out, err: deps.err, env: deps.env, removeCredential: deps.removeCredential });
|
|
122
122
|
}
|
|
123
123
|
if (args.key) return deps.legacyAdd(providerId, cwd);
|
|
124
124
|
if (providerId === "openrouter") {
|
|
125
|
-
const { runOauthLogin } = await import("./oauthLogin-
|
|
125
|
+
const { runOauthLogin } = await import("./oauthLogin-ZVKAVGJH.js");
|
|
126
126
|
return runOauthLogin({
|
|
127
127
|
out: deps.out,
|
|
128
128
|
err: deps.err,
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runCommand,
|
|
4
4
|
runHooks
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DAFJ7VOQ.js";
|
|
6
6
|
import {
|
|
7
7
|
ConfigError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TSZFE2RV.js";
|
|
9
9
|
import {
|
|
10
10
|
t
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JRUQQRP6.js";
|
|
12
12
|
|
|
13
13
|
// src/verify.ts
|
|
14
14
|
var MAX_VERIFY_ROUNDS = 2;
|
package/dist/cli.js
CHANGED
|
@@ -2,47 +2,47 @@
|
|
|
2
2
|
import {
|
|
3
3
|
resolveWorktree,
|
|
4
4
|
runPrint
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SVGARF5B.js";
|
|
6
6
|
import {
|
|
7
7
|
createRuntime
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3ETD6HSV.js";
|
|
9
9
|
import "./chunk-QZKLZELZ.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-DAFJ7VOQ.js";
|
|
11
|
+
import "./chunk-R72DRWZ6.js";
|
|
12
12
|
import "./chunk-PSO7R5AD.js";
|
|
13
13
|
import {
|
|
14
14
|
VERSION
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-226R2FBX.js";
|
|
16
16
|
import {
|
|
17
17
|
helpText,
|
|
18
18
|
parseCliArgs
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-5D35DOMD.js";
|
|
20
20
|
import "./chunk-GAFJEQTJ.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-KVXONGYT.js";
|
|
22
|
+
import "./chunk-5YTZXUGU.js";
|
|
23
23
|
import {
|
|
24
24
|
readGlobalConfigFile
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-Y7F5CZ4D.js";
|
|
26
26
|
import {
|
|
27
27
|
defaultLoginDeps,
|
|
28
28
|
runLogin
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QGTAINBU.js";
|
|
30
30
|
import "./chunk-7F3IWBPQ.js";
|
|
31
31
|
import {
|
|
32
32
|
pruneSessions
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-HBR62GF2.js";
|
|
34
|
+
import "./chunk-EC67VAZX.js";
|
|
35
|
+
import "./chunk-YGITX6JU.js";
|
|
36
|
+
import "./chunk-SJTJHATK.js";
|
|
37
37
|
import {
|
|
38
38
|
ConfigError,
|
|
39
39
|
setTheme
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-TSZFE2RV.js";
|
|
41
41
|
import {
|
|
42
42
|
resolveLanguage,
|
|
43
43
|
setLanguage,
|
|
44
44
|
t
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-JRUQQRP6.js";
|
|
46
46
|
|
|
47
47
|
// src/exit.ts
|
|
48
48
|
var EXIT_GRACE_MS = 1e3;
|
|
@@ -84,17 +84,17 @@ async function main() {
|
|
|
84
84
|
if (args.worktree) cwd = (await resolveWorktree(cwd, args.worktree)).path;
|
|
85
85
|
if (args.command === "login") return runLogin(args.loginProvider ?? "bc-cloud", cwd, args, defaultLoginDeps());
|
|
86
86
|
if (args.command === "mcp") {
|
|
87
|
-
const { runMcpCommand } = await import("./mcpCli-
|
|
88
|
-
const { readSecret } = await import("./login-
|
|
87
|
+
const { runMcpCommand } = await import("./mcpCli-7RR5N7SX.js");
|
|
88
|
+
const { readSecret } = await import("./login-7T6M25XB.js");
|
|
89
89
|
return runMcpCommand(args, { env: process.env, cwd, out: (s) => console.log(s), err: (s) => console.error(s), readSecret });
|
|
90
90
|
}
|
|
91
91
|
if (args.command === "provider") {
|
|
92
|
-
const { runProviderCommand } = await import("./providerCli-
|
|
93
|
-
const { readSecret } = await import("./login-
|
|
92
|
+
const { runProviderCommand } = await import("./providerCli-QVYG6PFQ.js");
|
|
93
|
+
const { readSecret } = await import("./login-7T6M25XB.js");
|
|
94
94
|
return runProviderCommand(args, { env: process.env, cwd, out: (s) => console.log(s), err: (s) => console.error(s), readSecret });
|
|
95
95
|
}
|
|
96
96
|
if (args.command === "connect" || args.command === "disconnect" || args.command === "integrations") {
|
|
97
|
-
const { runIntegrationCommand } = await import("./integrationCli-
|
|
97
|
+
const { runIntegrationCommand } = await import("./integrationCli-KTHSQC4Y.js");
|
|
98
98
|
return runIntegrationCommand(args, {
|
|
99
99
|
env: process.env,
|
|
100
100
|
cwd,
|
|
@@ -104,20 +104,20 @@ async function main() {
|
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
if (args.command === "models") {
|
|
107
|
-
const { runModelsCommand } = await import("./modelsCli-
|
|
107
|
+
const { runModelsCommand } = await import("./modelsCli-GDE5RVD4.js");
|
|
108
108
|
return runModelsCommand(args, { env: process.env, cwd, out: (s) => console.log(s), err: (s) => console.error(s), fetch: globalThis.fetch });
|
|
109
109
|
}
|
|
110
110
|
if (args.command === "update") {
|
|
111
|
-
const { runUpdateCommand } = await import("./update-
|
|
111
|
+
const { runUpdateCommand } = await import("./update-URVV6UXT.js");
|
|
112
112
|
return runUpdateCommand({ env: process.env });
|
|
113
113
|
}
|
|
114
114
|
if (args.command === "acp") {
|
|
115
|
-
const { runtimeAgent, runAcp } = await import("./acp-
|
|
115
|
+
const { runtimeAgent, runAcp } = await import("./acp-QMD7IKKI.js");
|
|
116
116
|
await runAcp(process.stdin, process.stdout, { cwd, newAgent: (c) => runtimeAgent(c) });
|
|
117
117
|
return 0;
|
|
118
118
|
}
|
|
119
119
|
if (args.command === "serve") {
|
|
120
|
-
const { startServe } = await import("./serve-
|
|
120
|
+
const { startServe } = await import("./serve-SEGKQ5DM.js");
|
|
121
121
|
const handle = await startServe({ port: args.port, host: args.host, token: args.token, cwd, env: process.env });
|
|
122
122
|
process.stderr.write(`bccli serve ${handle.url} \u2014 Authorization: Bearer ${handle.token}
|
|
123
123
|
`);
|
|
@@ -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-UKMRWPVT.js");
|
|
135
|
+
const { readGlobalPlugins, updateGlobalConfig } = await import("./config-TBRDIB7O.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-4SXXJQGT.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-QO5B6N4R.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-ZHURTHK7.js");
|
|
158
|
+
const { bccliHome } = await import("./config-TBRDIB7O.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-PQCFSIVT.js");
|
|
166
|
+
const { bccliHome } = await import("./config-TBRDIB7O.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-26OUBDFO.js");
|
|
173
173
|
return runPrCommand({ subArgs: args.subArgs, cwd }, { out: (s) => console.log(s), err: (s) => console.error(s) });
|
|
174
174
|
}
|
|
175
175
|
const rt = createRuntime({ cwd, args });
|
|
@@ -180,7 +180,7 @@ async function main() {
|
|
|
180
180
|
}
|
|
181
181
|
if (args.print) {
|
|
182
182
|
if (!args.prompt) throw new ConfigError(t('-p mode needs a task, e.g. bccli -p "explain this repo"'));
|
|
183
|
-
const { serversToStart } = await import("./config-
|
|
183
|
+
const { serversToStart } = await import("./config-67RNJLDR.js");
|
|
184
184
|
const plan = serversToStart(rt.home, cwd);
|
|
185
185
|
for (const s of plan.needTrust) {
|
|
186
186
|
console.error(t('Project MCP server "{name}" skipped (not approved yet; run interactive bccli once to approve it).', { name: s.name }));
|
|
@@ -195,13 +195,13 @@ async function main() {
|
|
|
195
195
|
if (!process.stdin.isTTY) throw new ConfigError(t('Interactive mode needs a terminal. For scripts/CI use: bccli -p "task"'));
|
|
196
196
|
if (rt.config.updateCheck !== "off" && !process.env.BCCLI_NO_UPDATE_CHECK) {
|
|
197
197
|
try {
|
|
198
|
-
const { checkForUpdate } = await import("./update-
|
|
198
|
+
const { checkForUpdate } = await import("./update-URVV6UXT.js");
|
|
199
199
|
const update = await checkForUpdate({ home: rt.home, fetch: globalThis.fetch, now: /* @__PURE__ */ new Date() });
|
|
200
200
|
if (update) console.error(update);
|
|
201
201
|
} catch {
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
const { startInteractive } = await import("./ui-
|
|
204
|
+
const { startInteractive } = await import("./ui-52SWT2AL.js");
|
|
205
205
|
return startInteractive(rt, { initialPrompt: args.prompt, resume: args.resume, version: VERSION });
|
|
206
206
|
}
|
|
207
207
|
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-SJTJHATK.js";
|
|
13
|
+
import "./chunk-TSZFE2RV.js";
|
|
14
|
+
import "./chunk-JRUQQRP6.js";
|
|
15
15
|
export {
|
|
16
16
|
addGlobalServer,
|
|
17
17
|
expandEnvVars,
|