@botconnector/bccli 0.4.0 → 0.4.1

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 (162) hide show
  1. package/README.en.md +13 -2
  2. package/README.md +13 -2
  3. package/dist/abort.d.ts +5 -0
  4. package/dist/{acp-ATIL4JOZ.js → acp-3PHBAI64.js} +2 -2
  5. package/dist/acp.d.ts +27 -0
  6. package/dist/agent.d.ts +143 -0
  7. package/dist/agents.d.ts +4 -0
  8. package/dist/{args-J5ONVGIF.js → args-W6BNKY7K.js} +3 -3
  9. package/dist/args.d.ts +51 -0
  10. package/dist/budget.d.ts +23 -0
  11. package/dist/checkpoints.d.ts +34 -0
  12. package/dist/{chunk-L7QI6JN2.js → chunk-24JN75FZ.js} +6 -6
  13. package/dist/{chunk-XBO5GACQ.js → chunk-75BECX4F.js} +3 -3
  14. package/dist/{chunk-QDQU6VY2.js → chunk-BC7UXFE4.js} +10 -1
  15. package/dist/{chunk-M7CALSP3.js → chunk-BGXNR74O.js} +1 -1
  16. package/dist/{chunk-6M5X2KZE.js → chunk-BKGFA2PT.js} +1 -1
  17. package/dist/{chunk-BNA74HPN.js → chunk-BXQQCUAC.js} +4 -4
  18. package/dist/{chunk-LACUWBWS.js → chunk-FLQPE4S5.js} +21 -9
  19. package/dist/{chunk-JL5ZCSP2.js → chunk-GN4W3T6E.js} +3 -3
  20. package/dist/{chunk-SPRNLS7K.js → chunk-JHPGOAXU.js} +1 -1
  21. package/dist/{chunk-7F3IWBPQ.js → chunk-MFHCQQEN.js} +18 -8
  22. package/dist/{chunk-O7M3TGIW.js → chunk-MHIYLXJC.js} +35 -0
  23. package/dist/{chunk-TVALKHFB.js → chunk-PZRKU4UM.js} +10 -10
  24. package/dist/{chunk-TLPFQIS2.js → chunk-R5RE46CW.js} +2 -2
  25. package/dist/{chunk-BQ2IGPBR.js → chunk-WI22M2ID.js} +1 -1
  26. package/dist/{chunk-PUN4HMAG.js → chunk-WNACAUDK.js} +9 -3
  27. package/dist/{chunk-KEMYIGCP.js → chunk-XV7ZVL4J.js} +2 -2
  28. package/dist/cli.d.ts +1 -0
  29. package/dist/cli.js +34 -35
  30. package/dist/clipboardImage.d.ts +17 -0
  31. package/dist/commands.d.ts +16 -0
  32. package/dist/completion.d.ts +14 -0
  33. package/dist/{config-COPNMMV6.js → config-DIDLDONU.js} +2 -2
  34. package/dist/{config-RZ5JONMX.js → config-IU76CPK2.js} +7 -3
  35. package/dist/config.d.ts +97 -0
  36. package/dist/context.d.ts +13 -0
  37. package/dist/contextWindow.d.ts +3 -0
  38. package/dist/diff.d.ts +7 -0
  39. package/dist/exit.d.ts +9 -0
  40. package/dist/extensions.d.ts +34 -0
  41. package/dist/{ghBotCli-IBCZIWT5.js → ghBotCli-E3VPHNZY.js} +12 -12
  42. package/dist/ghBotCli.d.ts +9 -0
  43. package/dist/ghBotDispatch.d.ts +68 -0
  44. package/dist/ghBotRunner.d.ts +82 -0
  45. package/dist/ghBotServe.d.ts +21 -0
  46. package/dist/ghBotWebhook.d.ts +45 -0
  47. package/dist/hooks.d.ts +27 -0
  48. package/dist/i18n/id.d.ts +1 -0
  49. package/dist/i18n.d.ts +16 -0
  50. package/dist/{integrationCli-P75R2VSC.js → integrationCli-Q2YPDTPG.js} +1 -1
  51. package/dist/integrationCli.d.ts +9 -0
  52. package/dist/keybinds.d.ts +22 -0
  53. package/dist/{login-SYIQP46J.js → login-FP3BB44A.js} +3 -3
  54. package/dist/login.d.ts +19 -0
  55. package/dist/lsp.d.ts +47 -0
  56. package/dist/mcp/catalog.d.ts +14 -0
  57. package/dist/mcp/config.d.ts +36 -0
  58. package/dist/mcp/manager.d.ts +34 -0
  59. package/dist/mcp/oauth.d.ts +82 -0
  60. package/dist/{mcpCli-QUV5SD64.js → mcpCli-SNBDUWJN.js} +5 -5
  61. package/dist/mcpCli.d.ts +3 -0
  62. package/dist/mcpServer/serve.d.ts +8 -0
  63. package/dist/mcpServer/server.d.ts +19 -0
  64. package/dist/models.d.ts +13 -0
  65. package/dist/{modelsCli-TRRB5LX4.js → modelsCli-CZ2HNGKR.js} +4 -4
  66. package/dist/modelsCli.d.ts +15 -0
  67. package/dist/npmRunner.d.ts +21 -0
  68. package/dist/oauthLogin.d.ts +47 -0
  69. package/dist/permissions.d.ts +30 -0
  70. package/dist/pluginSpec.d.ts +25 -0
  71. package/dist/plugins.d.ts +45 -0
  72. package/dist/{pluginsCli-GNW4TPVV.js → pluginsCli-LPIUUDWB.js} +1 -1
  73. package/dist/pluginsCli.d.ts +16 -0
  74. package/dist/prCli.d.ts +33 -0
  75. package/dist/presets.d.ts +8 -0
  76. package/dist/print.d.ts +14 -0
  77. package/dist/provider.d.ts +140 -0
  78. package/dist/{providerCli-FAOZHOKW.js → providerCli-NMUFXAAS.js} +5 -5
  79. package/dist/providerCli.d.ts +17 -0
  80. package/dist/providers.d.ts +6 -0
  81. package/dist/reasoning.d.ts +12 -0
  82. package/dist/repomap.d.ts +10 -0
  83. package/dist/sdk.d.ts +57 -0
  84. package/dist/sdk.js +99 -18
  85. package/dist/{serve-6QLBJUYW.js → serve-KWOECK5W.js} +1 -1
  86. package/dist/{serve-JG7RLIUD.js → serve-X2ZV4S5U.js} +20 -14
  87. package/dist/serve.d.ts +37 -0
  88. package/dist/serveHeartbeat.d.ts +14 -0
  89. package/dist/serveProtocol.d.ts +47 -0
  90. package/dist/{session-KBAQ4BZ5.js → session-GKEXDJKZ.js} +2 -2
  91. package/dist/session.d.ts +30 -0
  92. package/dist/setup-OV3NWQN5.js +24 -0
  93. package/dist/setup.d.ts +74 -0
  94. package/dist/slash/copy.d.ts +1 -0
  95. package/dist/slash/diff.d.ts +1 -0
  96. package/dist/slash/doctor.d.ts +18 -0
  97. package/dist/slash/export.d.ts +2 -0
  98. package/dist/slash/info.d.ts +45 -0
  99. package/dist/slash/memory.d.ts +10 -0
  100. package/dist/statsCli.d.ts +62 -0
  101. package/dist/textToolCalls.d.ts +6 -0
  102. package/dist/thinking.d.ts +17 -0
  103. package/dist/tokenBudget.d.ts +22 -0
  104. package/dist/tools/bash.d.ts +52 -0
  105. package/dist/tools/diagnostics.d.ts +5 -0
  106. package/dist/tools/edit.d.ts +7 -0
  107. package/dist/tools/fetch.d.ts +41 -0
  108. package/dist/tools/glob.d.ts +5 -0
  109. package/dist/tools/globSafety.d.ts +7 -0
  110. package/dist/tools/grep.d.ts +13 -0
  111. package/dist/tools/ignore.d.ts +2 -0
  112. package/dist/tools/index.d.ts +12 -0
  113. package/dist/tools/memory.d.ts +13 -0
  114. package/dist/tools/paths.d.ts +2 -0
  115. package/dist/tools/plan.d.ts +10 -0
  116. package/dist/tools/read.d.ts +16 -0
  117. package/dist/tools/repomap.d.ts +2 -0
  118. package/dist/tools/sandbox.d.ts +12 -0
  119. package/dist/tools/shell.d.ts +18 -0
  120. package/dist/tools/skill.d.ts +3 -0
  121. package/dist/tools/task.d.ts +28 -0
  122. package/dist/tools/todo.d.ts +13 -0
  123. package/dist/tools/types.d.ts +52 -0
  124. package/dist/tools/websearch.d.ts +9 -0
  125. package/dist/tools/write.d.ts +5 -0
  126. package/dist/{transferCli-TK2GSVRK.js → transferCli-YUFPI6AH.js} +3 -3
  127. package/dist/transferCli.d.ts +23 -0
  128. package/dist/ui/App.d.ts +7 -0
  129. package/dist/ui/DiffView.d.ts +3 -0
  130. package/dist/ui/EditableText.d.ts +7 -0
  131. package/dist/ui/LinePrompt.d.ts +6 -0
  132. package/dist/ui/ListPicker.d.ts +11 -0
  133. package/dist/ui/Markdown.d.ts +8 -0
  134. package/dist/ui/McpMenu.d.ts +11 -0
  135. package/dist/ui/ModelPicker.d.ts +6 -0
  136. package/dist/ui/PermissionPrompt.d.ts +5 -0
  137. package/dist/ui/PlanApproval.d.ts +5 -0
  138. package/dist/ui/PromptInput.d.ts +18 -0
  139. package/dist/ui/ProviderMenu.d.ts +10 -0
  140. package/dist/ui/Spinner.d.ts +4 -0
  141. package/dist/ui/StatusBar.d.ts +9 -0
  142. package/dist/ui/TodoList.d.ts +4 -0
  143. package/dist/ui/ToolBlock.d.ts +14 -0
  144. package/dist/ui/complete.d.ts +1 -0
  145. package/dist/ui/focusReport.d.ts +1 -0
  146. package/dist/ui/index.d.ts +7 -0
  147. package/dist/ui/lineEdit.d.ts +42 -0
  148. package/dist/ui/replay.d.ts +4 -0
  149. package/dist/ui/table.d.ts +20 -0
  150. package/dist/ui/theme.d.ts +5 -0
  151. package/dist/ui/thinkingMouse.d.ts +33 -0
  152. package/dist/ui/transcript.d.ts +55 -0
  153. package/dist/ui/vim.d.ts +26 -0
  154. package/dist/{ui-B3CJ6TGE.js → ui-IVIFNUCC.js} +13 -11
  155. package/dist/{update-K5IQ2MYR.js → update-TZ2G6KQ3.js} +1 -1
  156. package/dist/update.d.ts +30 -0
  157. package/dist/verify.d.ts +16 -0
  158. package/dist/version.d.ts +1 -0
  159. package/dist/webBudget.d.ts +25 -0
  160. package/dist/worktree.d.ts +12 -0
  161. package/package.json +26 -13
  162. package/dist/setup-FJAWDWV4.js +0 -24
