@botconnector/bccli 0.4.9 → 0.4.11

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.
Files changed (55) hide show
  1. package/dist/{acp-VEXFXT5P.js → acp-IPHWC6CO.js} +20 -5
  2. package/dist/acp.d.ts +17 -1
  3. package/dist/args-K5AJFDCZ.js +13 -0
  4. package/dist/args.d.ts +6 -0
  5. package/dist/budget.d.ts +4 -1
  6. package/dist/{chunk-2YG6L3YO.js → chunk-2DFY43RP.js} +2 -2
  7. package/dist/{chunk-KREGVQ63.js → chunk-6BXW7DGQ.js} +47 -18
  8. package/dist/{chunk-WSSJH765.js → chunk-6KZIOICR.js} +1 -1
  9. package/dist/{chunk-OUJRD7GG.js → chunk-6M5T7N7A.js} +8 -3
  10. package/dist/{chunk-DRJSANKH.js → chunk-C2FUGQJX.js} +9 -7
  11. package/dist/{chunk-OETLWNGS.js → chunk-F54FDJBD.js} +3 -3
  12. package/dist/{chunk-XCVYR5BK.js → chunk-G5TG43R4.js} +15 -1
  13. package/dist/{chunk-RRECJTOG.js → chunk-IHQGXDSG.js} +1 -1
  14. package/dist/{chunk-AWBEZY4D.js → chunk-JFYQCPXL.js} +7 -5
  15. package/dist/{chunk-6H6MPG7L.js → chunk-MBAMDCCV.js} +23 -9
  16. package/dist/{chunk-HCW67S5M.js → chunk-N6APAYSF.js} +1 -1
  17. package/dist/{chunk-TLCFBQ6E.js → chunk-NT2G5FSX.js} +2 -2
  18. package/dist/{chunk-CSIQDFEF.js → chunk-OAXD3X4R.js} +34 -50
  19. package/dist/{chunk-EOJNFGOP.js → chunk-OOOS5RCT.js} +98 -28
  20. package/dist/{chunk-Z2ELYJ5O.js → chunk-WSZF2CTU.js} +11 -4
  21. package/dist/{chunk-62UTSCWF.js → chunk-X24APPXO.js} +1 -1
  22. package/dist/{chunk-EAR2C6TS.js → chunk-XZ2TI5HV.js} +1 -1
  23. package/dist/{chunk-HPYI7L4W.js → chunk-Y6AZGGH7.js} +4 -4
  24. package/dist/{chunk-WFZKJY3R.js → chunk-YYTFJUO2.js} +3 -2
  25. package/dist/cli.js +40 -40
  26. package/dist/{completion-FETH4OGC.js → completion-QVDGAYUY.js} +1 -1
  27. package/dist/{config-KR5JI5RA.js → config-7TQ2KVVX.js} +3 -3
  28. package/dist/{config-RVMC23W3.js → config-RZY3XQZJ.js} +2 -2
  29. package/dist/{ghBotCli-Z6GWXCJ6.js → ghBotCli-HHJ4ANTH.js} +18 -16
  30. package/dist/{integrationCli-GPRR6J6W.js → integrationCli-LNNZDGZX.js} +40 -5
  31. package/dist/{login-DFSN77L3.js → login-MQEZGF2C.js} +6 -4
  32. package/dist/login.d.ts +2 -0
  33. package/dist/{mcpCli-64P3SVUE.js → mcpCli-CUIOYJ2A.js} +22 -7
  34. package/dist/{modelsCli-PFQY3G2Q.js → modelsCli-AAFHFI4H.js} +6 -6
  35. package/dist/{oauthLogin-NR22NWEV.js → oauthLogin-YFL2N4QA.js} +1 -1
  36. package/dist/{pluginsCli-UKRJ3AHN.js → pluginsCli-2QXXFLQA.js} +6 -2
  37. package/dist/{prCli-6FCI36AJ.js → prCli-KSA73RCS.js} +1 -1
  38. package/dist/print.d.ts +1 -0
  39. package/dist/providerCli-TXMVPSW5.js +15 -0
  40. package/dist/sdk.js +196 -87
  41. package/dist/{serve-PKUTKQQT.js → serve-EIQHEUYD.js} +3 -3
  42. package/dist/{serve-JYXPQAVY.js → serve-QYDBFTHC.js} +16 -16
  43. package/dist/session-CQCQ7KAP.js +12 -0
  44. package/dist/setup-DBSGMWHM.js +24 -0
  45. package/dist/setup.d.ts +5 -0
  46. package/dist/{statsCli-FR7GOKWO.js → statsCli-EHNJIQ2Z.js} +2 -2
  47. package/dist/tools/bash.d.ts +2 -0
  48. package/dist/{transferCli-GIE4MEJ4.js → transferCli-IXJ2O74Q.js} +4 -4
  49. package/dist/{ui-NZVOCQSU.js → ui-A2LASWDK.js} +14 -14
  50. package/dist/{update-DIYDD7LT.js → update-TR62JV3A.js} +2 -2
  51. package/package.json +1 -1
  52. package/dist/args-6XMUZDAK.js +0 -13
  53. package/dist/providerCli-PBSZECBM.js +0 -15
  54. package/dist/session-XABMBIIF.js +0 -12
  55. package/dist/setup-CLPQLTM7.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-OUJRD7GG.js";
