@botconnector/bccli 0.4.0-beta.19 → 0.4.0-beta.20

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.
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  helpText,
4
4
  parseCliArgs
5
- } from "./chunk-6AVRFRFU.js";
5
+ } from "./chunk-ON6JYPE7.js";
6
6
  import "./chunk-ELML4KVQ.js";
7
- import "./chunk-VEZFR7M7.js";
8
- import "./chunk-DDA5TJ7T.js";
7
+ import "./chunk-SN3ODJZN.js";
8
+ import "./chunk-EO7IVVX4.js";
9
9
  export {
10
10
  helpText,
11
11
  parseCliArgs
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ConfigError,
4
4
  t
5
- } from "./chunk-DDA5TJ7T.js";
5
+ } from "./chunk-EO7IVVX4.js";
6
6
 
7
7
  // src/mcp/config.ts
8
8
  import { createHash } from "crypto";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  ConfigError,
4
4
  t
5
- } from "./chunk-DDA5TJ7T.js";
5
+ } from "./chunk-EO7IVVX4.js";
6
6
 
7
7
  // src/mcp/catalog.ts
8
8
  var CATALOG = [
@@ -162,6 +162,9 @@ Opsi:
162
162
  "Cannot connect to {url}: {error}": "Tidak bisa terhubung ke {url}: {error}",
163
163
  "{status} from {url}: {message}": "{status} dari {url}: {message}",
164
164
  "Request failed": "Permintaan gagal",
165
+ "Connection closed before the response finished.": "Koneksi ditutup sebelum respons selesai.",
166
+ "WebSocket connection failed.": "Koneksi WebSocket gagal.",
167
+ "WebSocket connection closed: {reason}": "Koneksi WebSocket ditutup: {reason}",
165
168
  "Empty response from the provider": "Respons provider kosong",
166
169
  "{status} while fetching the model list": "{status} saat mengambil daftar model",
167
170
  "The API key was rejected or {provider} could not be reached.": "API key ditolak atau {provider} tidak bisa dihubungi.",
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  t
4
- } from "./chunk-DDA5TJ7T.js";
4
+ } from "./chunk-EO7IVVX4.js";
5
5
 
6
6
  // src/print.ts
7
7
  function toolLabel(tool) {
@@ -35,8 +35,8 @@ function readSecret(prompt) {
35
35
  });
36
36
  }
37
37
  async function runLogin(providerId, cwd) {
38
- const { runProviderCommand } = await import("./providerCli-WBBIQEJ2.js");
39
- const { parseCliArgs } = await import("./args-L555OESS.js");
38
+ const { runProviderCommand } = await import("./providerCli-GQCLV6X2.js");
39
+ const { parseCliArgs } = await import("./args-XQYEBOKB.js");
40
40
  return runProviderCommand(parseCliArgs(["provider", "add", providerId]), {
41
41
  env: process.env,
42
42
  cwd,
@@ -5,7 +5,7 @@ import {
5
5
  readCredentials,
6
6
  readJsonConfig,
7
7
  removeCredential
8
- } from "./chunk-DDA5TJ7T.js";
8
+ } from "./chunk-EO7IVVX4.js";
9
9
 
10
10
  // src/providers.ts
11
11
  import { mkdirSync, writeFileSync } from "fs";
@@ -5,12 +5,12 @@ import {
5
5
  import {
6
6
  REASONING_LEVELS,
7
7
  isReasoningLevel
8
- } from "./chunk-VEZFR7M7.js";
8
+ } from "./chunk-SN3ODJZN.js";
9
9
  import {
10
10
  ConfigError,
11
11
  parseLang,
12
12
  t
13
- } from "./chunk-DDA5TJ7T.js";
13
+ } from "./chunk-EO7IVVX4.js";
14
14
 
15
15
  // src/args.ts
16
16
  import { parseArgs } from "util";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  t
4
- } from "./chunk-DDA5TJ7T.js";
4
+ } from "./chunk-EO7IVVX4.js";
5
5
 
6
6
  // src/reasoning.ts
7
7
  var REASONING_LEVELS = ["auto", "off", "low", "medium", "high", "max"];
