@botconnector/bccli 0.4.0-beta.41 → 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.
Files changed (50) hide show
  1. package/dist/{acp-SZWZ5EE4.js → acp-U25MNDND.js} +2 -2
  2. package/dist/{args-4SMOHFN5.js → args-MFTMBNRN.js} +4 -4
  3. package/dist/{chunk-LN32JIZR.js → chunk-25DSN3Y3.js} +4 -4
  4. package/dist/{chunk-JROUQ5YS.js → chunk-2ON3WIDP.js} +4 -4
  5. package/dist/{chunk-3HCOAJEQ.js → chunk-7F3IWBPQ.js} +1 -0
  6. package/dist/{chunk-VM7HYAJS.js → chunk-BQHKN7JI.js} +1 -1
  7. package/dist/{chunk-AS7VV7D3.js → chunk-CYTRCZXI.js} +27 -8
  8. package/dist/{chunk-EQQTTE2K.js → chunk-DUSVS3XK.js} +1 -1
  9. package/dist/{chunk-M7LLJQ7M.js → chunk-GIGWZFCY.js} +64 -24
  10. package/dist/{chunk-ISCT3PN3.js → chunk-I7GXIJCY.js} +2 -2
  11. package/dist/{chunk-HE33XAPZ.js → chunk-NVRNFR4S.js} +1 -1
  12. package/dist/{chunk-DBHDZ5EP.js → chunk-PSRNKKGA.js} +13 -3
  13. package/dist/{chunk-AVB6M4JE.js → chunk-PZC2Q6MJ.js} +2 -2
  14. package/dist/{chunk-M23QBX3V.js → chunk-QHNWI3OT.js} +80 -3
  15. package/dist/{chunk-GGNXHJL6.js → chunk-RMDW3OQ6.js} +2 -2
  16. package/dist/{chunk-BUHWQU3V.js → chunk-TW5HZOTB.js} +3 -3
  17. package/dist/chunk-U6PCNS4B.js +20 -0
  18. package/dist/{chunk-SESBH44L.js → chunk-VO6MF6JJ.js} +1 -1
  19. package/dist/chunk-Y3QKYORR.js +145 -0
  20. package/dist/{chunk-M4IYXI3V.js → chunk-ZGH4B7OU.js} +27 -33
  21. package/dist/{chunk-NI5JZUZ3.js → chunk-ZKMSTD6G.js} +1 -1
  22. package/dist/cli.js +78 -37
  23. package/dist/completion-6K4AXKK2.js +125 -0
  24. package/dist/config-LCY27K3L.js +30 -0
  25. package/dist/{config-C4KLLDC6.js → config-Z4HSA435.js} +3 -3
  26. package/dist/ghBotCli-TJMKJU3E.js +677 -0
  27. package/dist/{integrationCli-HR7CDUSI.js → integrationCli-33KU6GIK.js} +2 -2
  28. package/dist/login-LNF7ZV2S.js +16 -0
  29. package/dist/{mcpCli-5QTXH7XJ.js → mcpCli-TXFS3AOJ.js} +6 -6
  30. package/dist/{modelsCli-DKTT3UZD.js → modelsCli-IZSMIYVB.js} +6 -6
  31. package/dist/npmRunner-LU43GM3W.js +46 -0
  32. package/dist/oauthLogin-QGDYTOW7.js +210 -0
  33. package/dist/pluginsCli-RD4QW3DX.js +284 -0
  34. package/dist/prCli-NR3ZQMST.js +73 -0
  35. package/dist/providerCli-AA3CHCGV.js +15 -0
  36. package/dist/sdk.js +160 -57
  37. package/dist/{serve-KQ35P4W3.js → serve-F7BYQ7X6.js} +19 -18
  38. package/dist/{serve-I2VQUTHR.js → serve-YNKE332Z.js} +3 -3
  39. package/dist/session-KRV2UP5C.js +12 -0
  40. package/dist/setup-L4OPF3XW.js +24 -0
  41. package/dist/statsCli-RPCIMT5R.js +109 -0
  42. package/dist/transferCli-RQBB6RVY.js +71 -0
  43. package/dist/{ui-S4QFJJIB.js → ui-4ZTUMTYM.js} +13 -13
  44. package/dist/{update-VBDEHHMR.js → update-7SSREI2O.js} +2 -2
  45. package/package.json +1 -1
  46. package/dist/chunk-DSFHN5CH.js +0 -52
  47. package/dist/login-T5S6SPZA.js +0 -9
  48. package/dist/providerCli-DDH4ZZUY.js +0 -15
  49. package/dist/session-H2YL5RSB.js +0 -12
  50. package/dist/setup-45WQXUBK.js +0 -23
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ Session
4
+ } from "./chunk-BQHKN7JI.js";
5
+ import "./chunk-RMDW3OQ6.js";
6
+ import "./chunk-ZKMSTD6G.js";
7
+ import {
8
+ t
9
+ } from "./chunk-QHNWI3OT.js";
10
+
11
+ // src/transferCli.ts
12
+ import { copyFileSync, existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "fs";
13
+ import { dirname, join } from "path";
14
+ function runExportCommand(args, deps) {
15
+ const first = (args.subArgs[0] ?? "").trim();
16
+ let source;
17
+ let dest;
18
+ if (first && first.endsWith(".jsonl") && existsSync(first) && statSync(first).isFile()) {
19
+ source = first;
20
+ dest = args.subArgs[1];
21
+ } else {
22
+ const latest = Session.latest(args.home, args.cwd);
23
+ if (!latest) {
24
+ deps.err?.(t("no session to export in this folder"));
25
+ return 1;
26
+ }
27
+ source = latest.file;
28
+ dest = first || void 0;
29
+ }
30
+ if (!dest) {
31
+ for (const line of readFileSync(source, "utf8").split("\n")) {
32
+ if (line.trim()) deps.out(line);
33
+ }
34
+ return 0;
35
+ }
36
+ mkdirSync(dirname(dest), { recursive: true });
37
+ copyFileSync(source, dest);
38
+ deps.out(t("exported {file}", { file: dest }));
39
+ return 0;
40
+ }
41
+ function runImportCommand(args, deps) {
42
+ const src = (args.subArgs[0] ?? "").trim();
43
+ if (!src || !existsSync(src)) {
44
+ deps.err?.(t("file not found: {file}", { file: src || "(none)" }));
45
+ return 1;
46
+ }
47
+ const raw = readFileSync(src, "utf8");
48
+ const lines = raw.split("\n").filter((l) => l.trim());
49
+ for (const line of lines) {
50
+ try {
51
+ JSON.parse(line);
52
+ } catch {
53
+ deps.err?.(t("invalid session file (non-JSON line): {file}", { file: src }));
54
+ return 1;
55
+ }
56
+ }
57
+ const slug = args.cwd.replace(/[^a-zA-Z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(-100) || "root";
58
+ const dir = join(args.home, "sessions", slug);
59
+ mkdirSync(dir, { recursive: true });
60
+ const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
61
+ const dest = join(dir, `${stamp}-imported.jsonl`);
62
+ writeFileSync(dest, lines.length ? `${lines.join("\n")}
63
+ ` : "");
64
+ deps.out(t("imported {n} record(s) into {file}", { n: String(lines.length), file: dest }));
65
+ return 0;
66
+ }
67
+ export {
68
+ readdirSync,
69
+ runExportCommand,
70
+ runImportCommand
71
+ };
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  CATALOG,
4
4
  fillTemplate
5
- } from "./chunk-ISCT3PN3.js";
5
+ } from "./chunk-I7GXIJCY.js";
6
6
  import {
7
7
  MAX_VERIFY_ROUNDS,
8
8
  runVerify,
9
9
  toolLabel,
10
10
  verifyFollowup,
11
11
  worktreeListText
12
- } from "./chunk-BUHWQU3V.js";
12
+ } from "./chunk-TW5HZOTB.js";
13
13
  import {
14
14
  BUILTIN_AGENTS,
15
15
  appendMemory,
@@ -21,7 +21,8 @@ import {
21
21
  renderBackgroundTasks,
22
22
  runHooks,
23
23
  validateGlobPattern
24
- } from "./chunk-DBHDZ5EP.js";
24
+ } from "./chunk-PSRNKKGA.js";
25
+ import "./chunk-PSO7R5AD.js";
25
26
  import {
26
27
  nextMode
27
28
  } from "./chunk-GAFJEQTJ.js";
