@botconnector/bccli 0.4.3 → 0.4.5

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 (46) hide show
  1. package/dist/{acp-NU4HZHQO.js → acp-M22V2CHD.js} +2 -2
  2. package/dist/{args-NRTZWWEV.js → args-TFKRCKTY.js} +4 -4
  3. package/dist/{chunk-HQW4BROS.js → chunk-27REMLDV.js} +1 -1
  4. package/dist/{chunk-6UO5GX55.js → chunk-3JQZ2IKV.js} +3 -3
  5. package/dist/{chunk-3I5BW3ZT.js → chunk-6EGQI6HJ.js} +1 -1
  6. package/dist/{chunk-RX4UQX43.js → chunk-AK6TWKET.js} +1 -1
  7. package/dist/{chunk-XTOATEI6.js → chunk-BR63GX6T.js} +10 -8
  8. package/dist/{chunk-Z5NI5FIK.js → chunk-D2C6EOOS.js} +7 -7
  9. package/dist/{chunk-WDX62DFH.js → chunk-D7GAZKXT.js} +3 -3
  10. package/dist/{chunk-FUJGHCWN.js → chunk-DZPBWYTD.js} +1 -1
  11. package/dist/{chunk-3WHI4LN3.js → chunk-EOOWV6C6.js} +2 -0
  12. package/dist/{chunk-QNUJHKEL.js → chunk-FW6W5MN7.js} +11 -11
  13. package/dist/{chunk-7I2ZGPUS.js → chunk-JVQZWTPV.js} +4 -4
  14. package/dist/{chunk-GWVLPN4B.js → chunk-LHLNK7HP.js} +4 -4
  15. package/dist/{chunk-4W5SKQDC.js → chunk-NSARPM5C.js} +44 -21
  16. package/dist/{chunk-JXM6REER.js → chunk-O5ATYRUP.js} +1 -1
  17. package/dist/{chunk-6M55UPES.js → chunk-WTCWBY2D.js} +2 -2
  18. package/dist/{chunk-NQOGVP3I.js → chunk-XQVEAF3F.js} +2 -2
  19. package/dist/{chunk-KPTML72Q.js → chunk-XSUFHD67.js} +9 -1
  20. package/dist/{chunk-6AUROP2E.js → chunk-YNI4GHBI.js} +1 -1
  21. package/dist/cli.js +38 -38
  22. package/dist/{completion-D2BSBTQO.js → completion-JCBMQKNQ.js} +1 -1
  23. package/dist/{config-LAINORU5.js → config-2MR6V7U7.js} +2 -2
  24. package/dist/{config-ENDRMOTP.js → config-JCI7NAVY.js} +3 -3
  25. package/dist/{ghBotCli-GCIUUMKQ.js → ghBotCli-T7AWXAZ2.js} +14 -14
  26. package/dist/{integrationCli-HXCSEWH2.js → integrationCli-KOCF73GG.js} +2 -2
  27. package/dist/{login-YXSSB2HQ.js → login-OIYX4D3X.js} +4 -4
  28. package/dist/{mcpCli-SETTCL3K.js → mcpCli-IBC3WCHG.js} +6 -6
  29. package/dist/{modelsCli-656AKYZD.js → modelsCli-XZLHNWKL.js} +6 -6
  30. package/dist/{oauthLogin-XWY7OHCG.js → oauthLogin-TUXZLIQN.js} +1 -1
  31. package/dist/{pluginsCli-ZQNKWZHJ.js → pluginsCli-X7NZRU7X.js} +2 -2
  32. package/dist/{prCli-6PUWTMTP.js → prCli-GPDLWYWC.js} +1 -1
  33. package/dist/providerCli-WCFA36S4.js +15 -0
  34. package/dist/sdk.js +61 -26
  35. package/dist/{serve-K5AH4MGO.js → serve-A764QS5U.js} +3 -3
  36. package/dist/{serve-XPAGXIGS.js → serve-TJCT3TLE.js} +15 -15
  37. package/dist/session-ML2DPI7P.js +12 -0
  38. package/dist/setup-QYCA7ATT.js +24 -0
  39. package/dist/{statsCli-XR6BEZQQ.js → statsCli-FKGON32O.js} +1 -1
  40. package/dist/{transferCli-C6XS6QYH.js → transferCli-HA5IKJKF.js} +4 -4
  41. package/dist/{ui-43C6Y57K.js → ui-SMY7QSFF.js} +71 -34
  42. package/dist/{update-AVZO4XID.js → update-BUFIPEKY.js} +2 -2
  43. package/package.json +1 -1
  44. package/dist/providerCli-V2576JXE.js +0 -15
  45. package/dist/session-V2VCAF7E.js +0 -12
  46. package/dist/setup-HVVHOIL4.js +0 -24
