@botconnector/bccli 0.4.2 → 0.4.4

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 (29) hide show
  1. package/dist/{acp-UYC6APR5.js → acp-SWBX4TT6.js} +2 -2
  2. package/dist/{args-NRTZWWEV.js → args-UCLW7NID.js} +2 -2
  3. package/dist/{chunk-TIMSYZIR.js → chunk-5BVC3Y6B.js} +2 -2
  4. package/dist/{chunk-266SY3MC.js → chunk-CGBSE55G.js} +1 -1
  5. package/dist/{chunk-R72OV7RF.js → chunk-FI7RUJRX.js} +255 -71
  6. package/dist/{chunk-ZEPTUKNW.js → chunk-HBQ6OLQT.js} +76 -20
  7. package/dist/{chunk-5YJ3ZQVR.js → chunk-MSDK4IIJ.js} +9 -7
  8. package/dist/{chunk-IYR5PYA3.js → chunk-OZ5GHMTN.js} +1 -1
  9. package/dist/{chunk-KPTML72Q.js → chunk-QQJ2VVIW.js} +8 -0
  10. package/dist/{chunk-H7XJDKJY.js → chunk-RZF6A43N.js} +1 -1
  11. package/dist/{chunk-SVD4LHJC.js → chunk-SMTBYDNO.js} +1 -1
  12. package/dist/{chunk-6UO5GX55.js → chunk-TGGKACSE.js} +1 -1
  13. package/dist/{chunk-C64KM37J.js → chunk-YCHCHOMK.js} +5 -1
  14. package/dist/cli.js +22 -22
  15. package/dist/{ghBotCli-TSLRORJJ.js → ghBotCli-ZVWU7EMG.js} +8 -8
  16. package/dist/{login-RYESFZG6.js → login-QPUWIC76.js} +1 -1
  17. package/dist/lsp.d.ts +23 -0
  18. package/dist/{modelsCli-OP7CDZC7.js → modelsCli-SZK4E2BY.js} +3 -3
  19. package/dist/{providerCli-5OZI2GQQ.js → providerCli-PKI7B2SC.js} +4 -4
  20. package/dist/sdk.js +341 -92
  21. package/dist/{serve-4J7HA4JO.js → serve-L3SAIAAI.js} +9 -9
  22. package/dist/{session-YQXCCKXI.js → session-ASXO6GXR.js} +3 -3
  23. package/dist/{setup-S4AJT6XE.js → setup-F7FZ66OS.js} +7 -7
  24. package/dist/tools/diagnostics.d.ts +8 -0
  25. package/dist/tools/sandbox.d.ts +3 -0
  26. package/dist/{transferCli-R2KEIWQR.js → transferCli-HKGAWZ3Q.js} +3 -3
  27. package/dist/{ui-36ZEK65V.js → ui-NPA52YJH.js} +45 -9
  28. package/dist/{update-FSS7X5WV.js → update-AFIM34US.js} +1 -1
  29. package/package.json +1 -1
@@ -1,4 +1,6 @@
1
1
  export declare function sandboxSupported(platform: NodeJS.Platform): boolean;
2
+ /** Converts a Windows drive path (`C:\Users\foo`) into its WSL `/mnt/c/Users/foo` mount path. */
3
+ export declare function winPathToWsl(winPath: string): string;
2
4
  /** Seatbelt profile: read everything, write only under cwd + temp areas, network only when allowed. */
3
5
  export declare function darwinProfile(cwd: string, network: boolean): string;
