@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.
Files changed (45) hide show
  1. package/dist/{acp-YXBMSWYP.js → acp-QMD7IKKI.js} +2 -2
  2. package/dist/{args-6MWRODGH.js → args-6T55MFPG.js} +4 -4
  3. package/dist/{chunk-IHYNME3G.js → chunk-226R2FBX.js} +1 -1
  4. package/dist/{chunk-2QNYWBDG.js → chunk-3ETD6HSV.js} +31 -18
  5. package/dist/{chunk-OZPSNMUD.js → chunk-5D35DOMD.js} +3 -3
  6. package/dist/{chunk-PBBD37E7.js → chunk-5YTZXUGU.js} +4 -4
  7. package/dist/{chunk-7PRH5NDO.js → chunk-DAFJ7VOQ.js} +1 -1
  8. package/dist/{chunk-ASJRO2WF.js → chunk-EC67VAZX.js} +2 -2
  9. package/dist/{chunk-K3SWFB5S.js → chunk-FNECQ433.js} +2 -2
  10. package/dist/{chunk-IA5PRX4Z.js → chunk-HBR62GF2.js} +1 -1
  11. package/dist/{chunk-GI5GVU2L.js → chunk-JRUQQRP6.js} +1 -4
  12. package/dist/{chunk-KDVKD3QA.js → chunk-KVXONGYT.js} +4 -4
  13. package/dist/{chunk-6RML6SN7.js → chunk-QGTAINBU.js} +6 -6
  14. package/dist/{chunk-GF6CRNT3.js → chunk-R72DRWZ6.js} +1 -1
  15. package/dist/{chunk-PQB4CGSL.js → chunk-SJTJHATK.js} +2 -2
  16. package/dist/{chunk-33OBF43H.js → chunk-SVGARF5B.js} +3 -3
  17. package/dist/{chunk-NGHOZRIM.js → chunk-TSZFE2RV.js} +1 -1
  18. package/dist/{chunk-65OGHOGS.js → chunk-Y7F5CZ4D.js} +1 -1
  19. package/dist/{chunk-FIY424O5.js → chunk-YGITX6JU.js} +1 -1
  20. package/dist/cli.js +37 -37
  21. package/dist/{completion-D3HXSAQY.js → completion-QO5B6N4R.js} +1 -1
  22. package/dist/{config-BAAESXVB.js → config-67RNJLDR.js} +3 -3
  23. package/dist/{config-CJGPM5MJ.js → config-TBRDIB7O.js} +2 -2
  24. package/dist/{ghBotCli-DCCFACAA.js → ghBotCli-4SXXJQGT.js} +13 -13
  25. package/dist/{integrationCli-EYAHT6VL.js → integrationCli-KTHSQC4Y.js} +2 -2
  26. package/dist/{login-FXTMDCCC.js → login-7T6M25XB.js} +3 -3
  27. package/dist/{mcpCli-57JTECJY.js → mcpCli-7RR5N7SX.js} +5 -5
  28. package/dist/{modelsCli-NH7W6MAZ.js → modelsCli-GDE5RVD4.js} +6 -6
  29. package/dist/{oauthLogin-FTOPZW7X.js → oauthLogin-ZVKAVGJH.js} +1 -1
  30. package/dist/{pluginsCli-UUPFG2CF.js → pluginsCli-UKMRWPVT.js} +2 -2
  31. package/dist/{prCli-6OQ5ZUBO.js → prCli-26OUBDFO.js} +1 -1
  32. package/dist/providerCli-QVYG6PFQ.js +15 -0
  33. package/dist/sdk.js +22 -12
  34. package/dist/{serve-HZZYEI3J.js → serve-PAXJYBVI.js} +3 -3
  35. package/dist/{serve-HPQ2K7UE.js → serve-SEGKQ5DM.js} +14 -14
  36. package/dist/session-GDPYDGOX.js +12 -0
  37. package/dist/setup-HRZW73ZW.js +24 -0
  38. package/dist/{statsCli-G7GYLCPM.js → statsCli-ZHURTHK7.js} +1 -1
  39. package/dist/{transferCli-7FW2SJY4.js → transferCli-PQCFSIVT.js} +4 -4
  40. package/dist/{ui-KHNDA2RT.js → ui-52SWT2AL.js} +66 -59
  41. package/dist/{update-UG7GWBXT.js → update-URVV6UXT.js} +2 -2
  42. package/package.json +1 -1
  43. package/dist/providerCli-L6SQHIRK.js +0 -15
  44. package/dist/session-QIZKAZK3.js +0 -12
  45. package/dist/setup-4I5FXW37.js +0 -24
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  CATALOG,
4
4
  fillTemplate
