@botconnector/bccli 0.4.17 → 0.5.0
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.
- package/LICENSE +203 -21
- package/THIRD_PARTY_NOTICES.md +9 -0
- package/branding.mjs +347 -0
- package/cli.mjs +128 -0
- package/core.mjs +260 -0
- package/credentials.mjs +52 -0
- package/gateway.mjs +2 -0
- package/legacy/LICENSE +21 -0
- package/legacy/package.json +77 -0
- package/legacy-compat.mjs +42 -0
- package/model-command.mjs +61 -0
- package/package.json +47 -51
- package/provider-cli.mjs +76 -0
- package/providers.mjs +179 -0
- package/proxy.mjs +242 -0
- package/startup-menu.mjs +121 -0
- /package/{README.en.md → legacy/README.en.md} +0 -0
- /package/{README.md → legacy/README.md} +0 -0
- /package/{dist → legacy/dist}/abort.d.ts +0 -0
- /package/{dist → legacy/dist}/acp-HWHF25KU.js +0 -0
- /package/{dist → legacy/dist}/acp.d.ts +0 -0
- /package/{dist → legacy/dist}/agent.d.ts +0 -0
- /package/{dist → legacy/dist}/agents.d.ts +0 -0
- /package/{dist → legacy/dist}/args-XA77XUMD.js +0 -0
- /package/{dist → legacy/dist}/args.d.ts +0 -0
- /package/{dist → legacy/dist}/budget.d.ts +0 -0
- /package/{dist → legacy/dist}/checkpoints.d.ts +0 -0
- /package/{dist → legacy/dist}/chunk-2IP5F3EK.js +0 -0
- /package/{dist → legacy/dist}/chunk-5CVHTYBQ.js +0 -0
- /package/{dist → legacy/dist}/chunk-6LO6YRDY.js +0 -0
- /package/{dist → legacy/dist}/chunk-6PJRWKVI.js +0 -0
- /package/{dist → legacy/dist}/chunk-7OTFZK4B.js +0 -0
- /package/{dist → legacy/dist}/chunk-7U7CMKKI.js +0 -0
- /package/{dist → legacy/dist}/chunk-A3NBWIEQ.js +0 -0
- /package/{dist → legacy/dist}/chunk-FY543EQW.js +0 -0
- /package/{dist → legacy/dist}/chunk-IDZLHEVL.js +0 -0
- /package/{dist → legacy/dist}/chunk-IF5RNXBI.js +0 -0
- /package/{dist → legacy/dist}/chunk-M5T4AM4I.js +0 -0
- /package/{dist → legacy/dist}/chunk-NGFWBVHD.js +0 -0
- /package/{dist → legacy/dist}/chunk-OCEQ2TRJ.js +0 -0
- /package/{dist → legacy/dist}/chunk-OK2USAXX.js +0 -0
- /package/{dist → legacy/dist}/chunk-PSO7R5AD.js +0 -0
- /package/{dist → legacy/dist}/chunk-RLSQAZBT.js +0 -0
- /package/{dist → legacy/dist}/chunk-VPFCIUC6.js +0 -0
- /package/{dist → legacy/dist}/chunk-XP5MTJN2.js +0 -0
- /package/{dist → legacy/dist}/chunk-YGBTNDPK.js +0 -0
- /package/{dist → legacy/dist}/chunk-YYTFJUO2.js +0 -0
- /package/{dist → legacy/dist}/chunk-ZXWRLN7E.js +0 -0
- /package/{dist → legacy/dist}/cli.d.ts +0 -0
- /package/{dist → legacy/dist}/cli.js +0 -0
- /package/{dist → legacy/dist}/clipboardImage.d.ts +0 -0
- /package/{dist → legacy/dist}/commands.d.ts +0 -0
- /package/{dist → legacy/dist}/completion-IRVEVW6H.js +0 -0
- /package/{dist → legacy/dist}/completion.d.ts +0 -0
- /package/{dist → legacy/dist}/config-OVWCUVY7.js +0 -0
- /package/{dist → legacy/dist}/config-S3CZUIBB.js +0 -0
- /package/{dist → legacy/dist}/config.d.ts +0 -0
- /package/{dist → legacy/dist}/context.d.ts +0 -0
- /package/{dist → legacy/dist}/contextWindow.d.ts +0 -0
- /package/{dist → legacy/dist}/diff.d.ts +0 -0
- /package/{dist → legacy/dist}/exit.d.ts +0 -0
- /package/{dist → legacy/dist}/extensions.d.ts +0 -0
- /package/{dist → legacy/dist}/ghBotCli-FYKJDJOD.js +0 -0
- /package/{dist → legacy/dist}/ghBotCli.d.ts +0 -0
- /package/{dist → legacy/dist}/ghBotDispatch.d.ts +0 -0
- /package/{dist → legacy/dist}/ghBotRunner.d.ts +0 -0
- /package/{dist → legacy/dist}/ghBotServe.d.ts +0 -0
- /package/{dist → legacy/dist}/ghBotWebhook.d.ts +0 -0
- /package/{dist → legacy/dist}/hooks.d.ts +0 -0
- /package/{dist → legacy/dist}/i18n/id.d.ts +0 -0
- /package/{dist → legacy/dist}/i18n.d.ts +0 -0
- /package/{dist → legacy/dist}/integrationCli-GY73S2K7.js +0 -0
- /package/{dist → legacy/dist}/integrationCli.d.ts +0 -0
- /package/{dist → legacy/dist}/keybinds.d.ts +0 -0
- /package/{dist → legacy/dist}/login-KSN63EM4.js +0 -0
- /package/{dist → legacy/dist}/login.d.ts +0 -0
- /package/{dist → legacy/dist}/lsp.d.ts +0 -0
- /package/{dist → legacy/dist}/mcp/catalog.d.ts +0 -0
- /package/{dist → legacy/dist}/mcp/config.d.ts +0 -0
- /package/{dist → legacy/dist}/mcp/manager.d.ts +0 -0
- /package/{dist → legacy/dist}/mcp/oauth.d.ts +0 -0
- /package/{dist → legacy/dist}/mcpCli-VWSCCDWT.js +0 -0
- /package/{dist → legacy/dist}/mcpCli.d.ts +0 -0
- /package/{dist → legacy/dist}/mcpServer/serve.d.ts +0 -0
- /package/{dist → legacy/dist}/mcpServer/server.d.ts +0 -0
- /package/{dist → legacy/dist}/models.d.ts +0 -0
- /package/{dist → legacy/dist}/modelsCli-4Q6KFWV2.js +0 -0
- /package/{dist → legacy/dist}/modelsCli.d.ts +0 -0
- /package/{dist → legacy/dist}/npmRunner-LU43GM3W.js +0 -0
- /package/{dist → legacy/dist}/npmRunner.d.ts +0 -0
- /package/{dist → legacy/dist}/oauthLogin-JWXQZTMZ.js +0 -0
- /package/{dist → legacy/dist}/oauthLogin.d.ts +0 -0
- /package/{dist → legacy/dist}/permissions.d.ts +0 -0
- /package/{dist → legacy/dist}/pluginSpec.d.ts +0 -0
- /package/{dist → legacy/dist}/plugins.d.ts +0 -0
- /package/{dist → legacy/dist}/pluginsCli-7XWDLJEL.js +0 -0
- /package/{dist → legacy/dist}/pluginsCli.d.ts +0 -0
- /package/{dist → legacy/dist}/prCli-FH7N26D4.js +0 -0
- /package/{dist → legacy/dist}/prCli.d.ts +0 -0
- /package/{dist → legacy/dist}/presets.d.ts +0 -0
- /package/{dist → legacy/dist}/print.d.ts +0 -0
- /package/{dist → legacy/dist}/provider.d.ts +0 -0
- /package/{dist → legacy/dist}/providerCli-YMG4G56R.js +0 -0
- /package/{dist → legacy/dist}/providerCli.d.ts +0 -0
- /package/{dist → legacy/dist}/providers.d.ts +0 -0
- /package/{dist → legacy/dist}/reasoning.d.ts +0 -0
- /package/{dist → legacy/dist}/repomap.d.ts +0 -0
- /package/{dist → legacy/dist}/sdk.d.ts +0 -0
- /package/{dist → legacy/dist}/sdk.js +0 -0
- /package/{dist → legacy/dist}/serve-HSFF6MGB.js +0 -0
- /package/{dist → legacy/dist}/serve-HUQNVOSP.js +0 -0
- /package/{dist → legacy/dist}/serve.d.ts +0 -0
- /package/{dist → legacy/dist}/serveHeartbeat.d.ts +0 -0
- /package/{dist → legacy/dist}/serveProtocol.d.ts +0 -0
- /package/{dist → legacy/dist}/session-YM36TGU7.js +0 -0
- /package/{dist → legacy/dist}/session.d.ts +0 -0
- /package/{dist → legacy/dist}/setup-3YB6EKYX.js +0 -0
- /package/{dist → legacy/dist}/setup.d.ts +0 -0
- /package/{dist → legacy/dist}/slash/copy.d.ts +0 -0
- /package/{dist → legacy/dist}/slash/diff.d.ts +0 -0
- /package/{dist → legacy/dist}/slash/doctor.d.ts +0 -0
- /package/{dist → legacy/dist}/slash/export.d.ts +0 -0
- /package/{dist → legacy/dist}/slash/info.d.ts +0 -0
- /package/{dist → legacy/dist}/slash/memory.d.ts +0 -0
- /package/{dist → legacy/dist}/statsCli-I4TSDU3X.js +0 -0
- /package/{dist → legacy/dist}/statsCli.d.ts +0 -0
- /package/{dist → legacy/dist}/textToolCalls.d.ts +0 -0
- /package/{dist → legacy/dist}/thinking.d.ts +0 -0
- /package/{dist → legacy/dist}/tokenBudget.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/bash.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/diagnostics.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/edit.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/fetch.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/glob.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/globSafety.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/grep.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/ignore.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/index.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/memory.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/paths.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/plan.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/read.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/repomap.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/sandbox.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/shell.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/skill.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/task.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/todo.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/types.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/websearch.d.ts +0 -0
- /package/{dist → legacy/dist}/tools/write.d.ts +0 -0
- /package/{dist → legacy/dist}/transferCli-3B4LMOYI.js +0 -0
- /package/{dist → legacy/dist}/transferCli.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/App.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/DiffView.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/EditableText.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/LinePrompt.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/ListPicker.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/Markdown.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/McpMenu.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/ModelPicker.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/PermissionPrompt.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/PlanApproval.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/PromptInput.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/ProviderMenu.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/Spinner.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/StatusBar.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/TodoList.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/ToolBlock.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/complete.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/index.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/lineEdit.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/liveCap.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/markdownLayout.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/replay.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/stdinFilter.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/table.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/theme.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/thinkingMouse.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/transcript.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/tty.d.ts +0 -0
- /package/{dist → legacy/dist}/ui/vim.d.ts +0 -0
- /package/{dist → legacy/dist}/ui-TAZMRXRI.js +0 -0
- /package/{dist → legacy/dist}/update-5V425FIK.js +0 -0
- /package/{dist → legacy/dist}/update.d.ts +0 -0
- /package/{dist → legacy/dist}/verify.d.ts +0 -0
- /package/{dist → legacy/dist}/version.d.ts +0 -0
- /package/{dist → legacy/dist}/webBudget.d.ts +0 -0
- /package/{dist → legacy/dist}/worktree.d.ts +0 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,203 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
+
}
|