@@ -180,8 +180,8 @@ function runtimeAgent(cwd, allowAll = false) {
180
180
  return {
181
181
  async run(text, onChunk, signal, io) {
182
182
  if (!rt) {
183
- const { parseCliArgs } = await import("./args-NRTZWWEV.js");
184
- const { createRuntime } = await import("./setup-HVVHOIL4.js");
183
+ const { parseCliArgs } = await import("./args-TFKRCKTY.js");
184
+ const { createRuntime } = await import("./setup-QYCA7ATT.js");
185
185
  rt = createRuntime({ cwd, args: { ...parseCliArgs([]), allowAll } });
186
186
  }
187
187
  if (io && !allowAll) rt.agent.askPermission = (req) => io.askPermission(req);
@@ -2,11 +2,11 @@
2
2
  import {
3
3
  helpText,
4
4
  parseCliArgs
5
- } from "./chunk-6UO5GX55.js";
5
+ } from "./chunk-3JQZ2IKV.js";
6
6
  import "./chunk-WFZKJY3R.js";
7
- import "./chunk-KPTML72Q.js";
8
- import "./chunk-RX4UQX43.js";
9
- import "./chunk-3WHI4LN3.js";
7
+ import "./chunk-XSUFHD67.js";
8
+ import "./chunk-AK6TWKET.js";
9
+ import "./chunk-EOOWV6C6.js";
10
10
  export {
11
11
  helpText,
12
12
  parseCliArgs
@@ -6,7 +6,7 @@ import {
6
6
  readJsonConfig,
7
7
  removeCredential,
8
8
  writeFileAtomic
9
- } from "./chunk-RX4UQX43.js";
9
+ } from "./chunk-AK6TWKET.js";
10
10
 
11
11
  // src/providers.ts
12
12
  import { join } from "path";
@@ -5,14 +5,14 @@ import {
5
5
  import {
6
6
  REASONING_LEVELS,
7
7
  isReasoningLevel
8
- } from "./chunk-KPTML72Q.js";
8
+ } from "./chunk-XSUFHD67.js";
9
9
  import {
10
10
  ConfigError
11
- } from "./chunk-RX4UQX43.js";
11
+ } from "./chunk-AK6TWKET.js";
12
12
  import {
13
13
  parseLang,
14
14
  t
15
- } from "./chunk-3WHI4LN3.js";
15
+ } from "./chunk-EOOWV6C6.js";
16
16
 
17
17
  // src/args.ts
18
18
  import { parseArgs } from "util";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  quarantineCorruptFile,
4
4
  writeFileAtomic
5
- } from "./chunk-RX4UQX43.js";
5
+ } from "./chunk-AK6TWKET.js";
6
6
 
7
7
  // src/mcp/oauth.ts
8
8
  import { spawn } from "child_process";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  t
4
- } from "./chunk-3WHI4LN3.js";
4
+ } from "./chunk-EOOWV6C6.js";
5
5
 
6
6
  // src/config.ts