5
- } from "./chunk-K3SWFB5S.js";
5
+ } from "./chunk-FNECQ433.js";
6
6
  import {
7
7
  MAX_VERIFY_ROUNDS,
8
8
  runVerify,
9
9
  toolLabel,
10
10
  verifyFollowup,
11
11
  worktreeListText
12
- } from "./chunk-33OBF43H.js";
12
+ } from "./chunk-SVGARF5B.js";
13
13
  import {
14
14
  BUILTIN_AGENTS,
15
15
  appendMemory,
@@ -21,7 +21,7 @@ import {
21
21
  renderBackgroundTasks,
22
22
  runHooks,
23
23
  validateGlobPattern
24
- } from "./chunk-7PRH5NDO.js";
24
+ } from "./chunk-DAFJ7VOQ.js";
25
25
  import "./chunk-PSO7R5AD.js";
26
26
  import {
27
27
  nextMode
@@ -30,39 +30,39 @@ import {
30
30
  hasKey,
31
31
  providerName,
32
32
  writeGlobalConfig
33
- } from "./chunk-65OGHOGS.js";
33
+ } from "./chunk-Y7F5CZ4D.js";
34
34
  import {
35
35
  Session
36
- } from "./chunk-IA5PRX4Z.js";
36
+ } from "./chunk-HBR62GF2.js";
37
37
  import {
38
38
  contentText
39
- } from "./chunk-ASJRO2WF.js";
39
+ } from "./chunk-EC67VAZX.js";
40
40
  import {
41
41
  REASONING_LEVELS,
42
42
  assertReasoningSupported,
43
43
  parseReasoningLevel,
44
44
  supportedReasoningLevels
45
- } from "./chunk-FIY424O5.js";
45
+ } from "./chunk-YGITX6JU.js";
46
46
  import {
47
47
  addGlobalServer,
48
48
  globalMcpPath,
49
49
  readMcpFile,
50
50
  removeGlobalServer
51
- } from "./chunk-PQB4CGSL.js";
51
+ } from "./chunk-SJTJHATK.js";
52
52
  import {
53
53
  ACCENT,
54
54
  PRESETS,
55
55
  color,
56
56
  matchKeybind,
57
57
  removeCredential
58
- } from "./chunk-NGHOZRIM.js";
58
+ } from "./chunk-TSZFE2RV.js";
59
59
  import {
60
60
  getLanguage,
61
61
  locale,
62
62
  parseLang,
63
63
  setLanguage,
64
64
  t
65
- } from "./chunk-GI5GVU2L.js";
65
+ } from "./chunk-JRUQQRP6.js";
66
66
 
67
67
  // src/ui/index.tsx
68
68
  import { render } from "ink";
@@ -810,11 +810,31 @@ function clickedThinking(click, cursorRow, rootHeight, target) {
810
810
  const origin = cursorRow - rootHeight + 1;
811
811
  const row = origin + target.y;
812
812
  const col = target.x + 1;
813
- return click.y >= row && click.y < row + target.height && click.x >= col && click.x < col + Math.min(target.width, 46);
813
+ return (click.y === row || click.y === row - 1) && click.x >= col && click.x < col + Math.min(target.width, 46);
814
814
  }