@@ -4,17 +4,21 @@ import {
4
4
  providerName,
5
5
  removeGlobalProvider,
6
6
  writeGlobalConfig
7
- } from "./chunk-D7CF42EW.js";
7
+ } from "./chunk-K5JNR3HL.js";
8
8
  import {
9
9
  reasoningPayload
10
- } from "./chunk-VEZFR7M7.js";
10
+ } from "./chunk-SN3ODJZN.js";
11
11
  import {
12
12
  PRESETS,
13
13
  loadConfig,
14
14
  readCredentials,
15
15
  saveCredential,
16
16
  t
17
- } from "./chunk-DDA5TJ7T.js";
17
+ } from "./chunk-EO7IVVX4.js";
18
+
19
+ // src/provider.ts
20
+ import OpenAI from "openai";
21
+ import { ResponsesWS } from "openai/resources/responses/ws";
18
22
 
19
23
  // src/thinking.ts
20
24
  var OPEN = "<think>";
@@ -66,11 +70,13 @@ function splitThinking(text) {
66
70
 
67
71
  // src/provider.ts
68
72
  var ProviderError = class extends Error {
69
- constructor(message, status) {
73
+ constructor(message, status, code) {
70
74
  super(message);
71
75
  this.status = status;
76
+ this.code = code;
72
77
  }
73
78
  status;
79
+ code;
74
80
  };
75
81
  var retryable = (status) => status === 429 || status >= 500;
76
82
  function detectRepetition(text) {
@@ -344,7 +350,166 @@ async function readResponsesJson(res) {
344
350
  finishReason: toolCalls.length ? "tool_calls" : body.status === "incomplete" ? String(body.incomplete_details?.reason || "incomplete") : "stop"
345
351
  };
346
352
  }
347
- function createProvider({ baseURL, apiKey, model, providerId, fetch: doFetch = fetch, retryDelayMs = 1e3 }) {
353
+ function cloneMessages(messages) {
354
+ return structuredClone(messages);
355
+ }
356
+ function sameMessage(a, b) {
357
+ return JSON.stringify(a) === JSON.stringify(b);
358
+ }
359
+ function completionAssistantMessage(completion) {
360
+ return {
361
+ role: "assistant",
362
+ content: completion.text || null,
363
+ ...completion.toolCalls.length ? {
364
+ tool_calls: completion.toolCalls.map((call) => ({
365
+ id: call.id,
366
+ type: "function",
367
+ function: { name: call.name, arguments: call.arguments }
368
+ }))
369
+ } : {}
370
+ };
371
+ }
372
+ function responseContinuationInput(messages, continuation) {
373
+ if (!continuation || messages.length <= continuation.requestMessages.length) {
374
+ return { input: responseInputFromMessages(messages), incremental: false };
375
+ }
376
+ for (let i = 0; i < continuation.requestMessages.length; i++) {
377
+ if (!sameMessage(messages[i], continuation.requestMessages[i])) {
378
+ return { input: responseInputFromMessages(messages), incremental: false };
379
+ }
380
+ }
381
+ const expectedAssistant = completionAssistantMessage(continuation.completion);
382
+ const assistant = messages[continuation.requestMessages.length];
383
+ if (!assistant || !sameMessage(assistant, expectedAssistant)) {
384
+ return { input: responseInputFromMessages(messages), incremental: false };
385
+ }
386
+ const delta = messages.slice(continuation.requestMessages.length + 1);
387
+ if (!delta.length) return { input: responseInputFromMessages(messages), incremental: false };
388
+ return {
389
+ input: responseInputFromMessages(delta),
390
+ previousResponseId: continuation.responseId,
391
+ incremental: true
392
+ };
393
+ }
394
+ async function readResponsesWebSocketTurn(events, ws, onText, signal) {
395
+ let responseId = "";
396
+ let text = "";
397
+ let usage;
398
+ let finishReason;
399
+ let loopAt = -1;
400
+ const calls = /* @__PURE__ */ new Map();
401
+ const emitText = (delta) => {
402
+ if (!delta) return;
403
+ text += delta;
404
+ onText?.(delta);
405
+ if (loopAt < 0) loopAt = detectRepetition(text);
406
+ };
407
+ const abort = () => {
408
+ try {
409
+ ws.close({ code: 1e3, reason: "BCCLI request cancelled" });
410
+ } catch {
411
+ }
412
+ };
413
+ signal?.addEventListener("abort", abort, { once: true });
414
+ try {
415
+ while (true) {
416
+ if (signal?.aborted) throw signal.reason ?? new Error("Request aborted");
417
+ const next = await events.next();
418
+ if (next.done) throw new ProviderError(t("Connection closed before the response finished."));
419
+ const envelope = next.value;
420
+ if (envelope.type === "error") {
421
+ throw new ProviderError(envelope.error.message || t("WebSocket connection failed."));
422
+ }
423
+ if (envelope.type === "close") {
424
+ throw new ProviderError(
425
+ t("WebSocket connection closed: {reason}", { reason: envelope.reason || String(envelope.code) })
426
+ );
427
+ }
428
+ if (envelope.type !== "message") continue;
429
+ const event = envelope.message;
430
+ if (event.type === "error") {
431
+ const code = "code" in (event.error ?? {}) ? String(event.error.code || "") : void 0;
432
+ throw new ProviderError(
433
+ t("Error from the provider: {message}", { message: event.error?.message ?? event.message ?? JSON.stringify(event) }),
434
+ event.status,
435
+ code
436
+ );
437
+ }
438
+ if (event.type === "response.created") {
439
+ responseId = String(event.response?.id || responseId);
440
+ continue;
441
+ }
442
+ if (event.type === "response.output_text.delta" || event.type === "response.refusal.delta") {
443
+ emitText(String(event.delta ?? ""));
444
+ if (loopAt >= 0) {
445
+ abort();
446
+ return {
447
+ responseId,
448
+ completion: { text: text.slice(0, loopAt), toolCalls: [], usage, finishReason: "repetition" }
449
+ };
450
+ }
451
+ continue;
452
+ }
453
+ if (event.type === "response.output_item.added" && event.item?.type === "function_call") {
454
+ const index = Number(event.output_index ?? calls.size);
455
+ calls.set(index, {
456
+ id: String(event.item.call_id || event.item.id || `call_${index}`),
457
+ name: String(event.item.name || ""),
458
+ arguments: String(event.item.arguments || "")
459
+ });
460
+ continue;
461
+ }
462
+ if (event.type === "response.function_call_arguments.delta") {
463
+ const index = Number(event.output_index ?? 0);
464
+ const call = calls.get(index);
465
+ if (call) call.arguments += String(event.delta || "");
466
+ continue;
467
+ }
468
+ if (event.type === "response.output_item.done" && event.item?.type === "function_call") {
469
+ const index = Number(event.output_index ?? 0);
470
+ const current = calls.get(index);
471
+ calls.set(index, {
472
+ id: String(event.item.call_id || current?.id || event.item.id || `call_${index}`),
473
+ name: String(event.item.name || current?.name || ""),
474
+ arguments: String(event.item.arguments ?? current?.arguments ?? "")
475
+ });
476
+ continue;
477
+ }
478
+ if (event.type === "response.failed") {
479
+ throw new ProviderError(
480
+ t("Error from the provider: {message}", { message: event.response?.error?.message ?? "Response failed" })
481
+ );
482
+ }
483
+ if (event.type === "response.completed" || event.type === "response.incomplete") {
484
+ responseId = String(event.response?.id || responseId);
485
+ usage = toResponsesUsage(event.response?.usage);
486
+ finishReason = event.type === "response.incomplete" ? String(event.response?.incomplete_details?.reason || "incomplete") : calls.size ? "tool_calls" : "stop";
487
+ return {
488
+ responseId,
489
+ completion: {
490
+ text,
491
+ toolCalls: [...calls.entries()].sort(([a], [b]) => a - b).map(([, call]) => call),
492
+ usage,
493
+ finishReason
494
+ }
495
+ };
496
+ }
497
+ }
498
+ } finally {
499
+ signal?.removeEventListener("abort", abort);
500
+ }
501
+ }
502
+ function createProvider(options) {
503
+ const {
504
+ baseURL,
505
+ apiKey,
506
+ model,
507
+ providerId,
508
+ fetch: fetchOverride,
509
+ retryDelayMs = 1e3,
510
+ responsesWebSocketFactory
511
+ } = options;
512
+ const doFetch = fetchOverride ?? fetch;
348
513
  const headers = { "content-type": "application/json" };
349
514
  if (apiKey) headers.authorization = `Bearer ${apiKey}`;
350
515
  const isBotConnectorCloud = /^https:\/\/api\.botconnector\.id\/v1\/?$/.test(baseURL) && apiKey?.startsWith("bc_live_");
@@ -353,6 +518,103 @@ function createProvider({ baseURL, apiKey, model, providerId, fetch: doFetch = f
353
518
  headers["x-botconnector-client-version"] = "0.4.0";
354
519
  }
355
520
  const useNativeResponses = isBotConnectorCloud && providerId === "bc-cloud" && model === "gpt-6-luna";
521
+ const useResponsesWebSocket = useNativeResponses && Boolean(apiKey) && (fetchOverride === void 0 || responsesWebSocketFactory !== void 0);
522
+ let lunaWs;
523
+ let lunaWsEvents;
524
+ let lunaContinuation;
525
+ let lunaWsIdleTimer;
526
+ const resetLunaWebSocket = () => {
527
+ if (lunaWsIdleTimer) clearTimeout(lunaWsIdleTimer);
528
+ lunaWsIdleTimer = void 0;
529
+ const current = lunaWs;
530
+ lunaWs = void 0;
531
+ lunaWsEvents = void 0;
532
+ lunaContinuation = void 0;
533
+ if (current) {
534
+ try {
535
+ current.close({ code: 1e3, reason: "BCCLI reset" });
536
+ } catch {
537
+ }
538
+ }
539
+ };
540
+ const ensureLunaWebSocket = () => {
541
+ if (lunaWsIdleTimer) clearTimeout(lunaWsIdleTimer);
542
+ lunaWsIdleTimer = void 0;
543
+ if (!lunaWs || !lunaWsEvents) {
544
+ const client = new OpenAI({
545
+ apiKey,
546
+ baseURL: baseURL.replace(/\/+$/, ""),
547
+ defaultHeaders: {
548
+ "x-botconnector-client": "bccli",
549
+ "x-botconnector-client-version": "0.4.0"
550
+ }
551
+ });
552
+ lunaWs = responsesWebSocketFactory ? responsesWebSocketFactory(client) : new ResponsesWS(client, { reconnect: null });
553
+ lunaWsEvents = lunaWs.stream({ maxBufferedEvents: 4096 });
554
+ }
555
+ return { ws: lunaWs, events: lunaWsEvents };
556
+ };
557
+ const scheduleLunaWebSocketIdleReset = () => {
558
+ if (lunaWsIdleTimer) clearTimeout(lunaWsIdleTimer);
559
+ lunaWsIdleTimer = setTimeout(() => resetLunaWebSocket(), 10 * 6e4);
560
+ lunaWsIdleTimer.unref?.();
561
+ };
562
+ async function chatLunaWebSocket(messages, tools, reasoning, signal, onText) {
563
+ const nativeTools = responseTools(tools);
564
+ const initialPlan = responseContinuationInput(messages, lunaContinuation);
565
+ for (let attempt = 0; attempt < 2; attempt++) {
566
+ if (signal?.aborted) throw signal.reason ?? new Error("Request aborted");
567
+ const plan = attempt === 0 ? initialPlan : { input: responseInputFromMessages(messages), incremental: false, previousResponseId: void 0 };
568
+ const { ws, events } = ensureLunaWebSocket();
569
+ const createEvent = {
570
+ type: "response.create",
571
+ stream_id: "main",
572
+ model,
573
+ store: false,
574
+ input: plan.input,
575
+ ...plan.previousResponseId ? { previous_response_id: plan.previousResponseId } : {},
576
+ ...nativeTools.length ? { tools: nativeTools } : {},
577
+ ...responseReasoning(reasoning)
578
+ };
579
+ let emittedText = false;
580
+ const trackText = (delta) => {
581
+ if (delta) emittedText = true;
582
+ onText?.(delta);
583
+ };
584
+ try {
585
+ ws.send(createEvent);
586
+ const result = await readResponsesWebSocketTurn(events, ws, trackText, signal);
587
+ if (result.completion.finishReason === "repetition") {
588
+ resetLunaWebSocket();
589
+ return result.completion;
590
+ }
591
+ if (!result.responseId) {
592
+ resetLunaWebSocket();
593
+ return result.completion;
594
+ }
595
+ lunaContinuation = {
596
+ responseId: result.responseId,
597
+ requestMessages: cloneMessages(messages),
598
+ completion: structuredClone(result.completion)
599
+ };
600
+ scheduleLunaWebSocketIdleReset();
601
+ return result.completion;
602
+ } catch (error) {
603
+ const err = error instanceof ProviderError ? error : new ProviderError(error.message);
604
+ const lostPrevious = err.code === "previous_response_not_found";
605
+ const connectionLost = /websocket|connection closed|socket|network/i.test(err.message) || err.code === "websocket_connection_limit_reached";
606
+ resetLunaWebSocket();
607
+ if (attempt === 0 && !emittedText && !signal?.aborted && (plan.incremental || lostPrevious || connectionLost)) {
608
+ continue;
609
+ }
610
+ if (!emittedText && !signal?.aborted && connectionLost) {
611
+ throw new ProviderError(err.message, err.status, "bc_ws_http_fallback");
612
+ }
613
+ throw err;
614
+ }
615
+ }
616
+ throw new ProviderError(t("Request failed"));
617
+ }
356
618
  async function post(path, body, signal) {
357
619
  let lastError;
358
620
  for (let attempt = 0; attempt < 4; attempt++) {
@@ -380,6 +642,14 @@ function createProvider({ baseURL, apiKey, model, providerId, fetch: doFetch = f
380
642
  } catch (error) {
381
643
  throw new ProviderError(error.message);
382
644
  }
645
+ if (useResponsesWebSocket) {
646
+ try {
647
+ return await chatLunaWebSocket(messages, tools, reasoning, signal, onText);
648
+ } catch (error) {
649
+ const err = error instanceof ProviderError ? error : new ProviderError(error.message);
650
+ if (err.code !== "bc_ws_http_fallback") throw err;
651
+ }
652
+ }
383
653
  if (useNativeResponses) {
384
654
  const nativeTools = responseTools(tools);
385
655
  const res2 = await post(
package/dist/cli.js CHANGED
@@ -8,11 +8,11 @@ import {
8
8
  loadSkills,
9
9
  parseFrontmatter,
10
10
  runPrint
11
- } from "./chunk-K5J2GGXT.js";
11
+ } from "./chunk-HP3J6JEY.js";
12
12
  import {
13
13
  helpText,
14
14
  parseCliArgs
15
- } from "./chunk-6AVRFRFU.js";
15
+ } from "./chunk-ON6JYPE7.js";
16
16
  import {
17
17
  Permissions
18
18
  } from "./chunk-ELML4KVQ.js";
@@ -20,15 +20,15 @@ import {
20
20
  addProviderKey,
21
21
  createProvider,
22
22
  listAllModels
23
- } from "./chunk-DXRLNNM7.js";
23
+ } from "./chunk-ZHB44IEA.js";
24
24
  import {
25
25
  providerName,
26
26
  readGlobalConfigFile
27
- } from "./chunk-D7CF42EW.js";
28
- import "./chunk-VEZFR7M7.js";
27
+ } from "./chunk-K5JNR3HL.js";
28
+ import "./chunk-SN3ODJZN.js";
29
29
  import {
30
30
  runLogin
31
- } from "./chunk-BPWCF4EJ.js";
31
+ } from "./chunk-IEUNV3XI.js";
32
32
  import {
33
33
  Session,
34
34
  pruneSessions
@@ -41,7 +41,7 @@ import {
41
41
  resolveModel,
42
42
  setLanguage,
43
43
  t
44
- } from "./chunk-DDA5TJ7T.js";
44
+ } from "./chunk-EO7IVVX4.js";
45
45
 
46
46
  // src/textToolCalls.ts
47
47
  var PAIR = /(?:<arg_key>\s*|`)?([A-Za-z_]\w*)(?:\s*<\/arg_key>)?`?\s*(?:=\s*`|<arg_value>)([\s\S]*?)<\/arg_value>/g;
@@ -1604,7 +1604,7 @@ function createRuntime(opts) {
1604
1604
  }
1605
1605
 
1606
1606
  // src/version.ts
1607
- var VERSION = true ? "0.4.0-beta.19" : "0.0.0-dev";
1607
+ var VERSION = true ? "0.4.0-beta.20" : "0.0.0-dev";
1608
1608
 
1609
1609
  // src/cli.ts
1610
1610
  function chooseLanguage(argv) {
@@ -1629,17 +1629,17 @@ async function main() {
1629
1629
  const cwd = process.cwd();
1630
1630
  if (args.command === "login") return runLogin(args.loginProvider ?? "bc-cloud", cwd);
1631
1631
  if (args.command === "mcp") {
1632
- const { runMcpCommand } = await import("./mcpCli-QJE7P76I.js");
1633
- const { readSecret } = await import("./login-W4A3EQ53.js");
1632
+ const { runMcpCommand } = await import("./mcpCli-J43FHF2H.js");
1633
+ const { readSecret } = await import("./login-QPH44MM5.js");
1634
1634
  return runMcpCommand(args, { env: process.env, cwd, out: (s) => console.log(s), err: (s) => console.error(s), readSecret });
1635
1635
  }
1636
1636
  if (args.command === "provider") {
1637
- const { runProviderCommand } = await import("./providerCli-WBBIQEJ2.js");
1638
- const { readSecret } = await import("./login-W4A3EQ53.js");
1637
+ const { runProviderCommand } = await import("./providerCli-GQCLV6X2.js");
1638
+ const { readSecret } = await import("./login-QPH44MM5.js");
1639
1639
  return runProviderCommand(args, { env: process.env, cwd, out: (s) => console.log(s), err: (s) => console.error(s), readSecret });
1640
1640
  }
1641
1641
  if (args.command === "connect" || args.command === "disconnect" || args.command === "integrations") {
1642
- const { runIntegrationCommand } = await import("./integrationCli-RQO3HHQE.js");
1642
+ const { runIntegrationCommand } = await import("./integrationCli-ZTZSZLO7.js");
1643
1643
  return runIntegrationCommand(args, {
1644
1644
  env: process.env,
1645
1645
  cwd,
@@ -1662,7 +1662,7 @@ async function main() {
1662
1662
  }
1663
1663
  if (args.print) {
1664
1664
  if (!args.prompt) throw new ConfigError(t('-p mode needs a task, e.g. bccli -p "explain this repo"'));
1665
- const { serversToStart } = await import("./config-CGYYFECG.js");
1665
+ const { serversToStart } = await import("./config-PBEZ3IGD.js");
1666
1666
  const plan = serversToStart(rt.home, cwd);
1667
1667
  for (const s of plan.needTrust) {
1668
1668
  console.error(t('Project MCP server "{name}" skipped (not approved yet; run interactive bccli once to approve it).', { name: s.name }));
@@ -1675,7 +1675,7 @@ async function main() {
1675
1675
  }
1676
1676
  }
1677
1677
  if (!process.stdin.isTTY) throw new ConfigError(t('Interactive mode needs a terminal. For scripts/CI use: bccli -p "task"'));
1678
- const { startInteractive } = await import("./ui-RNP272MP.js");
1678
+ const { startInteractive } = await import("./ui-SRXPL7KU.js");
1679
1679
  return startInteractive(rt, { initialPrompt: args.prompt, resume: args.resume, version: VERSION });
1680
1680
  }
1681
1681
  main().then(
@@ -8,8 +8,8 @@ import {
8
8
  removeGlobalServer,
9
9
  serversToStart,
10
10
  setProjectTrust
11
- } from "./chunk-ERVDVPKJ.js";
12
- import "./chunk-DDA5TJ7T.js";
11
+ } from "./chunk-44MXWCFN.js";
12
+ import "./chunk-EO7IVVX4.js";
13
13
  export {
14
14
  addGlobalServer,
15
15
  globalMcpPath,
@@ -6,7 +6,7 @@ import {
6
6
  readCredentials,
7
7
  resolveModel,
8
8
  t
9
- } from "./chunk-DDA5TJ7T.js";
9
+ } from "./chunk-EO7IVVX4.js";
10
10
 
11
11
  // src/integrationCli.ts
12
12
  import { chmodSync, copyFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "fs";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readSecret,
4
4
  runLogin
5
- } from "./chunk-BPWCF4EJ.js";
5
+ } from "./chunk-IEUNV3XI.js";
6
6
  export {
7
7
  readSecret,
8
8
  runLogin
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  CATALOG,
4
4
  fillTemplate
5
- } from "./chunk-RQGMYLVH.js";
5
+ } from "./chunk-BEXQSEBI.js";
6
6
  import {
7
7
  addGlobalServer,
8
8
  globalMcpPath,
9
9
  readMcpFile,
10
10
  removeGlobalServer
11
- } from "./chunk-ERVDVPKJ.js";
11
+ } from "./chunk-44MXWCFN.js";
12
12
  import {
13
13
  bccliHome,
14
14
  t
15
- } from "./chunk-DDA5TJ7T.js";
15
+ } from "./chunk-EO7IVVX4.js";
16
16
 
17
17
  // src/mcpCli.ts
18
18
  async function runMcpCommand(args, deps) {
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ addProviderKey,
4
+ runProviderCommand
5
+ } from "./chunk-ZHB44IEA.js";
6
+ import "./chunk-K5JNR3HL.js";
7
+ import "./chunk-SN3ODJZN.js";
8
+ import "./chunk-EO7IVVX4.js";
9
+ export {
10
+ addProviderKey,
11
+ runProviderCommand
12
+ };
@@ -5,7 +5,7 @@ import {
5
5
  instructionPaths,
6
6
  parseFrontmatter,
7
7
  toolLabel
8
- } from "./chunk-K5J2GGXT.js";
8
+ } from "./chunk-HP3J6JEY.js";
9
9
  import {
10
10
  nextMode
11
11
  } from "./chunk-ELML4KVQ.js";
@@ -13,26 +13,26 @@ import {
13
13
  hasKey,
14
14
  providerName,
15
15
  writeGlobalConfig
16
- } from "./chunk-D7CF42EW.js";
16
+ } from "./chunk-K5JNR3HL.js";
17
17
  import {
18
18
  REASONING_LEVELS,
19
19
  assertReasoningSupported,
20
20
  parseReasoningLevel,
21
21
  supportedReasoningLevels
22
- } from "./chunk-VEZFR7M7.js";
22
+ } from "./chunk-SN3ODJZN.js";
23
23
  import {
24
24
  Session
25
25
  } from "./chunk-SJH3YLW4.js";
26
26
  import {
27
27
  CATALOG,
28
28
  fillTemplate
29
- } from "./chunk-RQGMYLVH.js";
29
+ } from "./chunk-BEXQSEBI.js";
30
30
  import {
31
31
  addGlobalServer,
32
32
  globalMcpPath,
33
33
  readMcpFile,
34
34
  removeGlobalServer
35
- } from "./chunk-ERVDVPKJ.js";
35
+ } from "./chunk-44MXWCFN.js";
36
36
  import {
37
37
  PRESETS,
38
38
  getLanguage,
@@ -41,7 +41,7 @@ import {
41
41
  removeCredential,
42
42
  setLanguage,
43
43
  t
44
- } from "./chunk-DDA5TJ7T.js";
44
+ } from "./chunk-EO7IVVX4.js";
45
45
 
46
46
  // src/ui/index.tsx
47
47
  import { render } from "ink";
@@ -1797,7 +1797,7 @@ async function startInteractive(rt, opts) {
1797
1797
  if (chosen) rt.resume(chosen.session);
1798
1798
  }
1799
1799
  }
1800
- const { serversToStart, setProjectTrust } = await import("./config-CGYYFECG.js");
1800
+ const { serversToStart, setProjectTrust } = await import("./config-PBEZ3IGD.js");
1801
1801
  const plan = serversToStart(rt.home, rt.cwd);
1802
1802
  if (plan.needTrust.length) {
1803
1803
  const { createInterface } = await import("readline/promises");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botconnector/bccli",
3
- "version": "0.4.0-beta.19",
3
+ "version": "0.4.0-beta.20",
4
4
  "description": "BCCLI — BotConnector AI coding agent for the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -28,7 +28,9 @@
28
28
  "diff": "^9.0.0",
29
29
  "fast-glob": "^3.3.3",
30
30
  "ink": "^7.1.1",
31
+ "openai": "^7.27.0",
31
32
  "react": "^19.3.0",
33
+ "ws": "^8.22.0",
32
34
  "yaml": "^2.9.1",
33
35
  "zod": "^4.6.5"
34
36
  },
@@ -36,6 +38,7 @@
36
38
  "@biomejs/biome": "^2.5.14",
37
39
  "@types/node": "^26.6.3",
38
40
  "@types/react": "^19.3.0",
41
+ "@types/ws": "^8.18.2",
39
42
  "ink-testing-library": "^4.0.0",
40
43
  "tsup": "^8.5.1",
41
44
  "typescript": "^7.0.2",
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- addProviderKey,
4
- runProviderCommand
5
- } from "./chunk-DXRLNNM7.js";
6
- import "./chunk-D7CF42EW.js";
7
- import "./chunk-VEZFR7M7.js";
8
- import "./chunk-DDA5TJ7T.js";
9
- export {
10
- addProviderKey,
11
- runProviderCommand
12
- };