6
+ } from "./chunk-6M5T7N7A.js";
7
7
  import {
8
8
  createRuntime
9
- } from "./chunk-KREGVQ63.js";
9
+ } from "./chunk-6BXW7DGQ.js";
10
10
  import "./chunk-OK2USAXX.js";
11
- import "./chunk-CSIQDFEF.js";
12
- import "./chunk-WSSJH765.js";
11
+ import "./chunk-OAXD3X4R.js";
12
+ import "./chunk-6KZIOICR.js";
13
13
  import "./chunk-PSO7R5AD.js";
14
14
  import {
15
15
  VERSION
16
- } from "./chunk-HCW67S5M.js";
16
+ } from "./chunk-N6APAYSF.js";
17
17
  import {
18
18
  helpText,
19
19
  parseCliArgs
20
- } from "./chunk-Z2ELYJ5O.js";
21
- import "./chunk-WFZKJY3R.js";
22
- import "./chunk-AWBEZY4D.js";
23
- import "./chunk-HPYI7L4W.js";
20
+ } from "./chunk-WSZF2CTU.js";
21
+ import "./chunk-YYTFJUO2.js";
22
+ import "./chunk-JFYQCPXL.js";
23
+ import "./chunk-Y6AZGGH7.js";
24
24
  import {
25
25
  readGlobalConfigFile
26
- } from "./chunk-62UTSCWF.js";
26
+ } from "./chunk-X24APPXO.js";
27
27
  import {
28
28
  defaultLoginDeps,
29
29
  runLogin
30
- } from "./chunk-6H6MPG7L.js";
31
- import "./chunk-RRECJTOG.js";
30
+ } from "./chunk-MBAMDCCV.js";
31
+ import "./chunk-IHQGXDSG.js";
32
32
  import {
33
33
  pruneSessions
34
- } from "./chunk-OETLWNGS.js";
35
- import "./chunk-EOJNFGOP.js";
36
- import "./chunk-EAR2C6TS.js";
37
- import "./chunk-2YG6L3YO.js";
34
+ } from "./chunk-F54FDJBD.js";
35
+ import "./chunk-OOOS5RCT.js";
36
+ import "./chunk-XZ2TI5HV.js";
37
+ import "./chunk-2DFY43RP.js";
38
38
  import {
39
39
  ConfigError,
40
40
  setTheme
41
- } from "./chunk-DRJSANKH.js";
41
+ } from "./chunk-C2FUGQJX.js";
42
42
  import {
43
43
  resolveLanguage,
44
44
  setLanguage,
45
45
  t
46
- } from "./chunk-XCVYR5BK.js";
46
+ } from "./chunk-G5TG43R4.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-64P3SVUE.js");
89
- const { readSecret } = await import("./login-DFSN77L3.js");
88
+ const { runMcpCommand } = await import("./mcpCli-CUIOYJ2A.js");
89
+ const { readSecret } = await import("./login-MQEZGF2C.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-PBSZECBM.js");
94
- const { readSecret } = await import("./login-DFSN77L3.js");
93
+ const { runProviderCommand } = await import("./providerCli-TXMVPSW5.js");
94
+ const { readSecret } = await import("./login-MQEZGF2C.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-GPRR6J6W.js");
98
+ const { runIntegrationCommand } = await import("./integrationCli-LNNZDGZX.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-PFQY3G2Q.js");
108
+ const { runModelsCommand } = await import("./modelsCli-AAFHFI4H.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-DIYDD7LT.js");
112
+ const { runUpdateCommand } = await import("./update-TR62JV3A.js");
113
113
  return runUpdateCommand({ env: process.env });