7
7
  import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "fs";
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  reasoningPayload
4
- } from "./chunk-KPTML72Q.js";
4
+ } from "./chunk-XSUFHD67.js";
5
5
  import {
6
6
  t
7
- } from "./chunk-3WHI4LN3.js";
7
+ } from "./chunk-EOOWV6C6.js";
8
8
 
9
9
  // src/provider.ts
10
10
  import OpenAI from "openai";
@@ -159,7 +159,7 @@ async function readStream(res, onText, onThinking) {
159
159
  if (!choice) return;
160
160
  if (choice.finish_reason) finishReason = choice.finish_reason;
161
161
  const delta = choice.delta ?? {};
162
- const reasoning = delta.reasoning_content || delta.reasoning;
162
+ const reasoning = delta.reasoning_content || delta.reasoning || delta.thinking;
163
163
  if (reasoning) emit({ text: "", thinking: reasoning });
164
164
  if (delta.content) emit(splitter.push(delta.content));
165
165
  for (const tc of delta.tool_calls ?? []) {
@@ -190,7 +190,7 @@ async function readStream(res, onText, onThinking) {
190
190
  const toolCalls = calls.map((call, index) => ({ ...call, id: call.id || `call_${index}` }));
191
191
  return { text, toolCalls, thinking: thinking || void 0, usage, finishReason };
192
192
  }
193
- async function readJson(res) {
193
+ async function readJson(res, onText, onThinking) {
194
194
  const body = await res.json();
195
195
  const choice = body.choices?.[0];
196
196
  const toolCalls = (choice?.message?.tool_calls ?? []).map((tc, i) => ({
@@ -199,7 +199,9 @@ async function readJson(res) {
199
199
  arguments: tc.function?.arguments ?? ""
200
200
  }));
201
201
  const split = splitThinking(choice?.message?.content ?? "");
202
- const thinking = (choice?.message?.reasoning_content || choice?.message?.reasoning || "") + split.thinking;
202
+ const thinking = (choice?.message?.reasoning_content || choice?.message?.reasoning || choice?.message?.thinking || "") + split.thinking;
203
+ if (thinking) onThinking?.(thinking);
204
+ if (split.text) onText?.(split.text);
203
205
  return { text: split.text, toolCalls, thinking: thinking || void 0, usage: toUsage(body.usage), finishReason: choice?.finish_reason };
204
206
  }
205
207
  function contentText(content) {
@@ -758,7 +760,7 @@ function createProvider(options) {
758
760
  const isBotConnectorCloud = /^https:\/\/api\.botconnector\.id\/v1\/?$/.test(baseURL) && apiKey?.startsWith("bc_live_");
759
761
  if (isBotConnectorCloud) {
760
762
  headers["x-botconnector-client"] = "bccli";
761
- headers["x-botconnector-client-version"] = "0.4.3";
763
+ headers["x-botconnector-client-version"] = "0.4.5";
762
764
  }
763
765
  const useNativeResponses = isBotConnectorCloud && providerId === "bc-cloud" && model === "gpt-6-luna";
764
766
  const useResponsesWebSocket = useNativeResponses && Boolean(apiKey) && (fetchOverride === void 0 || responsesWebSocketFactory !== void 0);
@@ -789,7 +791,7 @@ function createProvider(options) {
789
791
  baseURL: baseURL.replace(/\/+$/, ""),
790
792
  defaultHeaders: {
791
793
  "x-botconnector-client": "bccli",
792
- "x-botconnector-client-version": "0.4.3"
794
+ "x-botconnector-client-version": "0.4.5"
793
795
  }
794
796
  });
795
797
  lunaWs = responsesWebSocketFactory ? responsesWebSocketFactory(client) : new ResponsesWS(client, { reconnect: null });
@@ -942,7 +944,7 @@ function createProvider(options) {
942
944
  { model, messages, stream: true, stream_options: { include_usage: true }, ...tools?.length ? { tools } : {}, ...reasoningOverride },
943
945
  signal
944
946
  );
945
- if ((res.headers.get("content-type") ?? "").includes("application/json")) return readJson(res);
947
+ if ((res.headers.get("content-type") ?? "").includes("application/json")) return readJson(res, onText, onThinking);
946
948
  if (!res.body) throw new ProviderError(t("Empty response from the provider"));
947
949
  return readStream(res, onText, onThinking);
948
950
  },
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  defaultOpen
4
- } from "./chunk-3I5BW3ZT.js";
4
+ } from "./chunk-6EGQI6HJ.js";
5
5
  import {
6
6
  removeCredential,
7
7
  saveCredential
8
- } from "./chunk-RX4UQX43.js";
8
+ } from "./chunk-AK6TWKET.js";
9
9
  import {
10
10
  t
11
- } from "./chunk-3WHI4LN3.js";
11
+ } from "./chunk-EOOWV6C6.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-V2576JXE.js");
95
- const { parseCliArgs: parse } = await import("./args-NRTZWWEV.js");
94
+ const { runProviderCommand } = await import("./providerCli-WCFA36S4.js");
95
+ const { parseCliArgs: parse } = await import("./args-TFKRCKTY.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-XWY7OHCG.js");
120
+ const { runOauthLogout } = await import("./oauthLogin-TUXZLIQN.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-XWY7OHCG.js");
125
+ const { runOauthLogin } = await import("./oauthLogin-TUXZLIQN.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-4W5SKQDC.js";
5
+ } from "./chunk-NSARPM5C.js";
6
6
  import {
7
7
  ConfigError
8
- } from "./chunk-RX4UQX43.js";
8
+ } from "./chunk-AK6TWKET.js";
9
9
  import {
10
10
  t
11
- } from "./chunk-3WHI4LN3.js";
11
+ } from "./chunk-EOOWV6C6.js";
12
12
 