@@ -29,40 +30,39 @@ import {
29
30
  hasKey,
30
31
  providerName,
31
32
  writeGlobalConfig
32
- } from "./chunk-SESBH44L.js";
33
+ } from "./chunk-VO6MF6JJ.js";
33
34
  import {
34
35
  Session
35
- } from "./chunk-VM7HYAJS.js";
36
+ } from "./chunk-BQHKN7JI.js";
36
37
  import {
37
38
  contentText
38
- } from "./chunk-GGNXHJL6.js";
39
+ } from "./chunk-RMDW3OQ6.js";
39
40
  import {
40
41
  REASONING_LEVELS,
41
42
  assertReasoningSupported,
42
43
  parseReasoningLevel,
43
44
  supportedReasoningLevels
44
- } from "./chunk-NI5JZUZ3.js";
45
+ } from "./chunk-ZKMSTD6G.js";
45
46
  import {
46
47
  addGlobalServer,
47
48
  globalMcpPath,
48
49
  readMcpFile,
49
50
  removeGlobalServer
50
- } from "./chunk-AVB6M4JE.js";
51
- import "./chunk-PSO7R5AD.js";
51
+ } from "./chunk-PZC2Q6MJ.js";
52
52
  import {
53
53
  ACCENT,
54
54
  PRESETS,
55
55
  color,
56
56
  matchKeybind,
57
57
  removeCredential
58
- } from "./chunk-M7LLJQ7M.js";
58
+ } from "./chunk-GIGWZFCY.js";
59
59
  import {
60
60
  getLanguage,
61
61
  locale,
62
62
  parseLang,
63
63
  setLanguage,
64
64
  t
65
- } from "./chunk-M23QBX3V.js";
65
+ } from "./chunk-QHNWI3OT.js";
66
66
 