815
815
  function isMouseControlInput(input) {
816
816
  return /^\[<(?:\d+;){2}\d+[mM]$/.test(input) || /^\[(?:\d+;)\d+R$/.test(input);
817
817
  }
818
+ function parseThinkingReports(value) {
819
+ const events = [];
820
+ let offset = 0;
821
+ while (true) {
822
+ const start = value.indexOf("\x1B[", offset);
823
+ if (start < 0) break;
824
+ const finish = /[a-zA-Z~]/.exec(value.slice(start + 2));
825
+ if (!finish) return { events, rest: value.slice(start) };
826
+ const end = start + 2 + finish.index + 1;
827
+ const raw = value.slice(start, end);
828
+ const press = parseMousePress(raw);
829
+ const cursor = parseCursorPosition(raw);
830
+ if (press) events.push({ type: "mouse", press });
831
+ else if (cursor) events.push({ type: "cursor", cursor });
832
+ offset = end;
833
+ }
834
+ const remaining = value.lastIndexOf("\x1B[");
835
+ if (remaining >= offset) return { events, rest: value.slice(remaining) };
836
+ return { events, rest: value.endsWith("\x1B") ? "\x1B" : "" };
837
+ }
818
838
 
819
839
  // src/ui/LinePrompt.tsx
820
840
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
@@ -1531,6 +1551,9 @@ function App({ runtime, initialPrompt, version }) {
1531
1551
  const [planAsk, setPlanAsk] = useState8(null);
1532
1552
  const [queued, setQueued] = useState8([]);
1533
1553
  const [showThinking, setShowThinking] = useState8(runtime.config.thinkingVisible === true);
1554
+ const showThinkingRef = useRef(showThinking);
1555
+ const [lastThinking, setLastThinking] = useState8("");
1556
+ const hasThinking = !!lastThinking.trim();
1534
1557
  const { stdin } = useStdin();
1535
1558
  const { stdout } = useStdout2();
1536
1559
  const liveRootRef = useRef(null);
@@ -1554,6 +1577,7 @@ function App({ runtime, initialPrompt, version }) {
1554
1577
  if ((event.tool === "edit" || event.tool === "write") && !event.isError) editedInTurn.current = true;
1555
1578
  }
1556
1579
  if (event.type === "usage") setTokens(event.inputTokens + event.outputTokens);
1580
+ if (event.type === "thinking" && event.delta) setLastThinking((prev) => prev + event.delta);
1557
1581
  if (event.type === "budgetExceeded") {
1558
1582
  notice(
1559
1583
  t("Budget exceeded ({kind}): {used} of {limit}. Further model calls are blocked; raise usageCap in ~/.bccli/config.json.", {
@@ -1581,6 +1605,7 @@ function App({ runtime, initialPrompt, version }) {
1581
1605
  async (text) => {
1582
1606
  setTranscript((t2) => ({ ...t2, done: [...t2.done, entry({ kind: "user", text })] }));
1583
1607
  setBusy(true);
1608
+ setLastThinking("");
1584
1609
  setStartedAt(Date.now());
1585
1610
  editedInTurn.current = false;
1586
1611
  controller.current = new AbortController();
@@ -1627,6 +1652,7 @@ function App({ runtime, initialPrompt, version }) {
1627
1652
  case "clear":
1628
1653
  runtime.agent.clear();
1629
1654
  setTokens(0);
1655
+ setLastThinking("");
1630
1656
  notice(t("Conversation cleared."));
1631
1657
  return;
1632
1658
  case "cost": {
@@ -1721,6 +1747,7 @@ function App({ runtime, initialPrompt, version }) {
1721
1747
  case "new":
1722
1748
  runtime.newSession();
1723
1749
  setTokens(0);
1750
+ setLastThinking("");
1724
1751
  notice(t("New session started. The previous session stays saved (/resume)."));
1725
1752
  return;
1726
1753
  case "session":
@@ -1753,6 +1780,7 @@ function App({ runtime, initialPrompt, version }) {
1753
1780
  if (!chosen) return;
1754
1781
  runtime.resume(chosen.session);
1755
1782
  setTokens(0);
1783
+ setLastThinking("");
1756
1784
  const chat = runtime.agent.messages.map((m) => m.role === "user" && Array.isArray(m.content) ? { ...m, content: contentText(m.content) } : m).filter(
1757
1785
  (m) => (m.role === "user" || m.role === "assistant") && typeof m.content === "string" && !!m.content.trim()
1758
1786
  );
@@ -2084,46 +2112,35 @@ ARGUMENTS: ${slash.args}`);
2084
2112
  }
2085
2113
  }, [initialPrompt, submit]);
2086
2114
  const toggleThinking = useCallback(() => {
2087
- const bind = runtime.config.keybinds.thinking.spec;
2088
- const next = !showThinking;
2089
- const toggled = next ? t("Thinking shown ({bind} to hide).", { bind }) : t("Thinking hidden ({bind} to show).", { bind });
2115
+ const next = !showThinkingRef.current;
2116
+ showThinkingRef.current = next;
2090
2117
  setShowThinking(next);
2091
2118
  try {
2092
2119
  writeGlobalConfig({ thinkingVisible: next }, runtime.env);
2093
2120
  } catch (error) {
2094
2121
  notice(t("Could not save thinking visibility: {error}", { error: error.message }), "warn");
2095
2122
  }
2096
- setTranscript((t2) => {
2097
- const last = [...t2.done, ...t2.live].findLast((e) => e.kind === "thinking");
2098
- const reprint = next && last?.kind === "thinking" && t2.done.includes(last);
2099
- return {
2100
- ...t2,
2101
- done: [
2102
- ...t2.done,
2103
- ...reprint ? [entry({ kind: "thinking", text: last.text, open: true })] : [],
2104
- entry({ kind: "notice", text: toggled, tone: "info" })
2105
- ]
2106
- };
2107
- });
2108
- }, [runtime, showThinking, notice]);
2123
+ }, [runtime, notice]);
2109
2124
  useEffect3(() => {
2110
- if (!busy || pending || !stdin.isTTY || !stdout.isTTY || !thinkingTargetRef.current) return;
2125
+ if (!busy && !hasThinking || pending || !stdin.isTTY || !stdout.isTTY || !thinkingTargetRef.current) return;
2111
2126
  let click;
2127
+ let mouseBuffer = "";
2112
2128
  const onData = (data) => {
2113
- const value = String(data);
2114
- const press = parseMousePress(value);
2115
- if (press) {
2116
- click = press;
2117
- stdout.write("\x1B[6n");
2118
- return;
2129
+ mouseBuffer += String(data);
2130
+ const reports = parseThinkingReports(mouseBuffer);
2131
+ mouseBuffer = reports.rest.slice(-80);
2132
+ for (const report of reports.events) {
2133
+ if (report.type === "mouse") {
2134
+ click = report.press;
2135
+ stdout.write("\x1B[6n");
2136
+ } else if (click && liveRootRef.current && thinkingTargetRef.current) {
2137
+ const current = click;
2138
+ click = void 0;
2139
+ const root = measureElement(liveRootRef.current);
2140
+ const target = measureElement(thinkingTargetRef.current);
2141
+ if (clickedThinking(current, report.cursor.row, root.height, target)) toggleThinking();
2142
+ }
2119
2143
  }
2120
- const cursor = parseCursorPosition(value);
2121
- if (!cursor || !click || !liveRootRef.current || !thinkingTargetRef.current) return;
2122
- const current = click;
2123
- click = void 0;
2124
- const root = measureElement(liveRootRef.current);
2125
- const target = measureElement(thinkingTargetRef.current);
2126
- if (clickedThinking(current, cursor.row, root.height, target)) toggleThinking();
2127
2144
  };
2128
2145
  stdin.on("data", onData);
2129
2146
  stdout.write("\x1B[?1000h\x1B[?1006h");
@@ -2131,7 +2148,7 @@ ARGUMENTS: ${slash.args}`);
2131
2148
  stdin.off("data", onData);
2132
2149
  stdout.write("\x1B[?1000l\x1B[?1006l");
2133
2150
  };
2134
- }, [busy, pending, stdin, stdout, toggleThinking]);
2151
+ }, [busy, pending, stdin, stdout, toggleThinking, hasThinking]);
2135
2152
  useInput9((input, key) => {
2136
2153
  if (key.tab && key.shift) {
2137
2154
  const next = nextMode(runtime.agent.permissions.mode);
@@ -2239,18 +2256,8 @@ ${t2.output}`);
2239
2256
  /* @__PURE__ */ jsx16(Text16, { color: color(ACCENT), children: "\u25CF " }),
2240
2257
  /* @__PURE__ */ jsx16(Markdown, { text: e.text.replace(/^\s+/, "") })
2241
2258
  ] }, e.id);
2242
- case "thinking": {
2243
- const text = e.text.trim();
2244
- if (!text) return null;
2245
- if (!(e.open ?? showThinking)) {
2246
- const lines = text.split("\n").length;
2247
- return /* @__PURE__ */ jsx16(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("\u273B Thinking \xB7 {n} lines \xB7 {bind} to show", { n: lines, bind: runtime.config.keybinds.thinking.spec }) }) }, e.id);
2248
- }
2249
- return /* @__PURE__ */ jsxs12(Box13, { marginTop: 1, flexDirection: "column", children: [
2250
- /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("\u273B Thinking ({bind} to hide)", { bind: runtime.config.keybinds.thinking.spec }) }),
2251
- /* @__PURE__ */ jsx16(Box13, { paddingLeft: 2, children: /* @__PURE__ */ jsx16(Text16, { dimColor: true, italic: true, children: text }) })
2252
- ] }, e.id);
2253
- }
2259
+ case "thinking":
2260
+ return null;
2254
2261
  case "tool":
2255
2262
  return /* @__PURE__ */ jsx16(ToolBlock, { tool: e.tool, target: e.target, output: e.output, display: e.display, isError: e.isError, done: e.done, sub: e.sub, moreBind: runtime.config.keybinds.toolOutput.spec }, e.id);
2256
2263
  case "notice":
@@ -2260,9 +2267,9 @@ ${t2.output}`);
2260
2267
  return /* @__PURE__ */ jsxs12(Box13, { ref: liveRootRef, flexDirection: "column", children: [
2261
2268
  /* @__PURE__ */ jsx16(Static, { items: transcript.done, children: renderEntry }),
2262
2269
  transcript.live.map(renderEntry),
2263
- busy && !pending && !planAsk ? /* @__PURE__ */ jsxs12(Box13, { ref: thinkingTargetRef, marginTop: 1, flexDirection: "column", children: [
2270
+ busy && !pending && !planAsk || !busy && hasThinking ? /* @__PURE__ */ jsxs12(Box13, { ref: thinkingTargetRef, marginTop: 1, flexDirection: "column", children: [
2264
2271
  /* @__PURE__ */ jsxs12(Box13, { flexDirection: "row", children: [
2265
- /* @__PURE__ */ jsx16(Spinner, { label: cancelling ? t("Cancelling") : t("Thinking"), startedAt }),
2272
+ busy ? /* @__PURE__ */ jsx16(Spinner, { label: cancelling ? t("Cancelling") : t("Thinking"), startedAt }) : /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("\u273B Thinking") }),
2266
2273
  /* @__PURE__ */ jsxs12(Text16, { dimColor: true, children: [
2267
2274
  " \xB7 ",
2268
2275
  runtime.config.keybinds.thinking.spec,
@@ -2272,7 +2279,7 @@ ${t2.output}`);
2272
2279
  ] }),
2273
2280
  showThinking ? /* @__PURE__ */ jsxs12(Box13, { flexDirection: "column", paddingLeft: 2, children: [
2274
2281
  /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("Model: {model} \xB7 reasoning: {level}", { model: runtime.modelRef, level: reasoning }) }),
2275
- ![...transcript.done, ...transcript.live].some((e) => e.kind === "thinking" && !!e.text.trim()) ? /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("No reasoning summary received yet; tool activity remains visible above.") }) : null
2282
+ lastThinking.trim() ? /* @__PURE__ */ jsx16(Text16, { dimColor: true, italic: true, children: lastThinking.trim() }) : /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("No reasoning summary received yet; tool activity remains visible above.") })
2276
2283
  ] }) : null
2277
2284
  ] }) : null,
2278
2285
  pending ? /* @__PURE__ */ jsx16(PermissionPrompt, { request: pending.request, onAnswer: answer }, pending.id) : null,
@@ -2327,7 +2334,7 @@ ${t2.output}`);
2327
2334
  import { jsx as jsx17 } from "react/jsx-runtime";
2328
2335
  async function startInteractive(rt, opts) {
2329
2336
  if (opts.resume) {
2330
- const { Session: Session2 } = await import("./session-QIZKAZK3.js");
2337
+ const { Session: Session2 } = await import("./session-GDPYDGOX.js");
2331
2338
  const list = Session2.list(rt.home, rt.cwd).slice(0, 20);
2332
2339
  if (!list.length) console.log(t("No sessions in this folder yet; starting a new one."));
2333
2340
  else {
@@ -2342,7 +2349,7 @@ async function startInteractive(rt, opts) {
2342
2349
  if (chosen) rt.resume(chosen.session);
2343
2350
  }
2344
2351
  }
2345
- const { serversToStart, setProjectTrust } = await import("./config-BAAESXVB.js");
2352
+ const { serversToStart, setProjectTrust } = await import("./config-67RNJLDR.js");
2346
2353
  const plan = serversToStart(rt.home, rt.cwd);
2347
2354
  if (plan.needTrust.length) {
2348
2355
  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-IHYNME3G.js";
4
+ } from "./chunk-226R2FBX.js";
5
5
  import {
6
6
  t
7
- } from "./chunk-GI5GVU2L.js";
7
+ } from "./chunk-JRUQQRP6.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.46",
3
+ "version": "0.4.0-beta.47",
4
4
  "description": "BCCLI — BotConnector AI coding agent for the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- addProviderKey,
4
- runProviderCommand
5
- } from "./chunk-KDVKD3QA.js";
6
- import "./chunk-PBBD37E7.js";
7
- import "./chunk-65OGHOGS.js";
8
- import "./chunk-ASJRO2WF.js";
9
- import "./chunk-FIY424O5.js";
10
- import "./chunk-NGHOZRIM.js";
11
- import "./chunk-GI5GVU2L.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-IA5PRX4Z.js";
6
- import "./chunk-ASJRO2WF.js";
7
- import "./chunk-FIY424O5.js";
8
- import "./chunk-GI5GVU2L.js";
9
- export {
10
- Session,
11
- pruneSessions
12
- };
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- createRuntime,
4
- lunaPtcAutoEnabled
5
- } from "./chunk-2QNYWBDG.js";
6
- import "./chunk-QZKLZELZ.js";
7
- import "./chunk-7PRH5NDO.js";
8
- import "./chunk-GF6CRNT3.js";
9
- import "./chunk-PSO7R5AD.js";
10
- import "./chunk-GAFJEQTJ.js";
11
- import "./chunk-KDVKD3QA.js";
12
- import "./chunk-PBBD37E7.js";
13
- import "./chunk-65OGHOGS.js";
14
- import "./chunk-7F3IWBPQ.js";
15
- import "./chunk-IA5PRX4Z.js";
16
- import "./chunk-ASJRO2WF.js";
17
- import "./chunk-FIY424O5.js";
18
- import "./chunk-PQB4CGSL.js";
19
- import "./chunk-NGHOZRIM.js";
20
- import "./chunk-GI5GVU2L.js";
21
- export {
22
- createRuntime,
23
- lunaPtcAutoEnabled
24
- };