4
6
  /**
@@ -9,4 +11,5 @@ export declare function sandboxArgv(command: string, opts: {
9
11
  platform: NodeJS.Platform;
10
12
  cwd: string;
11
13
  network: boolean;
14
+ wslBwrap?: boolean;
12
15
  }): string[] | undefined;
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  Session
4
- } from "./chunk-SVD4LHJC.js";
5
- import "./chunk-5YJ3ZQVR.js";
6
- import "./chunk-KPTML72Q.js";
4
+ } from "./chunk-SMTBYDNO.js";
5
+ import "./chunk-MSDK4IIJ.js";
6
+ import "./chunk-QQJ2VVIW.js";
7
7
  import {
8
8
  t
9
9
  } from "./chunk-3WHI4LN3.js";
@@ -9,7 +9,7 @@ import {
9
9
  toolLabel,
10
10
  verifyFollowup,
11
11
  worktreeListText
12
- } from "./chunk-C64KM37J.js";
12
+ } from "./chunk-YCHCHOMK.js";
13
13
  import {
14
14
  BUILTIN_AGENTS,
15
15
  appendMemory,
@@ -20,9 +20,11 @@ import {
20
20
  parseMemoryArgs,
21
21
  recordFileMtime,
22
22
  renderBackgroundTasks,
23
+ resolveShell,
24
+ runCommand,
23
25
  runHooks,
24
26
  validateGlobPattern
25
- } from "./chunk-ZEPTUKNW.js";
27
+ } from "./chunk-HBQ6OLQT.js";
26
28
  import "./chunk-PSO7R5AD.js";
27
29
  import {
28
30
  nextMode,
@@ -35,16 +37,16 @@ import {
35
37
  } from "./chunk-HQW4BROS.js";
36
38
  import {
37
39
  Session
38
- } from "./chunk-SVD4LHJC.js";
40
+ } from "./chunk-SMTBYDNO.js";
39
41
  import {
40
42
  contentText
41
- } from "./chunk-5YJ3ZQVR.js";
43
+ } from "./chunk-MSDK4IIJ.js";
42
44
  import {
43
45
  REASONING_LEVELS,
44
46
  assertReasoningSupported,
45
47
  parseReasoningLevel,
46
48
  supportedReasoningLevels
47
- } from "./chunk-KPTML72Q.js";
49
+ } from "./chunk-QQJ2VVIW.js";
48
50
  import {
49
51
  addGlobalServer,
50
52
  globalMcpPath,
@@ -1643,6 +1645,7 @@ function App({ runtime, initialPrompt, version, updateMessage }) {
1643
1645
  const [queued, setQueued] = useState8([]);
1644
1646
  const [showThinking, setShowThinking] = useState8(runtime.config.thinkingVisible === true);
1645
1647
  const showThinkingRef = useRef(showThinking);
1648
+ const [, setConfigRev] = useState8(0);
1646
1649
  const [lastThinking, setLastThinking] = useState8("");
1647
1650
  const hasThinking = !!lastThinking.trim();
1648
1651
  const { stdin } = useStdin();
@@ -2132,11 +2135,17 @@ function App({ runtime, initialPrompt, version, updateMessage }) {
2132
2135
  if (key === "theme") writeGlobalConfig({ theme: val }, runtime.env);
2133
2136
  else if (key === "editor" && (val === "emacs" || val === "vim")) writeGlobalConfig({ editor: val }, runtime.env);
2134
2137
  else if (key === "repoMap") writeGlobalConfig({ repoMap: val === "true" || val === "on" }, runtime.env);
2135
- else if (key === "thinkingVisible") writeGlobalConfig({ thinkingVisible: val === "true" || val === "on" }, runtime.env);
2138
+ else if (key === "thinkingVisible") {
2139
+ const next = val === "true" || val === "on";
2140
+ writeGlobalConfig({ thinkingVisible: next }, runtime.env);
2141
+ showThinkingRef.current = next;
2142
+ setShowThinking(next);
2143
+ } else if (key === "thinkingClickCollapse") writeGlobalConfig({ thinkingClickCollapse: val === "true" || val === "on" }, runtime.env);
2136
2144
  else if (key === "sandbox" && (val === "on" || val === "off")) writeGlobalConfig({ sandbox: val }, runtime.env);
2137
2145
  else if (key === "networkPolicy" && (val === "allow" || val === "offline")) writeGlobalConfig({ networkPolicy: val }, runtime.env);
2138
2146
  else return false;
2139
2147
  runtime.reloadConfig();
2148
+ setConfigRev((n) => n + 1);
2140
2149
  notice(`${key} = ${val}`);
2141
2150
  return true;
2142
2151
  };
@@ -2150,6 +2159,7 @@ function App({ runtime, initialPrompt, version, updateMessage }) {
2150
2159
  { id: `editor:${c.editor === "vim" ? "emacs" : "vim"}`, label: `editor: ${c.editor}`, hint: "toggle emacs/vim" },
2151
2160
  { id: `repoMap:${!c.repoMap}`, label: `repoMap: ${c.repoMap}`, hint: "toggle true/false" },
2152
2161
  { id: `thinkingVisible:${!c.thinkingVisible}`, label: `thinkingVisible: ${!!c.thinkingVisible}`, hint: "toggle true/false" },
2162
+ { id: `thinkingClickCollapse:${!c.thinkingClickCollapse}`, label: `thinkingClickCollapse: ${!!c.thinkingClickCollapse}`, hint: "toggle true/false" },
2153
2163
  { id: `sandbox:${c.sandbox === "on" ? "off" : "on"}`, label: `sandbox: ${c.sandbox}`, hint: "toggle on/off" },
2154
2164
  { id: `networkPolicy:${c.networkPolicy === "offline" ? "allow" : "offline"}`, label: `networkPolicy: ${c.networkPolicy ?? "allow"}`, hint: "toggle allow/offline" }
2155
2165
  ],
@@ -2175,6 +2185,26 @@ function App({ runtime, initialPrompt, version, updateMessage }) {
2175
2185
  const submit = useCallback(
2176
2186
  (text) => {
2177
2187
  setHistory((h) => [...h, text]);
2188
+ if (text.startsWith("#") && text.slice(1).trim()) {
2189
+ void runSlash("memory", text.slice(1).trim());
2190
+ return;
2191
+ }
2192
+ if (text.startsWith("!") && text.slice(1).trim()) {
2193
+ const cmd = text.slice(1).trim();
2194
+ setTranscript((tr) => ({ ...tr, done: [...tr.done, entry({ kind: "user", text })] }));
2195
+ const shell = resolveShell({ platform: process.platform, env: runtime.env, exists: existsSync3 });
2196
+ void runCommand(cmd, { cwd: runtime.cwd, timeoutMs: 6e4, signal: new AbortController().signal, shell }).then((r) => {
2197
+ const out = r.output.trim() || "(no output)";
2198
+ notice(`$ ${cmd}
2199
+ ${out}`, r.exitCode ? "error" : "info");
2200
+ const ctxMsg = { role: "user", content: `Local shell command executed:
2201
+ $ ${cmd}
2202
+ ${out}` };
2203
+ runtime.agent.messages.push(ctxMsg);
2204
+ runtime.session.append(ctxMsg);
2205
+ });
2206
+ return;
2207
+ }
2178
2208
  const slash = parseSlash(text);
2179
2209
  if (!slash) {
2180
2210
  void runTurn(text);
@@ -2378,12 +2408,17 @@ ${t2.output}`);
2378
2408
  return /* @__PURE__ */ jsx16(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx16(Text16, { color: e.tone === "error" ? color("red") : e.tone === "warn" ? color("yellow") : void 0, dimColor: e.tone === "info", children: e.text }) }, e.id);