67
67
  // src/ui/index.tsx
68
68
  import { render } from "ink";
@@ -2239,7 +2239,7 @@ ${t2.output}`);
2239
2239
  import { jsx as jsx17 } from "react/jsx-runtime";
2240
2240
  async function startInteractive(rt, opts) {
2241
2241
  if (opts.resume) {
2242
- const { Session: Session2 } = await import("./session-H2YL5RSB.js");
2242
+ const { Session: Session2 } = await import("./session-KRV2UP5C.js");
2243
2243
  const list = Session2.list(rt.home, rt.cwd).slice(0, 20);
2244
2244
  if (!list.length) console.log(t("No sessions in this folder yet; starting a new one."));
2245
2245
  else {
@@ -2254,7 +2254,7 @@ async function startInteractive(rt, opts) {
2254
2254
  if (chosen) rt.resume(chosen.session);
2255
2255
  }
2256
2256
  }
2257
- const { serversToStart, setProjectTrust } = await import("./config-C4KLLDC6.js");
2257
+ const { serversToStart, setProjectTrust } = await import("./config-Z4HSA435.js");
2258
2258
  const plan = serversToStart(rt.home, rt.cwd);
2259
2259
  if (plan.needTrust.length) {
2260
2260
  const { createInterface } = await import("readline/promises");
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-EQQTTE2K.js";
4
+ } from "./chunk-DUSVS3XK.js";
5
5
  import {
6
6
  t
7
- } from "./chunk-M23QBX3V.js";
7
+ } from "./chunk-QHNWI3OT.js";
8
8
 
9
9
  // src/update.ts
10
10
  import { spawnSync } from "child_process";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botconnector/bccli",
3
- "version": "0.4.0-beta.41",
3
+ "version": "0.4.0-beta.43",
4
4
  "description": "BCCLI — BotConnector AI coding agent for the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,52 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // src/login.ts
4
- function readSecret(prompt) {
5
- return new Promise((resolve) => {
6
- process.stdout.write(prompt);
7
- const stdin = process.stdin;
8
- if (!stdin.isTTY) {
9
- let data = "";
10
- stdin.on("data", (d) => {
11
- data += d;
12
- });
13
- stdin.on("end", () => resolve(data.trim()));
14
- return;
15
- }
16
- let value = "";
17
- stdin.setRawMode(true);
18
- stdin.resume();
19
- const onData = (buffer) => {
20
- for (const ch of buffer.toString()) {
21
- if (ch === "\r" || ch === "\n") {
22
- stdin.setRawMode(false);
23
- stdin.pause();
24
- stdin.off("data", onData);
25
- process.stdout.write("\n");
26
- resolve(value.trim());
27
- return;
28
- }
29
- if (ch === "") process.exit(130);
30
- if (ch === "\x7F" || ch === "\b") value = value.slice(0, -1);
31
- else value += ch;
32
- }
33
- };
34
- stdin.on("data", onData);
35
- });
36
- }
37
- async function runLogin(providerId, cwd) {
38
- const { runProviderCommand } = await import("./providerCli-DDH4ZZUY.js");
39
- const { parseCliArgs } = await import("./args-4SMOHFN5.js");
40
- return runProviderCommand(parseCliArgs(["provider", "add", providerId]), {
41
- env: process.env,
42
- cwd,
43
- out: (s) => console.log(s),
44
- err: (s) => console.error(s),
45
- readSecret
46
- });
47
- }
48
-
49
- export {
50
- readSecret,
51
- runLogin
52
- };
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- readSecret,
4
- runLogin
5
- } from "./chunk-DSFHN5CH.js";
6
- export {
7
- readSecret,
8
- runLogin
9
- };
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- addProviderKey,
4
- runProviderCommand
5
- } from "./chunk-JROUQ5YS.js";
6
- import "./chunk-LN32JIZR.js";
7
- import "./chunk-SESBH44L.js";
8
- import "./chunk-GGNXHJL6.js";
9
- import "./chunk-NI5JZUZ3.js";
10
- import "./chunk-M7LLJQ7M.js";
11
- import "./chunk-M23QBX3V.js";
12
- export {
13
- addProviderKey,
14
- runProviderCommand
15
- };
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- Session,
4
- pruneSessions
5
- } from "./chunk-VM7HYAJS.js";
6
- import "./chunk-GGNXHJL6.js";
7
- import "./chunk-NI5JZUZ3.js";
8
- import "./chunk-M23QBX3V.js";
9
- export {
10
- Session,
11
- pruneSessions
12
- };
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- createRuntime,
4
- lunaPtcAutoEnabled
5
- } from "./chunk-M4IYXI3V.js";
6
- import "./chunk-3HCOAJEQ.js";
7
- import "./chunk-DBHDZ5EP.js";
8
- import "./chunk-GAFJEQTJ.js";
9
- import "./chunk-JROUQ5YS.js";
10
- import "./chunk-LN32JIZR.js";
11
- import "./chunk-SESBH44L.js";
12
- import "./chunk-VM7HYAJS.js";
13
- import "./chunk-GGNXHJL6.js";
14
- import "./chunk-NI5JZUZ3.js";
15
- import "./chunk-AVB6M4JE.js";
16
- import "./chunk-HE33XAPZ.js";
17
- import "./chunk-PSO7R5AD.js";
18
- import "./chunk-M7LLJQ7M.js";
19
- import "./chunk-M23QBX3V.js";
20
- export {
21
- createRuntime,
22
- lunaPtcAutoEnabled
23
- };