@botconnector/bccli 0.4.16 → 0.5.0-rc.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 (185) hide show
  1. package/LICENSE +203 -21
  2. package/THIRD_PARTY_NOTICES.md +9 -0
  3. package/branding.mjs +347 -0
  4. package/cli.mjs +120 -0
  5. package/core.mjs +260 -0
  6. package/credentials.mjs +52 -0
  7. package/gateway.mjs +2 -0
  8. package/model-command.mjs +61 -0
  9. package/package.json +35 -59
  10. package/provider-cli.mjs +77 -0
  11. package/providers.mjs +166 -0
  12. package/proxy.mjs +242 -0
  13. package/startup-menu.mjs +120 -0
  14. package/README.en.md +0 -253
  15. package/README.md +0 -250
  16. package/dist/abort.d.ts +0 -5
  17. package/dist/acp-JZW3XHE5.js +0 -221
  18. package/dist/acp.d.ts +0 -44
  19. package/dist/agent.d.ts +0 -147
  20. package/dist/agents.d.ts +0 -4
  21. package/dist/args-XVO7TB4C.js +0 -13
  22. package/dist/args.d.ts +0 -59
  23. package/dist/budget.d.ts +0 -26
  24. package/dist/checkpoints.d.ts +0 -35
  25. package/dist/chunk-3CYQYHPK.js +0 -202
  26. package/dist/chunk-6JK4IBGK.js +0 -1075
  27. package/dist/chunk-6SDRWEPN.js +0 -50
  28. package/dist/chunk-7GM6NN5E.js +0 -341
  29. package/dist/chunk-7XD47KN5.js +0 -71
  30. package/dist/chunk-INMSTUB2.js +0 -56
  31. package/dist/chunk-ISOKH5WB.js +0 -256
  32. package/dist/chunk-JUC3ZOCV.js +0 -50
  33. package/dist/chunk-KDVL2NP6.js +0 -861
  34. package/dist/chunk-KEKDRROL.js +0 -216
  35. package/dist/chunk-KJIXA6MP.js +0 -159
  36. package/dist/chunk-OK2USAXX.js +0 -88
  37. package/dist/chunk-PSO7R5AD.js +0 -10
  38. package/dist/chunk-Q42ZGVAQ.js +0 -91
  39. package/dist/chunk-R754XIBJ.js +0 -523
  40. package/dist/chunk-S3QEZDKB.js +0 -270
  41. package/dist/chunk-SWNRA3EW.js +0 -78
  42. package/dist/chunk-TLCL6DC7.js +0 -378
  43. package/dist/chunk-V5D6PJQN.js +0 -8
  44. package/dist/chunk-YYTFJUO2.js +0 -148
  45. package/dist/chunk-ZJRZTMJF.js +0 -2669
  46. package/dist/cli.d.ts +0 -1
  47. package/dist/cli.js +0 -233
  48. package/dist/clipboardImage.d.ts +0 -17
  49. package/dist/commands.d.ts +0 -16
  50. package/dist/completion-Q7VHOPPV.js +0 -125
  51. package/dist/completion.d.ts +0 -14
  52. package/dist/config-T7MKGJVG.js +0 -34
  53. package/dist/config-YYEAEN2C.js +0 -25
  54. package/dist/config.d.ts +0 -99
  55. package/dist/context.d.ts +0 -13
  56. package/dist/contextWindow.d.ts +0 -3
  57. package/dist/diff.d.ts +0 -7
  58. package/dist/exit.d.ts +0 -9
  59. package/dist/extensions.d.ts +0 -34
  60. package/dist/ghBotCli-7VUGI63S.js +0 -680
  61. package/dist/ghBotCli.d.ts +0 -9
  62. package/dist/ghBotDispatch.d.ts +0 -68
  63. package/dist/ghBotRunner.d.ts +0 -82
  64. package/dist/ghBotServe.d.ts +0 -21
  65. package/dist/ghBotWebhook.d.ts +0 -45
  66. package/dist/hooks.d.ts +0 -27
  67. package/dist/i18n/id.d.ts +0 -1
  68. package/dist/i18n.d.ts +0 -16
  69. package/dist/integrationCli-FBRSTF5F.js +0 -876
  70. package/dist/integrationCli.d.ts +0 -9
  71. package/dist/keybinds.d.ts +0 -22
  72. package/dist/login-BSMUGW7L.js +0 -18
  73. package/dist/login.d.ts +0 -21
  74. package/dist/lsp.d.ts +0 -73
  75. package/dist/mcp/catalog.d.ts +0 -14
  76. package/dist/mcp/config.d.ts +0 -36
  77. package/dist/mcp/manager.d.ts +0 -52
  78. package/dist/mcp/oauth.d.ts +0 -82
  79. package/dist/mcpCli-ZT7CRYMP.js +0 -113
  80. package/dist/mcpCli.d.ts +0 -3
  81. package/dist/mcpServer/serve.d.ts +0 -8
  82. package/dist/mcpServer/server.d.ts +0 -19
  83. package/dist/models.d.ts +0 -13
  84. package/dist/modelsCli-2ZRW4CC4.js +0 -36
  85. package/dist/modelsCli.d.ts +0 -15
  86. package/dist/npmRunner-LU43GM3W.js +0 -46
  87. package/dist/npmRunner.d.ts +0 -21
  88. package/dist/oauthLogin-THSM6FE7.js +0 -210
  89. package/dist/oauthLogin.d.ts +0 -47
  90. package/dist/permissions.d.ts +0 -30
  91. package/dist/pluginSpec.d.ts +0 -25
  92. package/dist/plugins.d.ts +0 -45
  93. package/dist/pluginsCli-EKQI4CJW.js +0 -288
  94. package/dist/pluginsCli.d.ts +0 -16
  95. package/dist/prCli-FMQTOBIV.js +0 -94
  96. package/dist/prCli.d.ts +0 -46
  97. package/dist/presets.d.ts +0 -8
  98. package/dist/print.d.ts +0 -17
  99. package/dist/provider.d.ts +0 -145
  100. package/dist/providerCli-3TFEKV4C.js +0 -15
  101. package/dist/providerCli.d.ts +0 -17
  102. package/dist/providers.d.ts +0 -6
  103. package/dist/reasoning.d.ts +0 -12
  104. package/dist/repomap.d.ts +0 -10
  105. package/dist/sdk.d.ts +0 -61
  106. package/dist/sdk.js +0 -6494
  107. package/dist/serve-3BODPEPR.js +0 -532
  108. package/dist/serve-V6YVZTNR.js +0 -178
  109. package/dist/serve.d.ts +0 -37
  110. package/dist/serveHeartbeat.d.ts +0 -14
  111. package/dist/serveProtocol.d.ts +0 -47
  112. package/dist/session-LX4UNPCD.js +0 -12
  113. package/dist/session.d.ts +0 -33
  114. package/dist/setup-MFG3BWEU.js +0 -24
  115. package/dist/setup.d.ts +0 -79
  116. package/dist/slash/copy.d.ts +0 -1
  117. package/dist/slash/diff.d.ts +0 -1
  118. package/dist/slash/doctor.d.ts +0 -18
  119. package/dist/slash/export.d.ts +0 -2
  120. package/dist/slash/info.d.ts +0 -46
  121. package/dist/slash/memory.d.ts +0 -10
  122. package/dist/statsCli-7MIQHLVW.js +0 -353
  123. package/dist/statsCli.d.ts +0 -62
  124. package/dist/textToolCalls.d.ts +0 -6
  125. package/dist/thinking.d.ts +0 -17
  126. package/dist/tokenBudget.d.ts +0 -22
  127. package/dist/tools/bash.d.ts +0 -54
  128. package/dist/tools/diagnostics.d.ts +0 -13
  129. package/dist/tools/edit.d.ts +0 -12
  130. package/dist/tools/fetch.d.ts +0 -41
  131. package/dist/tools/glob.d.ts +0 -5
  132. package/dist/tools/globSafety.d.ts +0 -7
  133. package/dist/tools/grep.d.ts +0 -25
  134. package/dist/tools/ignore.d.ts +0 -2
  135. package/dist/tools/index.d.ts +0 -12
  136. package/dist/tools/memory.d.ts +0 -13
  137. package/dist/tools/paths.d.ts +0 -4
  138. package/dist/tools/plan.d.ts +0 -10
  139. package/dist/tools/read.d.ts +0 -16
  140. package/dist/tools/repomap.d.ts +0 -2
  141. package/dist/tools/sandbox.d.ts +0 -15
  142. package/dist/tools/shell.d.ts +0 -18
  143. package/dist/tools/skill.d.ts +0 -3
  144. package/dist/tools/task.d.ts +0 -28
  145. package/dist/tools/todo.d.ts +0 -13
  146. package/dist/tools/types.d.ts +0 -52
  147. package/dist/tools/websearch.d.ts +0 -9
  148. package/dist/tools/write.d.ts +0 -5
  149. package/dist/transferCli-SRSYQLSJ.js +0 -73
  150. package/dist/transferCli.d.ts +0 -23
  151. package/dist/ui/App.d.ts +0 -7
  152. package/dist/ui/DiffView.d.ts +0 -3
  153. package/dist/ui/EditableText.d.ts +0 -7
  154. package/dist/ui/LinePrompt.d.ts +0 -6
  155. package/dist/ui/ListPicker.d.ts +0 -11
  156. package/dist/ui/Markdown.d.ts +0 -8
  157. package/dist/ui/McpMenu.d.ts +0 -11
  158. package/dist/ui/ModelPicker.d.ts +0 -6
  159. package/dist/ui/PermissionPrompt.d.ts +0 -5
  160. package/dist/ui/PlanApproval.d.ts +0 -5
  161. package/dist/ui/PromptInput.d.ts +0 -20
  162. package/dist/ui/ProviderMenu.d.ts +0 -10
  163. package/dist/ui/Spinner.d.ts +0 -4
  164. package/dist/ui/StatusBar.d.ts +0 -9
  165. package/dist/ui/TodoList.d.ts +0 -4
  166. package/dist/ui/ToolBlock.d.ts +0 -14
  167. package/dist/ui/complete.d.ts +0 -8
  168. package/dist/ui/index.d.ts +0 -7
  169. package/dist/ui/lineEdit.d.ts +0 -42
  170. package/dist/ui/liveCap.d.ts +0 -9
  171. package/dist/ui/replay.d.ts +0 -4
  172. package/dist/ui/stdinFilter.d.ts +0 -18
  173. package/dist/ui/table.d.ts +0 -20
  174. package/dist/ui/theme.d.ts +0 -5
  175. package/dist/ui/thinkingMouse.d.ts +0 -38
  176. package/dist/ui/transcript.d.ts +0 -55
  177. package/dist/ui/tty.d.ts +0 -11
  178. package/dist/ui/vim.d.ts +0 -26
  179. package/dist/ui-LZ4JGF2V.js +0 -2913
  180. package/dist/update-P7MU4ZM7.js +0 -145
  181. package/dist/update.d.ts +0 -30
  182. package/dist/verify.d.ts +0 -16
  183. package/dist/version.d.ts +0 -1
  184. package/dist/webBudget.d.ts +0 -25
  185. package/dist/worktree.d.ts +0 -12