114
114
  }
115
115
  if (args.command === "acp") {
116
- const { runtimeAgent, runAcp } = await import("./acp-VEXFXT5P.js");
116
+ const { runtimeAgent, runAcp } = await import("./acp-IPHWC6CO.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-JYXPQAVY.js");
121
+ const { serveBanner, startServe } = await import("./serve-QYDBFTHC.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-UKRJ3AHN.js");
135
- const { readGlobalPlugins, updateGlobalConfig } = await import("./config-RVMC23W3.js");
134
+ const { runPluginsCommand } = await import("./pluginsCli-2QXXFLQA.js");
135
+ const { readGlobalPlugins, updateGlobalConfig } = await import("./config-RZY3XQZJ.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-Z6GWXCJ6.js");
149
+ const { runGhBotCommand } = await import("./ghBotCli-HHJ4ANTH.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-FETH4OGC.js");
153
+ const { runCompletionCommand } = await import("./completion-QVDGAYUY.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-FR7GOKWO.js");
158
- const { bccliHome } = await import("./config-RVMC23W3.js");
157
+ const { runStatsCommand } = await import("./statsCli-EHNJIQ2Z.js");
158
+ const { bccliHome } = await import("./config-RZY3XQZJ.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-GIE4MEJ4.js");
166
- const { bccliHome } = await import("./config-RVMC23W3.js");
165
+ const { runExportCommand, runImportCommand } = await import("./transferCli-IXJ2O74Q.js");
166
+ const { bccliHome } = await import("./config-RZY3XQZJ.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-6FCI36AJ.js");
172
+ const { runPrCommand } = await import("./prCli-KSA73RCS.js");
173
173
  return runPrCommand(
174
174
  {
175
175
  subArgs: args.subArgs,
@@ -199,14 +199,14 @@ 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-KR5JI5RA.js");
202
+ const { serversToStart } = await import("./config-7TQ2KVVX.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 }));
206
206
  }
207
207
  await rt.startMcp(plan.start);
208
208
  try {
209
- return await runPrint(rt, finalPrompt, void 0, { allowAll: args.allowAll, outputFormat: args.outputFormat });
209
+ return await runPrint(rt, finalPrompt, void 0, { allowAll: args.allowAll, outputFormat: args.outputFormat, failOnToolError: args.failOnToolError });
210
210
  } finally {
211
211
  await rt.mcp.stop();
212
212
  }
@@ -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-DIYDD7LT.js");
218
+ const { checkForUpdate } = await import("./update-TR62JV3A.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-NZVOCQSU.js");
224
+ const { startInteractive } = await import("./ui-A2LASWDK.js");
225
225
  return startInteractive(rt, { initialPrompt: args.prompt, resume: args.resume, version: VERSION, updateMessage });
226
226
  }
227
227
  main().then(
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  t
4
- } from "./chunk-XCVYR5BK.js";
4
+ } from "./chunk-G5TG43R4.js";
5
5
 
6
6
  // src/completion.ts
7
7
  var SHELLS = ["bash", "zsh", "fish", "powershell"];
@@ -9,9 +9,9 @@ import {
9
9
  removeGlobalServer,
10
10
  serversToStart,
11
11
  setProjectTrust
12
- } from "./chunk-2YG6L3YO.js";
13
- import "./chunk-DRJSANKH.js";
14
- import "./chunk-XCVYR5BK.js";
12
+ } from "./chunk-2DFY43RP.js";
13
+ import "./chunk-C2FUGQJX.js";
14
+ import "./chunk-G5TG43R4.js";
15
15
  export {
16
16
  addGlobalServer,
17
17
  expandEnvVars,
@@ -14,8 +14,8 @@ import {
14
14
  saveCredential,
15
15
  updateGlobalConfig,
16
16
  writeFileAtomic
17
- } from "./chunk-DRJSANKH.js";
18
- import "./chunk-XCVYR5BK.js";
17
+ } from "./chunk-C2FUGQJX.js";
18
+ import "./chunk-G5TG43R4.js";
19
19
  export {
20
20
  ConfigError,
21
21
  DEFAULT_MAX_STEPS,
@@ -1,32 +1,32 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  createRuntime
4
- } from "./chunk-KREGVQ63.js";
4
+ } from "./chunk-6BXW7DGQ.js";
5
5
  import "./chunk-OK2USAXX.js";