@@ -0,0 +1,9 @@
1
+ import type { PermissionMode } from '../config';
2
+ import type { ReasoningLevel } from '../reasoning';
3
+ export declare function StatusBar({ mode, tokens, busy, model, reasoning }: {
4
+ mode: PermissionMode;
5
+ tokens: number;
6
+ busy: boolean;
7
+ model?: string;
8
+ reasoning?: ReasoningLevel;
9
+ }): import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { TodoItem } from '../tools/todo';
2
+ export declare function TodoList({ items }: {
3
+ items: TodoItem[];
4
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,14 @@
1
+ import type { SubLine } from './transcript';
2
+ export interface ToolBlockProps {
3
+ tool: string;
4
+ target: string;
5
+ output?: string;
6
+ display?: string;
7
+ isError?: boolean;
8
+ done: boolean;
9
+ expanded?: boolean;
10
+ sub?: SubLine[];
11
+ /** Display spec of the "show full output" keybind, so the hint follows a rebound key. */
12
+ moreBind?: string;
13
+ }
14
+ export declare function ToolBlock({ tool, target, output, display, isError, done, expanded, sub, moreBind }: ToolBlockProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function completeFile(value: string, cwd: string): string;
@@ -0,0 +1 @@
1
+ export declare const isFocusReport: (input: string) => boolean;
@@ -0,0 +1,7 @@
1
+ import type { Runtime } from '../setup';
2
+ export declare function startInteractive(rt: Runtime, opts: {
3
+ initialPrompt?: string;
4
+ resume: boolean;
5
+ version: string;
6
+ updateMessage?: string;
7
+ }): Promise<number>;
@@ -0,0 +1,42 @@
1
+ export interface LineState {
2
+ value: string;
3
+ cursor: number;
4
+ }
5
+ export interface EditKey {
6
+ leftArrow?: boolean;
7
+ rightArrow?: boolean;
8
+ home?: boolean;
9
+ end?: boolean;
10
+ backspace?: boolean;
11
+ delete?: boolean;
12
+ ctrl?: boolean;
13
+ meta?: boolean;
14
+ }
15
+ export declare function prevBoundary(text: string, pos: number): number;
16
+ export declare function nextBoundary(text: string, pos: number): number;
17
+ /** Start of the word before the cursor: skips spaces, then the word itself. */
18
+ export declare function wordLeft(text: string, pos: number): number;
19
+ /** End of the word after the cursor: skips spaces, then the word itself. */
20
+ export declare function wordRight(text: string, pos: number): number;
21
+ export declare const lineStart: (text: string, pos: number) => number;
22
+ export declare function lineEnd(text: string, pos: number): number;
23
+ export declare const lineCount: (text: string) => number;
24
+ /** Moves to the same column one line up or down; undefined when there is no such line. */
25
+ export declare function moveLine(text: string, pos: number, direction: -1 | 1): number | undefined;
26
+ export declare const atEnd: (s: LineState) => boolean;
27
+ export declare function insert(s: LineState, text: string): LineState;
28
+ /**
29
+ * The result of an editing key, or undefined when the key is not one of them (Enter, Esc, Tab and the arrows that
30
+ * walk through history belong to the caller). Printable text goes through `insert`.
31
+ */
32
+ export declare function applyEditKey(s: LineState, input: string, key: EditKey): LineState | undefined;
33
+ /** What to draw: the text before the cursor, the character under it (a space at the end or on a line break), the rest. */
34
+ export declare function splitAtCursor(s: LineState): {
35
+ before: string;
36
+ at: string;
37
+ after: string;
38
+ };
39
+ /** The characters of a text as the user sees them. */
40
+ export declare const graphemes: (text: string) => string[];
41
+ /** The same cursor over a hidden text (an API key): one dot per character. */
42
+ export declare function masked(s: LineState): LineState;
@@ -0,0 +1,4 @@
1
+ import { type ChatMessage } from '../provider';
2
+ import { type Entry } from './transcript';
3
+ /** The screen rows for a resumed conversation: a notice, then every user and assistant text message in order. */
4
+ export declare function replayEntries(history: ChatMessage[]): Entry[];
@@ -0,0 +1,20 @@
1
+ export type Style = 'plain' | 'bold' | 'italic' | 'strike' | 'link' | 'code' | 'dim';
2
+ export interface Seg {
3
+ text: string;
4
+ style: Style;
5
+ }
6
+ export type Align = 'left' | 'center' | 'right';
7
+ export interface TableData {
8
+ header: Seg[][];
9
+ align: Align[];
10
+ rows: Seg[][][];
11
+ }
12
+ export declare function charWidth(cp: number): number;
13
+ export declare function displayWidth(text: string): number;
14
+ export declare function parseInline(text: string): Seg[];
15
+ /** A table starting at lines[start] (header row, separator row, body rows), or undefined. `end` is the next line to read. */
16
+ export declare function parseTable(lines: string[], start: number): {
17
+ table: TableData;
18
+ end: number;
19
+ } | undefined;
20
+ export declare function layoutTable(table: TableData, width: number): Seg[][];
@@ -0,0 +1,5 @@
1
+ export declare const THEMES: readonly ['default', 'blue', 'amber', 'magenta', 'mono'];
2
+ export declare function setTheme(name: string): void;
3
+ export declare function currentTheme(): string;
4
+ export declare function color(name: string): string | undefined;
5
+ export declare const ACCENT = "green";
@@ -0,0 +1,33 @@
1
+ /** SGR terminal mouse position (1-based), used only for the live Thinking status. */
2
+ export interface MousePress {
3
+ x: number;
4
+ y: number;
5
+ }
6
+ export declare function parseMousePress(value: string): MousePress | undefined;
7
+ export declare function parseCursorPosition(value: string): {
8
+ row: number;
9
+ col: number;
10
+ } | undefined;
11
+ /** Ink returns local element positions, not viewport coordinates. The cursor rests after the live frame. */
12
+ export declare function clickedThinking(click: MousePress, cursorRow: number, rootHeight: number, target: {
13
+ x: number;
14
+ y: number;
15
+ width: number;
16
+ height: number;
17
+ }): boolean;
18
+ /** Ink useInput receives these control reports too; they must not enter the prompt. */
19
+ export declare function isMouseControlInput(input: string): boolean;
20
+ /** Tokenize split/coalesced Windows ConPTY SGR presses and cursor reports. */
21
+ export declare function parseThinkingReports(value: string): {
22
+ events: Array<{
23
+ type: 'mouse';
24
+ press: MousePress;
25
+ } | {
26
+ type: 'cursor';
27
+ cursor: {
28
+ row: number;
29
+ col: number;
30
+ };
31
+ }>;
32
+ rest: string;
33
+ };
@@ -0,0 +1,55 @@
1
+ import type { AgentEvent } from '../agent';
2
+ export interface SubLine {
3
+ id: string;
4
+ tool: string;
5
+ target: string;
6
+ done: boolean;
7
+ isError?: boolean;
8
+ }
9
+ export type Entry = {
10
+ id: number;
11
+ } & ({
12
+ kind: 'header';
13
+ } | {
14
+ kind: 'user';
15
+ text: string;
16
+ }
17
+ /** cont: continuation of the entry above (no bullet); flushed: chars of this completion already moved to scrollback. */
18
+ | {
19
+ kind: 'assistant';
20
+ text: string;
21
+ cont?: boolean;
22
+ flushed?: number;
23
+ }
24
+ /** open: fixed state for a reprint; otherwise follows the ctrl+t toggle. */
25
+ | {
26
+ kind: 'thinking';
27
+ text: string;
28
+ open?: boolean;
29
+ } | {
30
+ kind: 'tool';
31
+ callId: string;
32
+ tool: string;
33
+ target: string;
34
+ output?: string;
35
+ display?: string;
36
+ isError?: boolean;
37
+ done: boolean;
38
+ sub?: SubLine[];
39
+ } | {
40
+ kind: 'notice';
41
+ text: string;
42
+ tone: 'info' | 'warn' | 'error';
43
+ });
44
+ /** done = printed once to scrollback (Ink <Static>); live = still changing, redrawn every frame. */
45
+ export interface Transcript {
46
+ done: Entry[];
47
+ live: Entry[];
48
+ }
49
+ type EntryInput = Entry extends infer E ? (E extends {
50
+ id: number;
51
+ } ? Omit<E, 'id'> : never) : never;
52
+ export declare const entry: (e: EntryInput) => Entry;
53
+ export declare function endTurn(t: Transcript): Transcript;
54
+ export declare function applyEvent(t: Transcript, event: AgentEvent): Transcript;
55
+ export {};
@@ -0,0 +1,26 @@
1
+ import { type LineState } from './lineEdit';
2
+ export type VimMode = 'normal' | 'insert';
3
+ /** The subset of ink's key flags applyVim looks at (EditKey is too narrow for Esc/Enter/arrows). */
4
+ export interface VimKey {
5
+ escape?: boolean;
6
+ upArrow?: boolean;
7
+ downArrow?: boolean;
8
+ leftArrow?: boolean;
9
+ rightArrow?: boolean;
10
+ ctrl?: boolean;
11
+ meta?: boolean;
12
+ tab?: boolean;
13
+ return?: boolean;
14
+ }
15
+ export interface VimResult {
16
+ state: LineState;
17
+ mode: VimMode;
18
+ /** Set by "d" so the next key picks the text object (dd, dw). */
19
+ pending?: string;
20
+ handled: boolean;
21
+ }
22
+ /**
23
+ * Vim key handling for the prompt. Returns handled=false for keys the host input loop
24
+ * should process itself (insert-mode typing, arrows, ctrl/meta combos, Enter).
25
+ */
26
+ export declare function applyVim(s: LineState, mode: VimMode, input: string, key: VimKey, pending?: string): VimResult;
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  CATALOG,
4
4
  fillTemplate
5
- } from "./chunk-BQ2IGPBR.js";
5
+ } from "./chunk-WI22M2ID.js";
6
6
  import {
7
7
  MAX_VERIFY_ROUNDS,
8
8
  runVerify,
9
9
  toolLabel,
10
10
  verifyFollowup,
11
11
  worktreeListText
12
- } from "./chunk-TLPFQIS2.js";
12
+ } from "./chunk-R5RE46CW.js";
13
13
  import {
14
14
  BUILTIN_AGENTS,
15
15
  appendMemory,
@@ -21,22 +21,22 @@ import {
21
21
  renderBackgroundTasks,
22
22
  runHooks,
23
23
  validateGlobPattern
24
- } from "./chunk-M7CALSP3.js";
24
+ } from "./chunk-BGXNR74O.js";
25
25
  import "./chunk-PSO7R5AD.js";