package/LICENSE CHANGED
@@ -1,21 +1,203 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 BotConnector
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2025 Google LLC
191
+ Copyright 2025 Qwen
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
@@ -0,0 +1,9 @@
1
+ # BCCLI Candidate — Third-party attribution
2
+
3
+ BCCLI / BotConnector candidate launcher and Gateway adapter are maintained for BotConnector by BICO Inovasi Digital.
4
+
5
+ This candidate uses **Qwen Code** (`@qwen-code/qwen-code@0.26.3`) as an upstream coding-agent engine. The upstream code and contributor notices remain subject to the **Apache License, Version 2.0**. The original upstream project's source and notices are available at https://github.com/QwenLM/qwen-code.
6
+
7
+ The candidate keeps the installed upstream npm dependency unchanged. At runtime it creates an isolated, pinned, SHA-verified copy of selected upstream compiled files for BCCLI terminal branding. This is a modified UI/runtime copy, not a claim of original authorship of the upstream engine. Keep relevant upstream copyright notices, the supplied LICENSE, and the dependency's own license/notice files when redistributing.
8
+
9
+ The model producing an answer is the actual model selected via BotConnector Gateway; BCCLI is the client application, not the AI model. Vendor/source attribution is available under `/about credits` rather than forced into the AI's self-description.
package/branding.mjs ADDED
@@ -0,0 +1,347 @@
1
+ // BCCLI white-label view overlay for the pinned upstream Qwen package.
2
+ // Never mutate the original npm dependency or weaken --bare isolation.
3
+ import { createHash } from 'node:crypto'
4
+ import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, writeFileSync } from 'node:fs'
5
+ import { basename, dirname, join } from 'node:path'
6
+ import { BCCLI_MODEL_COMMAND } from './model-command.mjs'
7
+
8
+ const VERSION = '0.26.3'
9
+ const SOURCE_HASHES = Object.freeze({
10
+ 'chunks/chunk-OYUATJK2.js': '3fa61c12bc1cba19d70151381519be337b99e2e60dac8edf6d066107a8419a1d',
11
+ 'chunks/startInteractiveUI-CECFAXVK.js': 'd9acfeb1105032c9edccf223acfc6a8384256099883303c1622b12d92eea0b83',
12
+ 'chunks/start-opentui-ui-Q34XCEMN.js': 'e5a8d1ff1ce494f6df26b03023daf2b930cb093ebfbfbcf9e2bcd3b349e6f107',
13
+ 'chunks/chunk-OV3EBH6J.js': '3b20ea65e93e6ee00625f9d86906c3d28c45529b4b4dbe72dc050bdae3904505',
14
+ 'chunks/chunk-W3YCOEIP.js': '02828393f6e477a7f36cecff876a6af2d36ece3eb838fceb096d9245eb7fc5f7',
15
+ 'chunks/chunk-7L4WTOM2.js': '4d8053c956cc7881b7f87ae2c0e96bf1adc942a37ac37de3d76eaeb9367041fc',
16
+ 'chunks/chunk-QUFSNRKR.js': 'f52e1917c7956b02208b39982bbf7b45fb52c294418ebd93f7f2f0677c1aaa2d',
17
+ 'chunks/chunk-2PLSL3VQ.js': 'f475f043f1ab8314a64699ebb45e43026bb1a1fe65f1ac259f1898afb8a6c5d9',
18
+ 'chunks/chunk-ERV2ECV3.js': '7d2511a8317ee2c44edd2fd62b43966b9acfbfaac79175cd0cc9fb9ed42051c6',
19
+ 'chunks/server-SJNWHHV4.js': '42ceeddc69dda95fbaac276cbd94e99432892305d169d248e760c9d94aab6eaf',
20
+ })
21
+ const BRAND_REVISION = 'bccli-new-20261030-neutral-identity-v3'
22
+ // Deliberately not Qwen's blue→purple→rose gradient. BotConnector-facing
23
+ // coding CLI uses a distinct teal→green→amber palette in dark/light themes.
24
+ export const BCCLI_COLORS = Object.freeze(['#00AFA0', '#22C55E', '#EAB308'])
25
+ const BCCLI_ASCII = [
26
+ '',
27
+ '██████╗ ██████╗ ██████╗██╗ ██╗',
28
+ '██╔══██╗██╔════╝ ██╔════╝██║ ██║',
29
+ '██████╔╝██║ ██║ ██║ ██║',
30
+ '██╔══██╗██║ ██║ ██║ ██║',
31
+ '██████╔╝╚██████╗ ╚██████╗███████╗██║',
32
+ '╚═════╝ ╚═════╝ ╚═════╝╚══════╝╚═╝',
33
+ '',
34
+ ].join('\n')
35
+
36
+ const digest = (value) => createHash('sha256').update(value).digest('hex')
37
+
38
+ function replaceExactly(text, oldValue, newValue, expectedCount, label) {
39
+ if (text.split(oldValue).length - 1 !== expectedCount) {
40
+ throw Error('BCCLI branding unsupported by installed engine: ' + label)
41
+ }
42
+ return text.split(oldValue).join(newValue)
43
+ }
44
+
45
+ function replaceOnce(text, oldValue, newValue, label) {
46
+ if (text.split(oldValue).length !== 2) {
47
+ throw Error('BCCLI branding unsupported by installed engine: ' + label)
48
+ }
49
+ return text.replace(oldValue, newValue)
50
+ }
51
+
52
+
53
+ // Embedded slash commands are part of the upstream renderer bundle. BCCLI's
54
+ // Gateway owns authentication, model eligibility and release management, so
55
+ // those commands must not open arbitrary upstream provider settings or invoke
56
+ // the upstream npm / standalone auto-updater.
57
+ export function guardUpstreamProviderCommands(text) {
58
+ const replacements = [
59
+ {
60
+ command: 'auth',
61
+ detect: 'dialog:"auth"',
62
+ code: 'var authCommand={name:"auth",altNames:["connect","login","provider"],get description(){return "Choose provider, add API key and select a model in BCCLI"},kind:"built-in",supportedModes:["interactive"],action:__name((context)=>{if(context.executionMode && context.executionMode!=="interactive")return{type:"message",messageType:"error",content:"Provider switching requires an interactive terminal."};process.exit(51)},"action")};',
63
+ },
64
+ {
65
+ command: 'model',
66
+ detect: 'dialog:"model"',
67
+ code: BCCLI_MODEL_COMMAND,
68
+ },
69
+ {
70
+ command: 'settings',
71
+ detect: 'dialog:"settings"',
72
+ code: 'var settingsCommand={name:"settings",get description(){return "View safe BCCLI settings"},kind:"built-in",supportedModes:["interactive","non_interactive","acp"],action:__name(context=>({type:"message",messageType:"info",content:"BCCLI | BotConnector Settings\\nGateway: https://api.botconnector.id/v1 (fixed)\\nModel: "+(context.services?.config?.getModel?.()||"unknown")+"\\nAuth: existing bccli-legacy login (bc-cloud) or BOTCONNECTOR_API_KEY override\\nPermissions: ask before file changes and shell commands\\nUse /model to switch AI, /auth for connection help, /permissions for tool approvals, /theme to change appearance. Upstream provider and project-settings editors are disabled."}),"action")};',
73
+ },
74
+ {
75
+ command: 'about',
76
+ detect: 'Qwen Code v',
77
+ code: 'var aboutCommand={name:"status",altNames:["about"],get description(){return "Show BCCLI and BotConnector session diagnostics"},kind:"built-in",supportedModes:["interactive","non_interactive","acp"],canRunDuringStreaming:true,action:__name((context,arg)=>{const config=context.services?.config;const input=String(context.invocation?.args||arg||"").trim().toLowerCase();const message=input==="credits"?"BCCLI coding-agent runtime: based on Qwen Code 0.26.3 (Apache-2.0). Source attribution and license notices are retained in the installed runtime. Product repository: https://github.com/farijarifriyanto-debug/bccli":"BCCLI | BotConnector\\nAI model: "+(config?.getModel?.()||"unknown")+"\\nGateway: https://api.botconnector.id/v1\\nProvider routing: managed by BotConnector\\nPermissions: default (ask)\\nSource: https://github.com/farijarifriyanto-debug/bccli\\nEngine runtime: 0.26.3\\nFor open-source engine credits use /about credits.";return{type:"message",messageType:"info",content:message}},"action")};',
78
+ },
79
+ {
80
+ command: 'docs',
81
+ detect: 'qwen-code-docs',
82
+ code: 'var docsCommand={name:"docs",get description(){return "BCCLI product documentation"},kind:"built-in",supportedModes:["interactive","non_interactive","acp"],action:__name(()=>({type:"message",messageType:"info",content:"BCCLI documentation and releases: https://github.com/farijarifriyanto-debug/bccli#readme"}),"action")};',
83
+ },
84
+ {
85
+ command: 'update',
86
+ detect: 'Check for Qwen Code updates',
87
+ code: 'var updateCommand={name:"update",get description(){return "BCCLI release information"},kind:"built-in",supportedModes:["interactive","non_interactive","acp"],action:__name(()=>({type:"message",messageType:"info",content:"BCCLI updates are managed by the BotConnector release channel (@botconnector/bccli). The upstream engine updater is disabled; use the BotConnector release channel. Visit https://github.com/farijarifriyanto-debug/bccli/releases for product releases."}),"action")};',
88
+ },
89
+ ]
90
+ let result = text
91
+ for (const { command, detect, code } of replacements) {
92
+ const marker = 'var ' + command + 'Command='
93
+ const pos = result.indexOf(marker)
94
+ if (pos < 0 || result.indexOf(marker, pos + 1) !== -1) {
95
+ throw Error('BCCLI upstream command locator changed: ' + command)
96
+ }
97
+ // /status has subCommands after its top-level action. Matching the first
98
+ // generic action end would accidentally remove neighbouring commands!
99
+ // This entire command is bounded by its own esbuild shim boundary.
100
+ const shimBoundary = command === 'about'
101
+ const suffix = shimBoundary ? '};init_esbuild_shims();' : ',"action")};'
102
+ const end = result.indexOf(suffix, pos)
103
+ const maxLength = shimBoundary ? 2500 : 18000
104
+ if (end < 0 || end - pos > maxLength) {
105
+ throw Error('BCCLI upstream command end changed: ' + command)
106
+ }
107
+ const original = result.slice(pos, end + suffix.length)
108
+ if (!original.includes(detect)) {
109
+ throw Error('BCCLI upstream command behavior changed: ' + command)
110
+ }
111
+ result = result.slice(0, pos) + code + (shimBoundary ? 'init_esbuild_shims();' : '') + result.slice(end + suffix.length)
112
+ }
113
+ return result
114
+ }
115
+
116
+ // Human-facing labels only. Do not rewrite license notices, import names, or
117
+ // file formats such as QWEN.md, which are still used by the upstream engine.
118
+ function renameProductLanguage(text) {
119
+ const labels = [
120
+ ['To see changes, Qwen Code must be restarted.', 'To see changes, BCCLI must be restarted.'],
121
+ ['To apply the trust changes, Qwen Code must be restarted.', 'To apply trust changes, restart BCCLI.'],
122
+ ["Press 'r' to restart Qwen Code", "Press 'r' to restart BCCLI"],
123
+ ["Qwen Code won't ask before using allowed tools.", "BCCLI won't ask before using allowed tools."],
124
+ ["Qwen Code will ask before using these tools.", "BCCLI will ask before using these tools."],
125
+ ["Qwen Code is not allowed to use denied tools.", "BCCLI is not allowed to use denied tools."],
126
+ ["Qwen Code will be able to read files in this directory", "BCCLI will be able to read files in this directory"],
127
+ ["Qwen Code can read files in the workspace", "BCCLI can read files in the workspace"],
128
+ ['Qwen Code is restarting to apply the trust changes', 'BCCLI is restarting to apply the trust changes'],
129
+ ['Qwen Code understands your codebase', 'BCCLI helps you understand your codebase'],
130
+ ['Available Qwen Code CLI tools:', 'Available BCCLI coding tools:'],
131
+ ['This menu is read-only. To add or modify hooks, edit settings.json directly or ask Qwen Code.', 'This menu is read-only. Changes to hooks require trusted BCCLI configuration.'],
132
+ ['To re-enable hooks, remove "disableAllHooks" from settings.json or ask Qwen Code.', 'To re-enable hooks, update trusted BCCLI hook configuration.'],
133
+ ['Generate with Qwen Code (Recommended)', 'Generate with BCCLI'],
134
+ ['Trusting a folder allows Qwen Code to execute commands it suggests.', 'Trusting a folder allows BCCLI to execute approved commands.'],
135
+ ['Reinstall Qwen Code or use the npm installation method.', 'Reinstall BCCLI using the official npm package.'],
136
+ ['Do you want to connect ${ideName??"your editor"} to Qwen Code?', 'Do you want to connect ${ideName??"your editor"} to BCCLI?'],
137
+ ['var DEFAULT_TITLE="Qwen Code"', 'var DEFAULT_TITLE="BCCLI"'],
138
+ ['var NOTIFICATION_TITLE="Qwen Code"', 'var NOTIFICATION_TITLE="BCCLI"'],
139
+ ['Qwen Code needs your permission', 'BCCLI needs your permission'],
140
+ ['Qwen Code is waiting for your input', 'BCCLI is waiting for your input'],
141
+ ['title:"Qwen Code"', 'title:"BCCLI"'],
142
+ ['children:"Qwen Code"', 'children:"BCCLI"'],
143
+ ['Approving lets Qwen Code start it and run its tools.', 'Approving lets BCCLI start it and run its tools.'],
144
+ ['var DOCS_URL="https://qwenlm.github.io/qwen-code-docs/"', 'var DOCS_URL="https://github.com/farijarifriyanto-debug/bccli#readme"'],
145
+ ['var HELP_DOCS_URL="https://qwenlm.github.io/qwen-code-docs/"', 'var HELP_DOCS_URL="https://github.com/farijarifriyanto-debug/bccli#readme"'],
146
+ ['Review messages held from other Qwen Code sessions', 'Review messages held from other BCCLI sessions'],
147
+ ['Qwen Code will be able to read, edit, and execute files there.', 'BCCLI will be able to read, edit, and execute files there.'],
148
+ ['Re-run /doctor memory after restarting Qwen Code', 'Re-run /doctor memory after restarting BCCLI'],
149
+ ['restart Qwen Code to recover memory', 'restart BCCLI to recover memory'],
150
+ ['Restart Qwen Code first', 'Restart BCCLI first'],
151
+ ['Right before Qwen Code concludes its response', 'Right before BCCLI concludes its response'],
152
+ ['Manage Qwen Code hooks', 'Manage BCCLI hooks'],
153
+ ['run Qwen Code in one of these supported IDEs', 'run BCCLI in one of these supported IDEs'],
154
+ ['List available Qwen Code tools.', 'List available BCCLI tools.'],
155
+ ['Qwen Code is unavailable in this WSL session', 'BCCLI is unavailable in this WSL session'],
156
+ ['<title>Qwen Code Insights</title>', '<title>BCCLI Insights</title>'],
157
+ ["Set up Qwen Code's status line UI", "Set up BCCLI's status line UI"],
158
+ ['Start Qwen Code with', 'Start BCCLI with'],
159
+
160
+ ]
161
+ let out = text
162
+ for (const [before, after] of labels) out = out.split(before).join(after)
163
+ return out
164
+ }
165
+
166
+ export function patchUiChunk(file, text) {
167
+ if (file === 'chunks/server-SJNWHHV4.js') {
168
+ // An additional bundled server/agent instruction uses an upstream product
169
+ // identity. Neutralize only that exact clause; never invent a model name.
170
+ return replaceOnce(text,
171
+ 'You are Qwen Code, a general-purpose agentic assistant',
172
+ 'You are a general-purpose agentic assistant',
173
+ 'server agent product identity')
174
+ }
175
+ if (file === 'chunks/chunk-OYUATJK2.js') {
176
+ const pattern = /var shortAsciiLogo=\x60[\s\S]*?\x60;/
177
+ const matches = text.match(new RegExp(pattern.source, 'g'))
178
+ if (matches?.length !== 1) throw Error('BCCLI branding logo locator changed upstream.')
179
+ return text.replace(pattern, () => 'var shortAsciiLogo=' + String.fromCharCode(96) + BCCLI_ASCII + String.fromCharCode(96) + ';')
180
+ }
181
+ if (file === 'chunks/startInteractiveUI-CECFAXVK.js') {
182
+ let result = replaceOnce(
183
+ text,
184
+ 'customBannerTitle?customBannerTitle:">_ Qwen Code"',
185
+ 'customBannerTitle?customBannerTitle:">_ BCCLI | BotConnector"',
186
+ 'Ink banner title',
187
+ )
188
+ result = replaceOnce(result,
189
+ 'Add a QWEN.md file to give Qwen Code persistent project context.',
190
+ 'Use /help to explore BCCLI tools and commands.',
191
+ 'Ink startup tip',
192
+ )
193
+ result = replaceOnce(result,
194
+ 'You can resume a previous conversation by running qwen --continue or qwen --resume.',
195
+ 'Continue the latest BCCLI session in this project using bccli -c.',
196
+ 'Ink resume tip')
197
+ result = replaceOnce(result,
198
+ 'You can run any shell commands from Qwen Code using ! (e.g. !ls).',
199
+ 'Run terminal commands with ! (e.g. !ls), subject to your permissions.',
200
+ 'Ink terminal tip')
201
+ result = replaceOnce(result,
202
+ 'qwen --resume ${sessionId}',
203
+ 'bccli -c',
204
+ 'Ink session-exit command')
205
+ return renameProductLanguage(result)
206
+ }
207
+ if (file === 'chunks/start-opentui-ui-Q34XCEMN.js') {
208
+ let result = replaceOnce(
209
+ text, 'custom.title??">_ Qwen Code"', 'custom.title??">_ BCCLI | BotConnector"',
210
+ 'OpenTUI banner title',
211
+ )
212
+ result = replaceOnce(result,
213
+ 'var DEFAULT_GRADIENT=["#4796E4","#847ACE","#C3677F"]',
214
+ 'var DEFAULT_GRADIENT='+JSON.stringify(BCCLI_COLORS),
215
+ 'OpenTUI default gradient')
216
+ result = replaceOnce(result,
217
+ 'addField("Qwen Code",cliVersion',
218
+ 'addField("BCCLI engine",cliVersion',
219
+ 'OpenTUI diagnostic label')
220
+ result = replaceOnce(result,
221
+ 'To continue this session, run qwen --resume ${stats.sessionId}',
222
+ 'To resume the latest session in this project, run bccli -c',
223
+ 'OpenTUI project-quit resume command')
224
+ result = replaceOnce(result,
225
+ 'qwen --resume ${sessionId}',
226
+ 'bccli -c',
227
+ 'OpenTUI transcript resume command')
228
+ return renameProductLanguage(result)
229
+ }
230
+ if (file === 'chunks/chunk-QUFSNRKR.js') {
231
+ return renameProductLanguage(replaceOnce(text,
232
+ 'children:["qwen --resume ",stats.sessionId]',
233
+ 'children:["bccli -c (latest session in this project)", ""]',
234
+ 'Ink summary session-resume command'))
235
+ }
236
+ if (file === 'chunks/chunk-2PLSL3VQ.js') {
237
+ return replaceOnce(text,
238
+ "To enable automatic tool execution, use the -y flag (YOLO mode):" + String.fromCharCode(10) + "Example: qwen -p 'your prompt' -y",
239
+ "BCCLI requires an interactive approval for this tool. Re-run in interactive mode and approve the tool; unattended auto-approval is disabled.",
240
+ 'headless approval warning')
241
+ }
242
+ if (file === 'chunks/chunk-ERV2ECV3.js') {
243
+ return replaceExactly(text,
244
+ 'Qwen Code requires permission to use ',
245
+ 'BCCLI requires permission to use ', 4,
246
+ 'user-facing tool permission errors')
247
+ }
248
+ if (file === 'chunks/chunk-OV3EBH6J.js') {
249
+ return replaceOnce(text,
250
+ 'You are Qwen Code, ${role} developed by Alibaba Group, ${focus}.',
251
+ 'You are an AI coding assistant, ${role}, ${focus}.',
252
+ 'neutral core agent introduction')
253
+ }
254
+ if (file === 'chunks/chunk-W3YCOEIP.js') {
255
+ let result = replaceExactly(
256
+ text,
257
+ 'GradientColors:["#4796E4","#847ACE","#C3677F"]',
258
+ 'GradientColors:'+JSON.stringify(BCCLI_COLORS), 2,
259
+ 'Ink light/dark gradient')
260
+ result = replaceOnce(result,'AccentPurple:"#8B5CF6"','AccentPurple:"#047857"','light brand accent')
261
+ result = replaceOnce(result,'AccentPurple:"#CBA6F7"','AccentPurple:"#34D399"','dark brand accent')
262
+ result = replaceOnce(result,'AccentBlue:"#3B82F6"','AccentBlue:"#0891B2"','light focus blue')
263
+ return replaceOnce(result,'AccentBlue:"#89B4FA"','AccentBlue:"#22D3EE"','dark focus cyan')
264
+ }
265
+ if (file === 'chunks/chunk-7L4WTOM2.js') {
266
+ let result = replaceOnce(text,
267
+ 'https://github.com/QwenLM/qwen-code/issues/new?template=bug_report.yml&title={title}&info={info}',
268
+ 'https://github.com/farijarifriyanto-debug/bccli/issues/new?title={title}&body={info}',
269
+ 'user-facing /bug report link')
270
+ result = replaceOnce(result,
271
+ 'You are Qwen Code, an interactive CLI agent.',
272
+ 'You are an AI coding assistant operating in a terminal.',
273
+ 'neutral project initialization prompt')
274
+ result = guardUpstreamProviderCommands(result)
275
+ result = replaceOnce(result,
276
+ 'get description(){return t("for help on Qwen Code")}',
277
+ 'get description(){return t("BCCLI help and keyboard shortcuts")}',
278
+ 'Help command description')
279
+ return renameProductLanguage(result)
280
+ }
281
+ throw Error('Unrecognized BCCLI branding file.')
282
+ }
283
+
284
+ function assertSource(packageDir) {
285
+ const metadata = JSON.parse(readFileSync(join(packageDir, 'package.json'), 'utf8'))
286
+ if (metadata.name !== '@qwen-code/qwen-code' || metadata.version !== VERSION) {
287
+ throw Error('BCCLI branding needs the pinned Qwen Code engine ' + VERSION + '.')
288
+ }
289
+ const patched = {}
290
+ for (const [relative, expected] of Object.entries(SOURCE_HASHES)) {
291
+ const original = readFileSync(join(packageDir, relative))
292
+ if (digest(original) !== expected) {
293
+ throw Error('Qwen Code view bundle changed: aborting BCCLI branded startup (' + relative + ').')
294
+ }
295
+ patched[relative] = patchUiChunk(relative, original.toString('utf8'))
296
+ }
297
+ return patched
298
+ }
299
+
300
+ function validCache(target, manifest) {
301
+ if (!existsSync(join(target, '.bccli-brand-marker.json'))) return false
302
+ try {
303
+ const stored = JSON.parse(readFileSync(join(target, '.bccli-brand-marker.json'), 'utf8'))
304
+ if (JSON.stringify(stored) !== JSON.stringify(manifest)) return false
305
+ for (const [relative, hash] of Object.entries(manifest.outputHashes)) {
306
+ if (digest(readFileSync(join(target, relative))) !== hash) return false
307
+ }
308
+ return existsSync(join(target, 'cli-entry.js'))
309
+ } catch { return false }
310
+ }
311
+
312
+ /**
313
+ * Make an isolated, revision-pinned white-label copy of the upstream package.
314
+ * No model, provider, tool, permission, or auth logic is modified.
315
+ * The source node_modules/@qwen-code/qwen-code package remains byte-identical.
316
+ */
317
+ export function prepareBrandedQwen(entrypoint, { cacheRoot } = {}) {
318
+ const packageDir = dirname(entrypoint)
319
+ // Keep the copy within the same npm dependency tree so Node resolves native
320
+ // and bundled imports exactly as the installed upstream runtime does.
321
+ cacheRoot ??= join(dirname(dirname(packageDir)), '.cache', 'bccli-branded-engines')
322
+ const patched = assertSource(packageDir)
323
+ const outputHashes = Object.fromEntries(Object.entries(patched).map(([file, value]) => [file, digest(value)]))
324
+ const manifest = { revision: BRAND_REVISION, version: VERSION, sourceHashes: SOURCE_HASHES, outputHashes }
325
+ const target = join(cacheRoot, VERSION + '-' + digest(JSON.stringify(manifest)).slice(0,12))
326
+ if (existsSync(target)) {
327
+ if (!validCache(target, manifest)) throw Error('BCCLI branded engine cache differs from the pinned build; manual cleanup required.')
328
+ return join(target, basename(entrypoint))
329
+ }
330
+ mkdirSync(cacheRoot, { recursive: true })
331
+ const tmp = mkdtempSync(join(cacheRoot, '.building-'))
332
+ try {
333
+ cpSync(packageDir, tmp, { recursive: true, errorOnExist: false })
334
+ for (const [relative, output] of Object.entries(patched)) {
335
+ writeFileSync(join(tmp, relative), output, 'utf8')
336
+ }
337
+ writeFileSync(join(tmp, '.bccli-brand-marker.json'), JSON.stringify(manifest), 'utf8')
338
+ try { renameSync(tmp, target) }
339
+ catch (err) {
340
+ if (!validCache(target, manifest)) throw err
341
+ }
342
+ } finally {
343
+ if (existsSync(tmp)) rmSync(tmp, { recursive: true, force: true })
344
+ }
345
+ if (!validCache(target, manifest)) throw Error('BCCLI branded engine copy failed verification.')
346
+ return join(target, basename(entrypoint))
347
+ }