6
- import "./chunk-CSIQDFEF.js";
7
- import "./chunk-WSSJH765.js";
6
+ import "./chunk-OAXD3X4R.js";
7
+ import "./chunk-6KZIOICR.js";
8
8
  import "./chunk-PSO7R5AD.js";
9
9
  import {
10
10
  LOOPBACK_BIND,
11
11
  parseCliArgs
12
- } from "./chunk-Z2ELYJ5O.js";
13
- import "./chunk-WFZKJY3R.js";
14
- import "./chunk-AWBEZY4D.js";
15
- import "./chunk-HPYI7L4W.js";
16
- import "./chunk-62UTSCWF.js";
17
- import "./chunk-RRECJTOG.js";
18
- import "./chunk-OETLWNGS.js";
19
- import "./chunk-EOJNFGOP.js";
20
- import "./chunk-EAR2C6TS.js";
21
- import "./chunk-2YG6L3YO.js";
12
+ } from "./chunk-WSZF2CTU.js";
13
+ import "./chunk-YYTFJUO2.js";
14
+ import "./chunk-JFYQCPXL.js";
15
+ import "./chunk-Y6AZGGH7.js";
16
+ import "./chunk-X24APPXO.js";
17
+ import "./chunk-IHQGXDSG.js";
18
+ import "./chunk-F54FDJBD.js";
19
+ import "./chunk-OOOS5RCT.js";
20
+ import "./chunk-XZ2TI5HV.js";
21
+ import "./chunk-2DFY43RP.js";
22
22
  import {
23
23
  ConfigError,
24
24
  globalConfigPath,
25
25
  readJsonConfig
26
- } from "./chunk-DRJSANKH.js";
26
+ } from "./chunk-C2FUGQJX.js";
27
27
  import {
28
28
  t
29
- } from "./chunk-XCVYR5BK.js";
29
+ } from "./chunk-G5TG43R4.js";
30
30
 
31
31
  // src/ghBotWebhook.ts
32
32
  import { createHmac, timingSafeEqual } from "crypto";
@@ -531,8 +531,10 @@ function makeRunJob(o, cfg, gh) {
531
531
  provider: o.provider,
532
532
  fetch: o.fetch ?? globalThis.fetch,
533
533
  // injectable (review #3)
534
- maxSteps: cfg.stepLimit
534
+ maxSteps: cfg.stepLimit,
535
535
  // the knob the Agent actually uses
536
+ // A draft is one-shot: no session log (and no file per webhook comment).
537
+ persistSession: false
536
538
  });