13
13
  // src/verify.ts
14
14
  var MAX_VERIFY_ROUNDS = 2;
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/version.ts
4
- var VERSION = true ? "0.4.3" : "0.0.0-dev";
4
+ var VERSION = true ? "0.4.5" : "0.0.0-dev";
5
5
 
6
6
  export {
7
7
  VERSION
@@ -27,6 +27,7 @@ var ID = {
27
27
  "shift+tab switch mode": "shift+tab ganti mode",
28
28
  "{n} tokens": "{n} token",
29
29
  "\u273B Thinking": "\u273B Berpikir",
30
+ "\u273B Thinking \xB7 {n} lines": "\u273B Berpikir \xB7 {n} baris",
30
31
  "click to toggle": "klik untuk buka/tutup",
31
32
  "Model: {model} \xB7 reasoning: {level}": "Model: {model} \xB7 penalaran: {level}",
32
33
  "No reasoning summary received yet; tool activity remains visible above.": "Belum ada ringkasan penalaran dari model; aktivitas tool tetap terlihat di atas.",
@@ -36,6 +37,7 @@ var ID = {
36
37
  "\u2717 failed": "\u2717 gagal",
37
38
  "\u2713 done": "\u2713 selesai",
38
39
  "\u2026 {n} more lines ({bind})": "\u2026 {n} baris lagi ({bind})",
40
+ "\u2026 ({bind} to collapse)": "\u2026 ({bind} untuk menutup)",
39
41
  "No sessions in this folder yet; starting a new one.": "Belum ada sesi di folder ini; memulai sesi baru.",
40
42
  "Session number (enter = new): ": "Nomor sesi (enter = baru): ",
41
43
  'This repo wants to run the MCP server "{name}" ({what}). Allow? [y/N] ': 'Repo ini ingin menjalankan server MCP "{name}" ({what}). Izinkan? [y/N] ',
@@ -24,11 +24,11 @@ import {
24
24
  resolvePath,
25
25
  runHooks,
26
26
  validateGlobPattern
27
- } from "./chunk-4W5SKQDC.js";
27
+ } from "./chunk-NSARPM5C.js";
28
28
  import {
29
29
  createWebSearchTool,
30
30
  fetchTool
31
- } from "./chunk-JXM6REER.js";
31
+ } from "./chunk-O5ATYRUP.js";
32
32
  import {
33
33
  defineTool
34
34
  } from "./chunk-PSO7R5AD.js";
@@ -37,39 +37,39 @@ import {
37
37
  } from "./chunk-WFZKJY3R.js";
38
38
  import {
39
39
  addProviderKey
40
- } from "./chunk-GWVLPN4B.js";
40
+ } from "./chunk-LHLNK7HP.js";
41
41
  import {
42
42
  listAllModels
43
- } from "./chunk-7I2ZGPUS.js";
43
+ } from "./chunk-JVQZWTPV.js";
44
44
  import {
45
45
  providerName
46
- } from "./chunk-HQW4BROS.js";
46
+ } from "./chunk-27REMLDV.js";
47
47
  import {
48
48
  FileOAuthProvider,
49
49
  hasStoredTokens
50
- } from "./chunk-3I5BW3ZT.js";
50
+ } from "./chunk-6EGQI6HJ.js";
51
51
  import {
52
52
  Session
53
- } from "./chunk-6AUROP2E.js";
53
+ } from "./chunk-YNI4GHBI.js";
54
54
  import {
55
55
  completionAssistantMessage,
56
56
  createProvider,
57
57
  hasPendingProgrammaticReplay,
58
58
  imageUserMessage,
59
59
  withFallbackProvider
60
- } from "./chunk-XTOATEI6.js";
60
+ } from "./chunk-BR63GX6T.js";
61
61
  import {
62
62
  expandEnvVars
63
- } from "./chunk-6M55UPES.js";
63
+ } from "./chunk-WTCWBY2D.js";
64
64
  import {
65
65
  ConfigError,
66
66
  bccliHome,
67
67
  loadConfig,
68
68
  resolveModel
69
- } from "./chunk-RX4UQX43.js";
69
+ } from "./chunk-AK6TWKET.js";
70
70
  import {
71
71
  t
72
- } from "./chunk-3WHI4LN3.js";
72
+ } from "./chunk-EOOWV6C6.js";
73
73
 
