@botconnector/bccli 0.4.0 → 0.4.2

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 (173) 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-UYC6APR5.js} +30 -6
  5. package/dist/acp.d.ts +28 -0
  6. package/dist/agent.d.ts +147 -0
  7. package/dist/agents.d.ts +4 -0
  8. package/dist/args-NRTZWWEV.js +13 -0
  9. package/dist/args.d.ts +53 -0
  10. package/dist/budget.d.ts +23 -0
  11. package/dist/checkpoints.d.ts +35 -0
  12. package/dist/{chunk-6M5X2KZE.js → chunk-266SY3MC.js} +1 -1
  13. package/dist/{chunk-7F3IWBPQ.js → chunk-3I5BW3ZT.js} +20 -9
  14. package/dist/{chunk-UZWJQF67.js → chunk-3WHI4LN3.js} +2 -1
  15. package/dist/{chunk-PUN4HMAG.js → chunk-5YJ3ZQVR.js} +73 -10
  16. package/dist/{chunk-L7QI6JN2.js → chunk-6M55UPES.js} +7 -7
  17. package/dist/{chunk-KEMYIGCP.js → chunk-6UO5GX55.js} +26 -12
  18. package/dist/{chunk-TLPFQIS2.js → chunk-C64KM37J.js} +36 -6
  19. package/dist/{chunk-JL5ZCSP2.js → chunk-H7XJDKJY.js} +4 -4
  20. package/dist/{chunk-SPRNLS7K.js → chunk-HQW4BROS.js} +4 -5
  21. package/dist/{chunk-XBO5GACQ.js → chunk-IYR5PYA3.js} +4 -4
  22. package/dist/{chunk-45SDLMTV.js → chunk-JXM6REER.js} +1 -1
  23. package/dist/{chunk-BLOYFIAD.js → chunk-KPTML72Q.js} +1 -1
  24. package/dist/{chunk-BQ2IGPBR.js → chunk-NQOGVP3I.js} +2 -2
  25. package/dist/{chunk-QZKLZELZ.js → chunk-OK2USAXX.js} +28 -4
  26. package/dist/{chunk-TVALKHFB.js → chunk-R72OV7RF.js} +421 -108
  27. package/dist/{chunk-LACUWBWS.js → chunk-RX4UQX43.js} +25 -10
  28. package/dist/{chunk-QDQU6VY2.js → chunk-SVD4LHJC.js} +73 -3
  29. package/dist/{chunk-BNA74HPN.js → chunk-TIMSYZIR.js} +7 -7
  30. package/dist/{chunk-O7M3TGIW.js → chunk-WFZKJY3R.js} +43 -4
  31. package/dist/{chunk-M7CALSP3.js → chunk-ZEPTUKNW.js} +120 -32
  32. package/dist/cli.d.ts +1 -0
  33. package/dist/cli.js +61 -45
  34. package/dist/clipboardImage.d.ts +17 -0
  35. package/dist/commands.d.ts +16 -0
  36. package/dist/{completion-HPPFDAPB.js → completion-D2BSBTQO.js} +1 -1
  37. package/dist/completion.d.ts +14 -0
  38. package/dist/{config-COPNMMV6.js → config-ENDRMOTP.js} +3 -3
  39. package/dist/{config-RZ5JONMX.js → config-LAINORU5.js} +8 -4
  40. package/dist/config.d.ts +99 -0
  41. package/dist/context.d.ts +13 -0
  42. package/dist/contextWindow.d.ts +3 -0
  43. package/dist/diff.d.ts +7 -0
  44. package/dist/exit.d.ts +9 -0
  45. package/dist/extensions.d.ts +34 -0
  46. package/dist/{ghBotCli-IBCZIWT5.js → ghBotCli-TSLRORJJ.js} +21 -20
  47. package/dist/ghBotCli.d.ts +9 -0
  48. package/dist/ghBotDispatch.d.ts +68 -0
  49. package/dist/ghBotRunner.d.ts +82 -0
  50. package/dist/ghBotServe.d.ts +21 -0
  51. package/dist/ghBotWebhook.d.ts +45 -0
  52. package/dist/hooks.d.ts +27 -0
  53. package/dist/i18n/id.d.ts +1 -0
  54. package/dist/i18n.d.ts +16 -0
  55. package/dist/{integrationCli-P75R2VSC.js → integrationCli-HXCSEWH2.js} +2 -2
  56. package/dist/integrationCli.d.ts +9 -0
  57. package/dist/keybinds.d.ts +22 -0
  58. package/dist/{login-SYIQP46J.js → login-RYESFZG6.js} +4 -4
  59. package/dist/login.d.ts +19 -0
  60. package/dist/lsp.d.ts +50 -0
  61. package/dist/mcp/catalog.d.ts +14 -0
  62. package/dist/mcp/config.d.ts +36 -0
  63. package/dist/mcp/manager.d.ts +52 -0
  64. package/dist/mcp/oauth.d.ts +82 -0
  65. package/dist/{mcpCli-QUV5SD64.js → mcpCli-SETTCL3K.js} +6 -6
  66. package/dist/mcpCli.d.ts +3 -0
  67. package/dist/mcpServer/serve.d.ts +8 -0
  68. package/dist/mcpServer/server.d.ts +19 -0
  69. package/dist/models.d.ts +13 -0
  70. package/dist/{modelsCli-TRRB5LX4.js → modelsCli-OP7CDZC7.js} +6 -6
  71. package/dist/modelsCli.d.ts +15 -0
  72. package/dist/npmRunner.d.ts +21 -0
  73. package/dist/{oauthLogin-6FWQABJ7.js → oauthLogin-XWY7OHCG.js} +1 -1
  74. package/dist/oauthLogin.d.ts +47 -0
  75. package/dist/permissions.d.ts +30 -0
  76. package/dist/pluginSpec.d.ts +25 -0
  77. package/dist/plugins.d.ts +45 -0
  78. package/dist/{pluginsCli-GNW4TPVV.js → pluginsCli-ZQNKWZHJ.js} +2 -2
  79. package/dist/pluginsCli.d.ts +16 -0
  80. package/dist/{prCli-5IMV3VNQ.js → prCli-6PUWTMTP.js} +20 -4
  81. package/dist/prCli.d.ts +46 -0
  82. package/dist/presets.d.ts +8 -0
  83. package/dist/print.d.ts +16 -0
  84. package/dist/provider.d.ts +145 -0
  85. package/dist/providerCli-5OZI2GQQ.js +15 -0
  86. package/dist/providerCli.d.ts +17 -0
  87. package/dist/providers.d.ts +6 -0
  88. package/dist/reasoning.d.ts +12 -0
  89. package/dist/repomap.d.ts +10 -0
  90. package/dist/sdk.d.ts +61 -0
  91. package/dist/sdk.js +829 -191
  92. package/dist/{serve-JG7RLIUD.js → serve-4J7HA4JO.js} +24 -18
  93. package/dist/{serve-6QLBJUYW.js → serve-K5AH4MGO.js} +3 -3
  94. package/dist/serve.d.ts +37 -0
  95. package/dist/serveHeartbeat.d.ts +14 -0
  96. package/dist/serveProtocol.d.ts +47 -0
  97. package/dist/session-YQXCCKXI.js +12 -0
  98. package/dist/session.d.ts +33 -0
  99. package/dist/setup-S4AJT6XE.js +24 -0
  100. package/dist/setup.d.ts +74 -0
  101. package/dist/slash/copy.d.ts +1 -0
  102. package/dist/slash/diff.d.ts +1 -0
  103. package/dist/slash/doctor.d.ts +18 -0
  104. package/dist/slash/export.d.ts +2 -0
  105. package/dist/slash/info.d.ts +46 -0
  106. package/dist/slash/memory.d.ts +10 -0
  107. package/dist/{statsCli-CF3R7ATL.js → statsCli-XR6BEZQQ.js} +2 -2
  108. package/dist/statsCli.d.ts +62 -0
  109. package/dist/textToolCalls.d.ts +6 -0
  110. package/dist/thinking.d.ts +17 -0
  111. package/dist/tokenBudget.d.ts +22 -0
  112. package/dist/tools/bash.d.ts +52 -0
  113. package/dist/tools/diagnostics.d.ts +5 -0
  114. package/dist/tools/edit.d.ts +12 -0
  115. package/dist/tools/fetch.d.ts +41 -0
  116. package/dist/tools/glob.d.ts +5 -0
  117. package/dist/tools/globSafety.d.ts +7 -0
  118. package/dist/tools/grep.d.ts +25 -0
  119. package/dist/tools/ignore.d.ts +2 -0
  120. package/dist/tools/index.d.ts +12 -0
  121. package/dist/tools/memory.d.ts +13 -0
  122. package/dist/tools/paths.d.ts +4 -0
  123. package/dist/tools/plan.d.ts +10 -0
  124. package/dist/tools/read.d.ts +16 -0
  125. package/dist/tools/repomap.d.ts +2 -0
  126. package/dist/tools/sandbox.d.ts +12 -0
  127. package/dist/tools/shell.d.ts +18 -0
  128. package/dist/tools/skill.d.ts +3 -0
  129. package/dist/tools/task.d.ts +28 -0
  130. package/dist/tools/todo.d.ts +13 -0
  131. package/dist/tools/types.d.ts +52 -0
  132. package/dist/tools/websearch.d.ts +9 -0
  133. package/dist/tools/write.d.ts +5 -0
  134. package/dist/{transferCli-TK2GSVRK.js → transferCli-R2KEIWQR.js} +8 -6
  135. package/dist/transferCli.d.ts +23 -0
  136. package/dist/ui/App.d.ts +7 -0
  137. package/dist/ui/DiffView.d.ts +3 -0
  138. package/dist/ui/EditableText.d.ts +7 -0
  139. package/dist/ui/LinePrompt.d.ts +6 -0
  140. package/dist/ui/ListPicker.d.ts +11 -0
  141. package/dist/ui/Markdown.d.ts +8 -0
  142. package/dist/ui/McpMenu.d.ts +11 -0
  143. package/dist/ui/ModelPicker.d.ts +6 -0
  144. package/dist/ui/PermissionPrompt.d.ts +5 -0
  145. package/dist/ui/PlanApproval.d.ts +5 -0
  146. package/dist/ui/PromptInput.d.ts +18 -0
  147. package/dist/ui/ProviderMenu.d.ts +10 -0
  148. package/dist/ui/Spinner.d.ts +4 -0
  149. package/dist/ui/StatusBar.d.ts +9 -0
  150. package/dist/ui/TodoList.d.ts +4 -0
  151. package/dist/ui/ToolBlock.d.ts +14 -0
  152. package/dist/ui/complete.d.ts +6 -0
  153. package/dist/ui/focusReport.d.ts +1 -0
  154. package/dist/ui/index.d.ts +7 -0
  155. package/dist/ui/lineEdit.d.ts +42 -0
  156. package/dist/ui/replay.d.ts +4 -0
  157. package/dist/ui/table.d.ts +20 -0
  158. package/dist/ui/theme.d.ts +5 -0
  159. package/dist/ui/thinkingMouse.d.ts +33 -0
  160. package/dist/ui/transcript.d.ts +55 -0
  161. package/dist/ui/vim.d.ts +26 -0
  162. package/dist/{ui-B3CJ6TGE.js → ui-36ZEK65V.js} +179 -54
  163. package/dist/{update-K5IQ2MYR.js → update-FSS7X5WV.js} +2 -2
  164. package/dist/update.d.ts +30 -0
  165. package/dist/verify.d.ts +16 -0
  166. package/dist/version.d.ts +1 -0
  167. package/dist/webBudget.d.ts +25 -0
  168. package/dist/worktree.d.ts +12 -0
  169. package/package.json +26 -13
  170. package/dist/args-J5ONVGIF.js +0 -13
  171. package/dist/providerCli-FAOZHOKW.js +0 -15
  172. package/dist/session-KBAQ4BZ5.js +0 -12
  173. package/dist/setup-FJAWDWV4.js +0 -24
@@ -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.2",
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,13 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- helpText,
4
- parseCliArgs
5
- } from "./chunk-KEMYIGCP.js";
6
- import "./chunk-O7M3TGIW.js";
7
- import "./chunk-BLOYFIAD.js";
8
- import "./chunk-LACUWBWS.js";
9
- import "./chunk-UZWJQF67.js";
10
- export {
11
- helpText,
12
- parseCliArgs
13
- };
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- addProviderKey,
4
- runProviderCommand
5
- } from "./chunk-JL5ZCSP2.js";
6
- import "./chunk-XBO5GACQ.js";
7
- import "./chunk-SPRNLS7K.js";
8
- import "./chunk-PUN4HMAG.js";
9
- import "./chunk-BLOYFIAD.js";
10
- import "./chunk-LACUWBWS.js";
11
- import "./chunk-UZWJQF67.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-QDQU6VY2.js";
6
- import "./chunk-PUN4HMAG.js";
7
- import "./chunk-BLOYFIAD.js";
8
- import "./chunk-UZWJQF67.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-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
- };