537
539
  rt.agent.setSystemPrompt(ghSystemPrompt());
538
540
  rt.agent.setTools([]);
@@ -5,13 +5,14 @@ import {
5
5
  loadConfig,
6
6
  readCredentials,
7
7
  resolveModel
8
- } from "./chunk-DRJSANKH.js";
8
+ } from "./chunk-C2FUGQJX.js";
9
9
  import {
10
10
  t
11
- } from "./chunk-XCVYR5BK.js";
11
+ } from "./chunk-G5TG43R4.js";
12
12
 
13
13
  // src/integrationCli.ts
14
14
  import { chmodSync, copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
15
+ import { createHash } from "crypto";
15
16
  import { dirname, join } from "path";
16
17
  import { parseDocument } from "yaml";
17
18
  var BASE_URL = "https://api.botconnector.id/v1";
@@ -67,9 +68,20 @@ function safeBackup(path, env) {
67
68
  function writeState(target, state, env) {
68
69
  const path = statePath(target, env);
69
70
  mkdirSync(dirname(path), { recursive: true });
70
- writeFileSync(path, `${JSON.stringify(state, null, 2)}
71
+ const files = state.files.map((file) => {
72
+ const hash = hashFile(file.path);
73
+ return hash ? { ...file, hash } : file;
74
+ });
75
+ writeFileSync(path, `${JSON.stringify({ ...state, files }, null, 2)}
71
76
  `, { mode: 384 });
72
77
  }
78
+ function hashFile(path) {
79
+ try {
80
+ return createHash("sha256").update(readFileSync(path)).digest("hex");
81
+ } catch {
82
+ return void 0;
83
+ }
84
+ }
73
85
  function readState(target, env) {
74
86
  const path = statePath(target, env);
75
87
  if (!existsSync(path)) return null;
@@ -622,7 +634,14 @@ async function connectHermes(deps) {
622
634
  discover_models: true,
623
635
  models: Object.fromEntries(models.map((id) => [id, {}]))
624
636
  });
625
- doc.setIn(["model"], { default: model, provider: `custom:${HERMES_PROVIDER_ID}` });
637
+ const providerRef = `custom:${HERMES_PROVIDER_ID}`;
638
+ const currentModel = doc.getIn(["model"]);
639
+ if (currentModel && typeof currentModel === "object" && !Array.isArray(currentModel)) {
640
+ doc.setIn(["model", "default"], model);
641
+ doc.setIn(["model", "provider"], providerRef);
642
+ } else {
643
+ doc.setIn(["model"], { default: model, provider: providerRef });
644
+ }
626
645
  mkdirSync(hermesHome, { recursive: true });
627
646
  writeFileSync(path, doc.toString());
628
647
  writeState("hermes", {
@@ -640,7 +659,18 @@ function disconnect(target, deps) {
640
659
  deps.out(t("{target}: not managed by BCCLI yet.", { target }));
641
660
  return;
642
661
  }
662
+ let leftBehind = 0;
643
663
  for (const file of [...state.files].reverse()) {
664
+ if (file.hash !== void 0 && hashFile(file.path) !== file.hash) {
665
+ leftBehind++;
666
+ deps.err(
667
+ t(
668
+ '{target}: {path} changed after BCCLI connected it, so the old backup was not copied over it. Remove the BCCLI part (provider "botconnector" or the marked block) from that file by hand.',
669
+ { target, path: file.path }
670
+ )
671
+ );
672
+ continue;
673
+ }
644
674
  if (file.backup && existsSync(file.backup)) {
645
675
  mkdirSync(dirname(file.path), { recursive: true });
646
676
  copyFileSync(file.backup, file.path);
@@ -649,7 +679,12 @@ function disconnect(target, deps) {
649
679
  }
650
680
  }
651
681
  rmSync(statePath(target, deps.env), { force: true });
652
- deps.out(t("{target}: the BotConnector integration was removed and the config restored.", { target }));
682
+ deps.out(
683
+ leftBehind ? t(
684
+ "{target}: the BotConnector integration was removed. {n} file(s) were left untouched (see above); delete the BCCLI entries in them by hand for a clean removal.",
685
+ { target, n: String(leftBehind) }
686
+ ) : t("{target}: the BotConnector integration was removed and the config restored.", { target })
687
+ );
653
688
  }
654
689
  function listIntegrations(deps) {
655
690
  for (const target of ["opencode", "aider", "cline", "deepseek-harness", "cursor", "openai-cli", "openai-sdk", "openai-compatible", "codex", "claude-code", "openclaw", "hermes"]) {
@@ -1,15 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  defaultLoginDeps,
4
+ echoFor,
4
5
  readLine,
5
6
  readSecret,
6
7
  runLogin
7
- } from "./chunk-6H6MPG7L.js";
8
- import "./chunk-RRECJTOG.js";
9
- import "./chunk-DRJSANKH.js";
10
- import "./chunk-XCVYR5BK.js";
8
+ } from "./chunk-MBAMDCCV.js";
9
+ import "./chunk-IHQGXDSG.js";
10
+ import "./chunk-C2FUGQJX.js";
11
+ import "./chunk-G5TG43R4.js";
11
12
  export {
12
13
  defaultLoginDeps,
14
+ echoFor,
13
15
  readLine,
14
16
  readSecret,
15
17
  runLogin
package/dist/login.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export declare function readSecret(prompt: string): Promise<string>;
2
+ /** What readLine writes back to the terminal: printable input is visible, control keys are not. */
3
+ export declare function echoFor(ch: string): string | undefined;
2
4
  /** Prompt TANPA masking (kode otorisasi harus terlihat saat di-paste). Ctrl+C -> exit 130. */
3
5
  export declare function readLine(prompt: string): Promise<string>;
4
6
  import type { CliArgs } from './args';
@@ -2,30 +2,30 @@
2
2
  import {
3
3
  CATALOG,
4
4
  fillTemplate
5
- } from "./chunk-TLCFBQ6E.js";
5
+ } from "./chunk-NT2G5FSX.js";
6
6
  import {
7
7
  authorizeMcpServer,
8
8
  clearTokens
9
- } from "./chunk-RRECJTOG.js";
9
+ } from "./chunk-IHQGXDSG.js";
10
10
  import {
11
11
  addGlobalServer,
12
12
  globalMcpPath,
13
13
  readMcpFile,
14
14
  removeGlobalServer
15
- } from "./chunk-2YG6L3YO.js";
15
+ } from "./chunk-2DFY43RP.js";
16
16
  import {
17
17
  bccliHome
18
- } from "./chunk-DRJSANKH.js";
18
+ } from "./chunk-C2FUGQJX.js";
19
19
  import {
20
20
  t
21
- } from "./chunk-XCVYR5BK.js";
21
+ } from "./chunk-G5TG43R4.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-PKUTKQQT.js");
28
+ const { runMcpServe } = await import("./serve-EIQHEUYD.js");
29
29
  return runMcpServe(args, deps);
30
30
  }
31
31
  const installed = readMcpFile(globalMcpPath(home));
@@ -74,9 +74,24 @@ async function runMcpCommand(args, deps) {
74
74
  deps.out(t("{name} installed ({url}).", { name, url: args.url }));
75
75
  return 0;
76
76
  }
77
+ if (args.stdioCommand) {
78
+ const env = Object.fromEntries(
79
+ args.values.filter((v) => v.includes("=")).map((v) => [v.slice(0, v.indexOf("=")), v.slice(v.indexOf("=") + 1)])
80
+ );
81
+ const serverArgs = (args.stdioArgs ?? "").split(/\s+/).filter(Boolean);
82
+ addGlobalServer(home, name, {
83
+ command: args.stdioCommand,
84
+ ...serverArgs.length ? { args: serverArgs } : {},
85
+ ...Object.keys(env).length ? { env } : {}
86
+ });
87
+ deps.out(t("{name} installed (stdio: {command}).", { name, command: args.stdioCommand }));
88
+ return 0;
89
+ }
77
90
  const entry = CATALOG.find((c) => c.name === name);
78
91
  if (!entry) {
79
- deps.err(t("{name} is not in the catalog. For another remote server use: bccli mcp add {name} --url <url>", { name }));
92
+ deps.err(
93
+ t("{name} is not in the catalog. For another server use: bccli mcp add {name} --url <url> (HTTP) or bccli mcp add {name} --command <cmd> (stdio).", { name })
94
+ );
80
95
  return 1;
81
96
  }
82
97
  const values = Object.fromEntries(args.values.map((v) => [v.slice(0, v.indexOf("=")), v.slice(v.indexOf("=") + 1)]));
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  listAllModels
4
- } from "./chunk-HPYI7L4W.js";
5
- import "./chunk-62UTSCWF.js";
6
- import "./chunk-EOJNFGOP.js";
7
- import "./chunk-EAR2C6TS.js";
4
+ } from "./chunk-Y6AZGGH7.js";
5
+ import "./chunk-X24APPXO.js";
6
+ import "./chunk-OOOS5RCT.js";
7
+ import "./chunk-XZ2TI5HV.js";
8
8
  import {
9
9
  loadConfig,
10
10
  resolveModel
11
- } from "./chunk-DRJSANKH.js";
11
+ } from "./chunk-C2FUGQJX.js";
12
12
  import {
13
13
  t
14
- } from "./chunk-XCVYR5BK.js";
14
+ } from "./chunk-G5TG43R4.js";
15
15
 
16
16
  // src/modelsCli.ts
17
17
  async function runModelsCommand(args, deps) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  t
4
- } from "./chunk-XCVYR5BK.js";
4
+ } from "./chunk-G5TG43R4.js";
5
5
 
6
6
  // src/oauthLogin.ts
7
7
  import { createHash, randomBytes } from "crypto";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  bccliHome,
4
4
  globalConfigPath
5
- } from "./chunk-DRJSANKH.js";
5
+ } from "./chunk-C2FUGQJX.js";
6
6
  import {
7
7
  t
8
- } from "./chunk-XCVYR5BK.js";
8
+ } from "./chunk-G5TG43R4.js";
9
9
 
10
10
  // src/pluginsCli.ts
11
11
  import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "fs";
@@ -89,6 +89,10 @@ function listAction(deps) {
89
89
  } catch (error) {
90
90
  return readFailure("list", error, deps);
91
91
  }
92
+ if (!entries.length) {
93
+ deps.out(t("No plugins are installed. Install one with: bccli plugins install <spec>"));
94
+ return 0;
95
+ }
92
96
  const home = bccliHome(deps.env);
93
97
  for (const entry of entries) {
94
98
  const managed = isManagedEntry(entry);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  t
4
- } from "./chunk-XCVYR5BK.js";
4
+ } from "./chunk-G5TG43R4.js";
5
5
 
6
6
  // src/prCli.ts
7
7
  import { spawn } from "child_process";
package/dist/print.d.ts CHANGED
@@ -12,5 +12,6 @@ export declare function runPrint(rt: Runtime, prompt: string, io?: {
12
12
  }, opts?: {
13
13
  allowAll?: boolean;
14
14
  outputFormat?: OutputFormat;
15
+ failOnToolError?: boolean;
15
16
  }): Promise<number>;
16
17
  export {};
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ addProviderKey,
4
+ runProviderCommand
5
+ } from "./chunk-JFYQCPXL.js";
6
+ import "./chunk-Y6AZGGH7.js";
7
+ import "./chunk-X24APPXO.js";
8
+ import "./chunk-OOOS5RCT.js";
9
+ import "./chunk-XZ2TI5HV.js";
10
+ import "./chunk-C2FUGQJX.js";
11
+ import "./chunk-G5TG43R4.js";
12
+ export {
13
+ addProviderKey,
14
+ runProviderCommand
15
+ };