74
74
  // src/textToolCalls.ts
75
75
  var PAIR = /(?:<arg_key>\s*|`)?([A-Za-z_]\w*)(?:\s*<\/arg_key>)?`?\s*(?:=\s*`|<arg_value>)([\s\S]*?)<\/arg_value>/g;
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  hasKey,
4
4
  providerName
5
- } from "./chunk-HQW4BROS.js";
5
+ } from "./chunk-27REMLDV.js";
6
6
  import {
7
7
  createProvider
8
- } from "./chunk-XTOATEI6.js";
8
+ } from "./chunk-BR63GX6T.js";
9
9
  import {
10
10
  PRESETS,
11
11
  readCredentials
12
- } from "./chunk-RX4UQX43.js";
12
+ } from "./chunk-AK6TWKET.js";
13
13
  import {
14
14
  t
15
- } from "./chunk-3WHI4LN3.js";
15
+ } from "./chunk-EOOWV6C6.js";
16
16
 
17
17
  // src/models.ts
18
18
  function order(ids) {
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  listAllModels
4
- } from "./chunk-7I2ZGPUS.js";
4
+ } from "./chunk-JVQZWTPV.js";
5
5
  import {
6
6
  hasKey,
7
7
  providerName,
8
8
  removeGlobalProvider,
9
9
  writeGlobalConfig
10
- } from "./chunk-HQW4BROS.js";
10
+ } from "./chunk-27REMLDV.js";
11
11
  import {
12
12
  PRESETS,
13
13
  loadConfig,
14
14
  saveCredential
15
- } from "./chunk-RX4UQX43.js";
15
+ } from "./chunk-AK6TWKET.js";
16
16
  import {
17
17
  t
18
- } from "./chunk-3WHI4LN3.js";
18
+ } from "./chunk-EOOWV6C6.js";
19
19
 
20
20
  // src/providerCli.ts
21
21
  async function addProviderKey(providerId, key, deps) {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-PSO7R5AD.js";
5
5
  import {
6
6
  t
7
- } from "./chunk-3WHI4LN3.js";
7
+ } from "./chunk-EOOWV6C6.js";
8
8
 
9
9
  // src/tools/bash.ts
10
10
  import { spawn } from "child_process";
@@ -200,10 +200,14 @@ function startBackground(command, cwd, env, shell) {
200
200
  task.status = "exited";
201
201
  task.head += `${task.head ? "\n" : ""}${error.message}`;
202
202
  });
203
- child.on("close", (code) => {
203
+ child.on("exit", (code) => {
204
204
  task.status = "exited";
205
205
  task.exitCode = code;
206
206
  });
207
+ child.on("close", (code) => {
208
+ task.status = "exited";
209
+ if (task.exitCode === null) task.exitCode = code;
210
+ });
207
211
  return task;
208
212
  }
209
213
  function backgroundStatus(task) {
@@ -307,8 +311,40 @@ function runCommand(command, opts) {
307
311
  };
308
312
  child.stdout.on("data", onData);
309
313
  child.stderr.on("data", onData);
314
+ let settled = false;
315
+ let exitDrainTimer;
316
+ let killDrainTimer;
317
+ const finish = (exitCode, extra = "") => {
318
+ if (settled) return;
319
+ settled = true;
320
+ active.delete(killAsAborted);
321
+ clearTimeout(timer);
322
+ if (exitDrainTimer) clearTimeout(exitDrainTimer);
323
+ if (killDrainTimer) clearTimeout(killDrainTimer);
324
+ opts.signal.removeEventListener("abort", onAbort);
325
+ child.stdout.removeListener("data", onData);
326
+ child.stderr.removeListener("data", onData);
327
+ child.stdout.destroy();
328
+ child.stderr.destroy();
329
+ let spillNote = "";
330
+ if (dropped && fullChunks.length) {
331
+ try {
332
+ const spillPath = join(tmpdir(), `bccli-bash-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.log`);
333
+ writeFileSync(spillPath, fullChunks.join(""), "utf8");
334
+ spillNote = `; full output saved to ${spillPath}`;
335
+ } catch {
336
+ }
337
+ }
338
+ const output = dropped ? `${head}
339
+ \u2026 [${dropped} characters truncated${spillNote}] \u2026
340
+ ${tail}` : head + tail;
341
+ resolve3({ output: output + extra, exitCode, timedOut, aborted });
342
+ };
310
343
  const kill = () => {
311
344
  if (child.pid !== void 0) killProcessTree(child.pid);
345
+ if (!killDrainTimer) {
346
+ killDrainTimer = setTimeout(() => finish(child.exitCode), 500);
347
+ }
312
348
  };
313
349
  const killAsAborted = () => {
314
350
  aborted = true;
@@ -325,29 +361,16 @@ function runCommand(command, opts) {
325
361
  };
326
362
  if (opts.signal.aborted) onAbort();
327
363
  opts.signal.addEventListener("abort", onAbort, { once: true });
328
- const finish = (exitCode, extra = "") => {
329
- active.delete(killAsAborted);
330
- clearTimeout(timer);
331
- opts.signal.removeEventListener("abort", onAbort);
332
- let spillNote = "";
333
- if (dropped && fullChunks.length) {
334
- try {
335
- const spillPath = join(tmpdir(), `bccli-bash-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.log`);
336
- writeFileSync(spillPath, fullChunks.join(""), "utf8");
337
- spillNote = `; full output saved to ${spillPath}`;
338
- } catch {
339
- }
364
+ child.on("exit", (code) => {
365
+ if (!exitDrainTimer) {
366
+ exitDrainTimer = setTimeout(() => finish(code), 200);
340
367
  }
341
- const output = dropped ? `${head}
342
- \u2026 [${dropped} characters truncated${spillNote}] \u2026
343
- ${tail}` : head + tail;
344
- resolve3({ output: output + extra, exitCode, timedOut, aborted });
345
- };
368
+ });
346
369
  child.on("error", (error) => finish(null, error.message));
347
- child.on("close", (code) => finish(code));
370
+ child.on("close", (code) => finish(code ?? child.exitCode));
348
371
  });
349
372
  }
350
- var BASH_DESCRIPTION = "Run a shell command in the project directory. No interactive input. Default timeout 2 minutes (max 10). Use for tests, builds, git, and other CLI tasks. Set background: true for long-running jobs, then poll with task_id (stop with kill: true) or use the /tasks command.";
373
+ var BASH_DESCRIPTION = "Run a shell command in the project directory. No interactive input. Default timeout 2 minutes (max 10). Use for tests, builds, git, and other CLI tasks. Set background: true for long-running jobs, then poll with task_id (stop with kill: true) or use the /tasks command. Do not pipe commands that start background daemons (such as agent-browser) through | head or | tail.";
351
374
  var BASH_SCHEMA = z.object({
352
375
  command: z.string().optional().describe("The shell command to run (required unless task_id is set)"),
353
376
  timeout_ms: z.number().int().min(1e3).max(6e5).optional().describe("Timeout in milliseconds"),
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-PSO7R5AD.js";
5
5
  import {
6
6
  t
7
- } from "./chunk-3WHI4LN3.js";
7
+ } from "./chunk-EOOWV6C6.js";
8
8
 
9
9
  // src/tools/websearch.ts
10
10
  import { z } from "zod";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  ConfigError,
4
4
  writeFileAtomic
5
- } from "./chunk-RX4UQX43.js";
5
+ } from "./chunk-AK6TWKET.js";
6
6
  import {
7
7
  t
8
- } from "./chunk-3WHI4LN3.js";
8
+ } from "./chunk-EOOWV6C6.js";
9
9
 
10
10
  // src/mcp/config.ts
11
11
  import { createHash } from "crypto";
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigError
4
- } from "./chunk-RX4UQX43.js";
4
+ } from "./chunk-AK6TWKET.js";
5
5
  import {
6
6
  t
7
- } from "./chunk-3WHI4LN3.js";
7
+ } from "./chunk-EOOWV6C6.js";
8
8
 
9
9
  // src/mcp/catalog.ts
10
10
  var CATALOG = [
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  t
4
- } from "./chunk-3WHI4LN3.js";
4
+ } from "./chunk-EOOWV6C6.js";
5
5
 
6
6
  // src/reasoning.ts
7
7
  var REASONING_LEVELS = ["auto", "off", "low", "medium", "high", "max"];
@@ -21,6 +21,14 @@ function reasoningCapability(providerId) {
21
21
  case "bc-cloud":
22
22
  return { levels: BOTCONNECTOR_LEVELS, parameter: "reasoning_effort" };
23
23
  case "openai":
24
+ case "gmi":
25
+ case "gmicloud":
26
+ case "vertex-maas":
27
+ case "deepseek":
28
+ case "groq":
29
+ case "together":
30
+ case "fireworks":
31
+ case "mistral":
24
32
  return { levels: OPENAI_LEVELS, parameter: "reasoning_effort" };
25
33
  case "openrouter":
26
34
  return { levels: ["auto", "low", "medium", "high"], parameter: "reasoning" };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  contentText
4
- } from "./chunk-XTOATEI6.js";
4
+ } from "./chunk-BR63GX6T.js";
5
5
 
6
6
  // src/session.ts
7
7
  import { randomBytes } from "crypto";