26
26
  import {
27
27
  nextMode
28
- } from "./chunk-O7M3TGIW.js";
28
+ } from "./chunk-MHIYLXJC.js";
29
29
  import {
30
30
  hasKey,
31
31
  providerName,
32
32
  writeGlobalConfig
33
- } from "./chunk-SPRNLS7K.js";
33
+ } from "./chunk-JHPGOAXU.js";
34
34
  import {
35
35
  Session
36
- } from "./chunk-QDQU6VY2.js";
36
+ } from "./chunk-BC7UXFE4.js";
37
37
  import {
38
38
  contentText
39
- } from "./chunk-PUN4HMAG.js";
39
+ } from "./chunk-WNACAUDK.js";
40
40
  import {
41
41
  REASONING_LEVELS,
42
42
  assertReasoningSupported,
@@ -48,14 +48,14 @@ import {
48
48
  globalMcpPath,
49
49
  readMcpFile,
50
50
  removeGlobalServer
51
- } from "./chunk-L7QI6JN2.js";
51
+ } from "./chunk-24JN75FZ.js";
52
52
  import {
53
53
  ACCENT,
54
54
  PRESETS,
55
55
  color,
56
56
  matchKeybind,
57
57
  removeCredential
58
- } from "./chunk-LACUWBWS.js";
58
+ } from "./chunk-FLQPE4S5.js";
59
59
  import {
60
60
  getLanguage,
61
61
  locale,
@@ -2324,7 +2324,7 @@ ${t2.output}`);
2324
2324
  import { jsx as jsx17 } from "react/jsx-runtime";
2325
2325
  async function startInteractive(rt, opts) {
2326
2326
  if (opts.resume) {
2327
- const { Session: Session2 } = await import("./session-KBAQ4BZ5.js");
2327
+ const { Session: Session2 } = await import("./session-GKEXDJKZ.js");
2328
2328
  const list = Session2.list(rt.home, rt.cwd).slice(0, 20);
2329
2329
  if (!list.length) console.log(t("No sessions in this folder yet; starting a new one."));
2330
2330
  else {
@@ -2335,11 +2335,12 @@ async function startInteractive(rt, opts) {
2335
2335
  const rl = createInterface({ input: process.stdin, output: process.stdout });
2336
2336
  const answer = Number(await rl.question(t("Session number (enter = new): ")));
2337
2337
  rl.close();
2338
+ process.stdin.resume();
2338
2339
  const chosen = list[answer - 1];
2339
2340
  if (chosen) rt.resume(chosen.session);
2340
2341
  }
2341
2342
  }
2342
- const { serversToStart, setProjectTrust } = await import("./config-COPNMMV6.js");
2343
+ const { serversToStart, setProjectTrust } = await import("./config-DIDLDONU.js");
2343
2344
  const plan = serversToStart(rt.home, rt.cwd);
2344
2345
  if (plan.needTrust.length) {
2345
2346
  const { createInterface } = await import("readline/promises");
@@ -2351,6 +2352,7 @@ async function startInteractive(rt, opts) {
2351
2352
  if (answer === "y") plan.start.push(s);
2352
2353
  }
2353
2354
  rl.close();
2355
+ process.stdin.resume();
2354
2356
  }
2355
2357
  void rt.startMcp(plan.start).catch((error) => {
2356
2358
  console.error(t("Could not start MCP servers: {error}", { error: error instanceof Error ? error.message : String(error) }));
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-6M5X2KZE.js";
4
+ } from "./chunk-BKGFA2PT.js";
5
5
  import {
6
6
  t
7
7
  } from "./chunk-UZWJQF67.js";
@@ -0,0 +1,30 @@
1
+ import { spawnSync } from 'node:child_process';
2
+ export interface UpdateCache {
3
+ checkedAt: string;
4
+ latest?: string;
5
+ notified?: string;
6
+ }
7
+ /** Simplified semver: numeric cores, prerelease sorts below release, numeric prerelease parts compare numerically. */
8
+ export declare function compareVersions(a: string, b: string): number;
9
+ export declare function channelFor(version: string): 'next' | 'latest';
10
+ export declare function dueForCheck(cache: UpdateCache | undefined, now: Date, intervalMs?: number): boolean;
11
+ export declare function updateNotice(current: string, latest: string | undefined): string | undefined;
12
+ /** Best-effort registry check with a 24h cache; never throws, never blocks startup for long. */
13
+ export declare function checkForUpdate(deps: {
14
+ home: string;
15
+ fetch: typeof fetch;
16
+ now: Date;
17
+ timeoutMs?: number;
18
+ }): Promise<string | undefined>;
19
+ export declare function updateSpawnCommand(version: string, platform?: NodeJS.Platform, nodeExecPath?: string, targetVersion?: string): {
20
+ command: string;
21
+ args: string[];
22
+ npmCli?: string;
23
+ };
24
+ export declare function runUpdateCommand(deps: {
25
+ env: NodeJS.ProcessEnv;
26
+ spawn?: typeof spawnSync;
27
+ platform?: NodeJS.Platform;
28
+ nodeExecPath?: string;
29
+ fetch?: typeof fetch;
30
+ }): Promise<number>;
@@ -0,0 +1,16 @@
1
+ import { runCommand } from './tools/bash';
2
+ export interface VerifyFailure {
3
+ cmd: string;
4
+ exitCode: number;
5
+ output: string;
6
+ }
7
+ /** Fix rounds per user turn; keeps a failing verify command from looping forever. */
8
+ export declare const MAX_VERIFY_ROUNDS = 2;
9
+ export declare function runVerify(commands: string[], opts: {
10
+ cwd: string;
11
+ env: NodeJS.ProcessEnv;
12
+ signal: AbortSignal;
13
+ timeoutMs?: number;
14
+ run?: typeof runCommand;
15
+ }): Promise<VerifyFailure[]>;
16
+ export declare function verifyFollowup(failures: VerifyFailure[], maxBytes?: number): string;
@@ -0,0 +1 @@
1
+ export declare const VERSION: string;
@@ -0,0 +1,25 @@
1
+ import type { ChatMessage } from './provider';
2
+ export declare const isStub: (content: string) => boolean;
3
+ /**
4
+ * Replaces old `fetch` results with a one-line stub, in one batch and only once they add up to more than
5
+ * PRUNE_MIN_TOKENS, so the prompt prefix (and its cache) changes rarely. The newest KEEP_TOKENS worth stay intact.
6
+ */
7
+ export declare function pruneOldFetches(messages: ChatMessage[]): boolean;
8
+ export interface WebBudgetLimits {
9
+ perTurn?: number;
10
+ sessionChars?: number;
11
+ }
12
+ export declare class WebBudget {
13
+ private fetches;
14
+ private chars;
15
+ private readonly perTurn;
16
+ private readonly sessionChars;
17
+ constructor(limits?: WebBudgetLimits);
18
+ startTurn(): void;
19
+ /** Gives back a reservation, e.g. when the fetch was served from cache and cost nothing. */
20
+ refund(): void;
21
+ reset(): void;
22
+ /** Reserves one fetch; returns the refusal to show the model when over budget. */
23
+ take(): string | undefined;
24
+ record(chars: number): void;
25
+ }
@@ -0,0 +1,12 @@
1
+ export interface WorktreePlan {
2
+ path: string;
3
+ created: boolean;
4
+ }
5
+ /**
6
+ * Resolve (creating when needed) the sibling worktree for `-w <name>`: always derived from the
7
+ * MAIN checkout, so running inside an existing worktree nests nothing. The returned path becomes
8
+ * the session cwd, so config, prompts, sessions, and permissions all follow it.
9
+ */
10
+ export declare function resolveWorktree(cwd: string, name: string, bin?: string): Promise<WorktreePlan>;
11
+ /** Read-only status for /worktree: what exists and how to remove it safely. */
12
+ export declare function worktreeListText(cwd: string, bin?: string): Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botconnector/bccli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "BCCLI — BotConnector AI coding agent for the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,10 +18,11 @@
18
18
  },
19
19
  "license": "MIT",
20
20
  "scripts": {
21
- "build": "tsup",
21
+ "build": "tsup && tsc -p tsconfig.build.json",
22
22
  "typecheck": "tsc --noEmit",
23
- "lint": "biome lint src test",
24
- "test": "vitest run"
23
+ "lint": "biome lint --error-on-warnings src test",
24
+ "test": "vitest run",
25
+ "coverage": "vitest run --coverage"
25
26
  },
26
27
  "dependencies": {
27
28
  "@modelcontextprotocol/sdk": "^1.32.1",
@@ -29,7 +30,7 @@
29
30
  "ink": "^7.1.1",
30
31
  "openai": "^7.27.0",
31
32
  "react": "^19.3.0",
32
- "undici": "^7.30.1",
33
+ "undici": "^8.12.1",
33
34
  "ws": "^8.22.0",
34
35
  "yaml": "^2.9.1",
35
36
  "zod": "^4.6.5"
@@ -39,8 +40,9 @@
39
40
  "@types/node": "^26.6.3",
40
41
  "@types/react": "^19.3.0",
41
42
  "@types/ws": "^8.18.2",
43
+ "@vitest/coverage-v8": "^5.0.5",
42
44
  "ink-testing-library": "^4.0.0",
43
- "tsup": "^8.5.1",
45
+ "tsup": "^9.0.0",
44
46
  "typescript": "^7.0.2",
45
47
  "vitest": "^5.0.2"
46
48
  },
@@ -48,15 +50,26 @@
48
50
  "esbuild": "0.28.2"
49
51
  },
50
52
  "main": "dist/sdk.js",
53
+ "types": "dist/sdk.d.ts",
51
54
  "exports": {
52
- ".": "./dist/sdk.js"
55
+ ".": {
56
+ "types": "./dist/sdk.d.ts",
57
+ "default": "./dist/sdk.js"
58
+ }
53
59
  },
54
- "directories": {
55
- "doc": "docs",
56
- "test": "test"
57
- },
58
- "keywords": [],
59
- "author": "",
60
+ "keywords": [
61
+ "bccli",
62
+ "ai",
63
+ "coding-agent",
64
+ "agent",
65
+ "cli",
66
+ "tui",
67
+ "terminal",
68
+ "mcp",
69
+ "openai",
70
+ "indonesia"
71
+ ],
72
+ "author": "BotConnector (https://botconnector.id)",
60
73
  "bugs": {
61
74
  "url": "https://github.com/farijarifriyanto-debug/bccli/issues"
62
75
  },
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- createRuntime,
4
- lunaPtcAutoEnabled
5
- } from "./chunk-TVALKHFB.js";
6
- import "./chunk-QZKLZELZ.js";
7
- import "./chunk-M7CALSP3.js";
8
- import "./chunk-45SDLMTV.js";
9
- import "./chunk-PSO7R5AD.js";
10
- import "./chunk-O7M3TGIW.js";
11
- import "./chunk-JL5ZCSP2.js";
12
- import "./chunk-XBO5GACQ.js";
13
- import "./chunk-SPRNLS7K.js";
14
- import "./chunk-7F3IWBPQ.js";
15
- import "./chunk-QDQU6VY2.js";
16
- import "./chunk-PUN4HMAG.js";
17
- import "./chunk-BLOYFIAD.js";
18
- import "./chunk-L7QI6JN2.js";
19
- import "./chunk-LACUWBWS.js";
20
- import "./chunk-UZWJQF67.js";
21
- export {
22
- createRuntime,
23
- lunaPtcAutoEnabled
24
- };