2379
2409
  }
2380
2410
  };
2411
+ const activeToolEntry = transcript.live.findLast((e) => e.kind === "tool" && !e.done);
2412
+ const activeSub = activeToolEntry?.sub?.findLast((s) => !s.done);
2413
+ const activeTarget = (activeSub ? `${toolLabel(activeSub.tool)} ${activeSub.target}` : activeToolEntry?.target ?? "").replace(/\s+/g, " ").trim();
2414
+ const activeSpinnerSummary = activeToolEntry ? `${toolLabel(activeToolEntry.tool)}${activeTarget ? ` ${activeTarget.length > 20 ? `${activeTarget.slice(0, 20)}\u2026` : activeTarget}` : ""}` : "";
2415
+ const activeToolSummary = activeToolEntry ? `${toolLabel(activeToolEntry.tool)}${activeTarget ? ` ${activeTarget.length > 68 ? `${activeTarget.slice(0, 68)}\u2026` : activeTarget}` : ""}` : "";
2381
2416
  return /* @__PURE__ */ jsxs12(Box13, { ref: liveRootRef, flexDirection: "column", children: [
2382
2417
  /* @__PURE__ */ jsx16(Static, { items: transcript.done, children: renderEntry }),
2383
2418
  transcript.live.map(renderEntry),
2384
2419
  busy && !pending && !planAsk || !busy && hasThinking ? /* @__PURE__ */ jsxs12(Box13, { ref: thinkingTargetRef, marginTop: 1, flexDirection: "column", children: [
2385
2420
  /* @__PURE__ */ jsxs12(Box13, { flexDirection: "row", children: [
2386
- busy ? /* @__PURE__ */ jsx16(Spinner, { label: cancelling ? t("Cancelling") : t("Thinking"), startedAt }) : /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("\u273B Thinking") }),
2421
+ busy ? /* @__PURE__ */ jsx16(Spinner, { label: cancelling ? t("Cancelling") : activeSpinnerSummary ? `${t("Thinking")} \xB7 ${activeSpinnerSummary}` : t("Thinking"), startedAt }) : /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("\u273B Thinking") }),
2387
2422
  /* @__PURE__ */ jsxs12(Text16, { dimColor: true, children: [
2388
2423
  " \xB7 ",
2389
2424
  runtime.config.keybinds.thinking.spec,
@@ -2392,7 +2427,8 @@ ${t2.output}`);
2392
2427
  ] }),
2393
2428
  showThinking ? /* @__PURE__ */ jsxs12(Box13, { flexDirection: "column", paddingLeft: 2, children: [
2394
2429
  /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("Model: {model} \xB7 reasoning: {level}", { model: runtime.modelRef, level: reasoning }) }),
2395
- 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.") })
2430
+ activeToolSummary ? /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: `\u25B6 ${activeToolSummary}` }) : null,
2431
+ lastThinking.trim() ? /* @__PURE__ */ jsx16(Text16, { dimColor: true, italic: true, children: lastThinking.trim() }) : !activeToolSummary ? /* @__PURE__ */ jsx16(Text16, { dimColor: true, children: t("No reasoning summary received yet; tool activity remains visible above.") }) : null
2396
2432
  ] }) : null
2397
2433
  ] }) : null,
2398
2434
  pending ? /* @__PURE__ */ jsx16(PermissionPrompt, { request: pending.request, onAnswer: answer }, pending.id) : null,
@@ -2447,7 +2483,7 @@ ${t2.output}`);
2447
2483
  import { jsx as jsx17 } from "react/jsx-runtime";
2448
2484
  async function startInteractive(rt, opts) {
2449
2485
  if (opts.resume) {
2450
- const { Session: Session2 } = await import("./session-YQXCCKXI.js");
2486
+ const { Session: Session2 } = await import("./session-ASXO6GXR.js");
2451
2487
  const list = Session2.list(rt.home, rt.cwd).slice(0, 20);
2452
2488
  if (!list.length) console.log(t("No sessions in this folder yet; starting a new one."));
2453
2489
  else {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-266SY3MC.js";
4
+ } from "./chunk-CGBSE55G.js";
5
5
  import {
6
6
  t
7
7
  } from "./chunk-3WHI4LN3.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botconnector/bccli",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "description": "BCCLI — BotConnector AI coding agent for the terminal",
5
5
  "type": "module",
6
6
  "bin": {