@botconnector/bccli 0.5.0-rc.4 → 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/cli.mjs +14 -6
- package/legacy/LICENSE +21 -0
- package/legacy/README.en.md +253 -0
- package/legacy/README.md +250 -0
- package/legacy/dist/abort.d.ts +5 -0
- package/legacy/dist/acp-HWHF25KU.js +221 -0
- package/legacy/dist/acp.d.ts +44 -0
- package/legacy/dist/agent.d.ts +158 -0
- package/legacy/dist/agents.d.ts +4 -0
- package/legacy/dist/args-XA77XUMD.js +13 -0
- package/legacy/dist/args.d.ts +59 -0
- package/legacy/dist/budget.d.ts +26 -0
- package/legacy/dist/checkpoints.d.ts +35 -0
- package/legacy/dist/chunk-2IP5F3EK.js +56 -0
- package/legacy/dist/chunk-5CVHTYBQ.js +270 -0
- package/legacy/dist/chunk-6LO6YRDY.js +216 -0
- package/legacy/dist/chunk-6PJRWKVI.js +50 -0
- package/legacy/dist/chunk-7OTFZK4B.js +159 -0
- package/legacy/dist/chunk-7U7CMKKI.js +861 -0
- package/legacy/dist/chunk-A3NBWIEQ.js +2706 -0
- package/legacy/dist/chunk-FY543EQW.js +50 -0
- package/legacy/dist/chunk-IDZLHEVL.js +524 -0
- package/legacy/dist/chunk-IF5RNXBI.js +341 -0
- package/legacy/dist/chunk-M5T4AM4I.js +256 -0
- package/legacy/dist/chunk-NGFWBVHD.js +71 -0
- package/legacy/dist/chunk-OCEQ2TRJ.js +1075 -0
- package/legacy/dist/chunk-OK2USAXX.js +88 -0
- package/legacy/dist/chunk-PSO7R5AD.js +10 -0
- package/legacy/dist/chunk-RLSQAZBT.js +78 -0
- package/legacy/dist/chunk-VPFCIUC6.js +91 -0
- package/legacy/dist/chunk-XP5MTJN2.js +8 -0
- package/legacy/dist/chunk-YGBTNDPK.js +202 -0
- package/legacy/dist/chunk-YYTFJUO2.js +148 -0
- package/legacy/dist/chunk-ZXWRLN7E.js +378 -0
- package/legacy/dist/cli.d.ts +1 -0
- package/legacy/dist/cli.js +233 -0
- package/legacy/dist/clipboardImage.d.ts +17 -0
- package/legacy/dist/commands.d.ts +16 -0
- package/legacy/dist/completion-IRVEVW6H.js +125 -0
- package/legacy/dist/completion.d.ts +14 -0
- package/legacy/dist/config-OVWCUVY7.js +25 -0
- package/legacy/dist/config-S3CZUIBB.js +34 -0
- package/legacy/dist/config.d.ts +99 -0
- package/legacy/dist/context.d.ts +13 -0
- package/legacy/dist/contextWindow.d.ts +3 -0
- package/legacy/dist/diff.d.ts +7 -0
- package/legacy/dist/exit.d.ts +9 -0
- package/legacy/dist/extensions.d.ts +34 -0
- package/legacy/dist/ghBotCli-FYKJDJOD.js +680 -0
- package/legacy/dist/ghBotCli.d.ts +9 -0
- package/legacy/dist/ghBotDispatch.d.ts +68 -0
- package/legacy/dist/ghBotRunner.d.ts +82 -0
- package/legacy/dist/ghBotServe.d.ts +21 -0
- package/legacy/dist/ghBotWebhook.d.ts +45 -0
- package/legacy/dist/hooks.d.ts +27 -0
- package/legacy/dist/i18n/id.d.ts +1 -0
- package/legacy/dist/i18n.d.ts +16 -0
- package/legacy/dist/integrationCli-GY73S2K7.js +876 -0
- package/legacy/dist/integrationCli.d.ts +9 -0
- package/legacy/dist/keybinds.d.ts +22 -0
- package/legacy/dist/login-KSN63EM4.js +18 -0
- package/legacy/dist/login.d.ts +21 -0
- package/legacy/dist/lsp.d.ts +73 -0
- package/legacy/dist/mcp/catalog.d.ts +14 -0
- package/legacy/dist/mcp/config.d.ts +36 -0
- package/legacy/dist/mcp/manager.d.ts +52 -0
- package/legacy/dist/mcp/oauth.d.ts +82 -0
- package/legacy/dist/mcpCli-VWSCCDWT.js +113 -0
- package/legacy/dist/mcpCli.d.ts +3 -0
- package/legacy/dist/mcpServer/serve.d.ts +8 -0
- package/legacy/dist/mcpServer/server.d.ts +19 -0
- package/legacy/dist/models.d.ts +13 -0
- package/legacy/dist/modelsCli-4Q6KFWV2.js +36 -0
- package/legacy/dist/modelsCli.d.ts +15 -0
- package/legacy/dist/npmRunner-LU43GM3W.js +46 -0
- package/legacy/dist/npmRunner.d.ts +21 -0
- package/legacy/dist/oauthLogin-JWXQZTMZ.js +210 -0
- package/legacy/dist/oauthLogin.d.ts +47 -0
- package/legacy/dist/permissions.d.ts +30 -0
- package/legacy/dist/pluginSpec.d.ts +25 -0
- package/legacy/dist/plugins.d.ts +45 -0
- package/legacy/dist/pluginsCli-7XWDLJEL.js +288 -0
- package/legacy/dist/pluginsCli.d.ts +16 -0
- package/legacy/dist/prCli-FH7N26D4.js +94 -0
- package/legacy/dist/prCli.d.ts +46 -0
- package/legacy/dist/presets.d.ts +8 -0
- package/legacy/dist/print.d.ts +17 -0
- package/legacy/dist/provider.d.ts +145 -0
- package/legacy/dist/providerCli-YMG4G56R.js +15 -0
- package/legacy/dist/providerCli.d.ts +17 -0
- package/legacy/dist/providers.d.ts +6 -0
- package/legacy/dist/reasoning.d.ts +12 -0
- package/legacy/dist/repomap.d.ts +10 -0
- package/legacy/dist/sdk.d.ts +61 -0
- package/legacy/dist/sdk.js +6532 -0
- package/legacy/dist/serve-HSFF6MGB.js +178 -0
- package/legacy/dist/serve-HUQNVOSP.js +532 -0
- package/legacy/dist/serve.d.ts +37 -0
- package/legacy/dist/serveHeartbeat.d.ts +14 -0
- package/legacy/dist/serveProtocol.d.ts +47 -0
- package/legacy/dist/session-YM36TGU7.js +12 -0
- package/legacy/dist/session.d.ts +33 -0
- package/legacy/dist/setup-3YB6EKYX.js +24 -0
- package/legacy/dist/setup.d.ts +79 -0
- package/legacy/dist/slash/copy.d.ts +1 -0
- package/legacy/dist/slash/diff.d.ts +1 -0
- package/legacy/dist/slash/doctor.d.ts +18 -0
- package/legacy/dist/slash/export.d.ts +2 -0
- package/legacy/dist/slash/info.d.ts +46 -0
- package/legacy/dist/slash/memory.d.ts +10 -0
- package/legacy/dist/statsCli-I4TSDU3X.js +353 -0
- package/legacy/dist/statsCli.d.ts +62 -0
- package/legacy/dist/textToolCalls.d.ts +6 -0
- package/legacy/dist/thinking.d.ts +17 -0
- package/legacy/dist/tokenBudget.d.ts +22 -0
- package/legacy/dist/tools/bash.d.ts +54 -0
- package/legacy/dist/tools/diagnostics.d.ts +13 -0
- package/legacy/dist/tools/edit.d.ts +12 -0
- package/legacy/dist/tools/fetch.d.ts +41 -0
- package/legacy/dist/tools/glob.d.ts +5 -0
- package/legacy/dist/tools/globSafety.d.ts +7 -0
- package/legacy/dist/tools/grep.d.ts +25 -0
- package/legacy/dist/tools/ignore.d.ts +2 -0
- package/legacy/dist/tools/index.d.ts +12 -0
- package/legacy/dist/tools/memory.d.ts +13 -0
- package/legacy/dist/tools/paths.d.ts +4 -0
- package/legacy/dist/tools/plan.d.ts +10 -0
- package/legacy/dist/tools/read.d.ts +16 -0
- package/legacy/dist/tools/repomap.d.ts +2 -0
- package/legacy/dist/tools/sandbox.d.ts +15 -0
- package/legacy/dist/tools/shell.d.ts +18 -0
- package/legacy/dist/tools/skill.d.ts +3 -0
- package/legacy/dist/tools/task.d.ts +28 -0
- package/legacy/dist/tools/todo.d.ts +13 -0
- package/legacy/dist/tools/types.d.ts +52 -0
- package/legacy/dist/tools/websearch.d.ts +9 -0
- package/legacy/dist/tools/write.d.ts +5 -0
- package/legacy/dist/transferCli-3B4LMOYI.js +73 -0
- package/legacy/dist/transferCli.d.ts +23 -0
- package/legacy/dist/ui/App.d.ts +7 -0
- package/legacy/dist/ui/DiffView.d.ts +3 -0
- package/legacy/dist/ui/EditableText.d.ts +7 -0
- package/legacy/dist/ui/LinePrompt.d.ts +6 -0
- package/legacy/dist/ui/ListPicker.d.ts +11 -0
- package/legacy/dist/ui/Markdown.d.ts +8 -0
- package/legacy/dist/ui/McpMenu.d.ts +11 -0
- package/legacy/dist/ui/ModelPicker.d.ts +6 -0
- package/legacy/dist/ui/PermissionPrompt.d.ts +5 -0
- package/legacy/dist/ui/PlanApproval.d.ts +5 -0
- package/legacy/dist/ui/PromptInput.d.ts +20 -0
- package/legacy/dist/ui/ProviderMenu.d.ts +10 -0
- package/legacy/dist/ui/Spinner.d.ts +4 -0
- package/legacy/dist/ui/StatusBar.d.ts +14 -0
- package/legacy/dist/ui/TodoList.d.ts +4 -0
- package/legacy/dist/ui/ToolBlock.d.ts +14 -0
- package/legacy/dist/ui/complete.d.ts +8 -0
- package/legacy/dist/ui/index.d.ts +7 -0
- package/legacy/dist/ui/lineEdit.d.ts +42 -0
- package/legacy/dist/ui/liveCap.d.ts +29 -0
- package/legacy/dist/ui/markdownLayout.d.ts +23 -0
- package/legacy/dist/ui/replay.d.ts +4 -0
- package/legacy/dist/ui/stdinFilter.d.ts +18 -0
- package/legacy/dist/ui/table.d.ts +20 -0
- package/legacy/dist/ui/theme.d.ts +5 -0
- package/legacy/dist/ui/thinkingMouse.d.ts +38 -0
- package/legacy/dist/ui/transcript.d.ts +55 -0
- package/legacy/dist/ui/tty.d.ts +11 -0
- package/legacy/dist/ui/vim.d.ts +26 -0
- package/legacy/dist/ui-TAZMRXRI.js +3044 -0
- package/legacy/dist/update-5V425FIK.js +145 -0
- package/legacy/dist/update.d.ts +30 -0
- package/legacy/dist/verify.d.ts +16 -0
- package/legacy/dist/version.d.ts +1 -0
- package/legacy/dist/webBudget.d.ts +25 -0
- package/legacy/dist/worktree.d.ts +12 -0
- package/legacy/package.json +77 -0
- package/legacy-compat.mjs +42 -0
- package/package.json +24 -4
- package/provider-cli.mjs +1 -2
- package/providers.mjs +19 -6
- package/startup-menu.mjs +14 -13
package/cli.mjs
CHANGED
|
@@ -3,9 +3,10 @@ import { readFileSync } from 'node:fs'
|
|
|
3
3
|
import { DEFAULT_MODEL, assertCandidateRuntimeSupported, discoverModels, launchQwen, parseArgs, resolveQwenEntrypoint, resolveTrustedMcpConfig, selectModel } from './core.mjs'
|
|
4
4
|
import { prepareBrandedQwen } from './branding.mjs'
|
|
5
5
|
import { botConnectorCredentialStatus } from './credentials.mjs'
|
|
6
|
-
import { resolveProvider, selectedProvider, providerDefinition } from './providers.mjs'
|
|
6
|
+
import { resolveProvider, selectedProvider, providerDefinition, isConfigured } from './providers.mjs'
|
|
7
7
|
import { runProviderCommand } from './provider-cli.mjs'
|
|
8
8
|
import { startupMenu, autoSelectStartup, PROVIDER_SWITCH_EXIT } from './startup-menu.mjs'
|
|
9
|
+
import { legacyCompatibilityMode, runLegacyCli } from './legacy-compat.mjs'
|
|
9
10
|
|
|
10
11
|
function help() {
|
|
11
12
|
console.log([
|
|
@@ -20,6 +21,10 @@ function help() {
|
|
|
20
21
|
' bccli -c [-m MODEL] [prompt] (resume latest current-project session)',
|
|
21
22
|
' bccli -r [SESSION_UUID] [-m MODEL] (native Qwen session picker or specific session)',
|
|
22
23
|
' bccli auth status (offline; does not print API key)',
|
|
24
|
+
' bccli provider add botconnector (enter a new Cloud key securely)',
|
|
25
|
+
' bccli provider remove botconnector (remove only the newly saved key)',
|
|
26
|
+
' bccli mcp|connect|acp|serve|plugins|completion|stats (legacy-compatible)',
|
|
27
|
+
' bccli -p "task" --output-format json|stream-json (legacy-compatible)',
|
|
23
28
|
' bccli provider list|add|use|remove [ID] (manage provider keys)',
|
|
24
29
|
' bccli models --provider ID (list models for provider)',
|
|
25
30
|
' bccli chat --provider ID --model MODEL_ID',
|
|
@@ -27,9 +32,9 @@ function help() {
|
|
|
27
32
|
' bccli --choose (open provider/model picker explicitly)',
|
|
28
33
|
' During chat: /provider or /auth to reopen provider and key picker.',
|
|
29
34
|
'',
|
|
30
|
-
'Credentials:
|
|
35
|
+
'Credentials: hidden in-terminal input; Windows DPAPI encrypted per-user storage, or existing login/env.',
|
|
31
36
|
'Provider choices: botconnector, openai, openrouter, deepseek, groq, xai.',
|
|
32
|
-
'Key entry: bccli provider add
|
|
37
|
+
'Key entry: bccli --choose or bccli provider add botconnector (hidden terminal prompt).',
|
|
33
38
|
'Model choice: --model; BotConnector defaults to ling-3.0-flash. Other providers need --model.',
|
|
34
39
|
'Security: allowlisted provider endpoints, ephemeral local token, --bare and default approvals.',
|
|
35
40
|
'MCP: explicit JSON only, directly under ~/.bccli-preview/ (no project configs).',
|
|
@@ -40,6 +45,7 @@ function help() {
|
|
|
40
45
|
|
|
41
46
|
async function main() {
|
|
42
47
|
const argv = process.argv.slice(2)
|
|
48
|
+
if (legacyCompatibilityMode(argv)) return runLegacyCli(argv)
|
|
43
49
|
if (argv.length === 0 && !process.stdin.isTTY) { help(); return 2 }
|
|
44
50
|
if (argv[0] === '--help' || argv[0] === '-h' || argv[0] === 'help') { help(); return 0 }
|
|
45
51
|
if (argv.length === 1 && (argv[0] === '--version' || argv[0] === '-v')) {
|
|
@@ -53,14 +59,16 @@ async function main() {
|
|
|
53
59
|
if (args.command === 'provider') return runProviderCommand(args.prompt.trim() ? args.prompt.trim().split(/\s+/) : [])
|
|
54
60
|
if (args.command === 'auth') {
|
|
55
61
|
const status = botConnectorCredentialStatus()
|
|
56
|
-
if (
|
|
62
|
+
if (isConfigured('botconnector')) {
|
|
57
63
|
console.log('BotConnector credential configured via ' +
|
|
58
|
-
(status.
|
|
64
|
+
(status.configured
|
|
65
|
+
? (status.source === 'environment' ? 'BOTCONNECTOR_API_KEY environment variable.' : 'existing public BCCLI bc-cloud login or new protected BCCLI key.')
|
|
66
|
+
: 'protected BCCLI provider storage.') +
|
|
59
67
|
' Not verified online. No AI request was sent.')
|
|
60
68
|
return 0
|
|
61
69
|
}
|
|
62
70
|
console.error('BotConnector credential not configured or unreadable. ' +
|
|
63
|
-
'
|
|
71
|
+
'Run "bccli provider add botconnector" or set BOTCONNECTOR_API_KEY. ' +
|
|
64
72
|
'No credential was changed and no AI request was sent.')
|
|
65
73
|
return 1
|
|
66
74
|
}
|
package/legacy/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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.
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# BCCLI
|
|
2
|
+
|
|
3
|
+
[English](README.en.md) · **Bahasa Indonesia**
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@botconnector/bccli?activeTab=versions)
|
|
6
|
+
[](https://www.npmjs.com/package/@botconnector/bccli)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://botconnector.id/id/download)
|
|
10
|
+
|
|
11
|
+
An AI coding agent from [BotConnector](https://botconnector.id/) that works in your terminal: it reads code,
|
|
12
|
+
edits files, and runs commands — with your permission.
|
|
13
|
+
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
*Real session recording: BCCLI creates `hello.js` and runs it with `node`.*
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# one-line install (macOS / Linux / WSL2) — provisions a portable Node if needed, no sudo
|
|
20
|
+
curl -fsSL https://raw.githubusercontent.com/farijarifriyanto-debug/bccli/main/install.sh | bash
|
|
21
|
+
|
|
22
|
+
# Windows (PowerShell 5.1+) — needs Node.js 22+ already installed
|
|
23
|
+
irm https://raw.githubusercontent.com/farijarifriyanto-debug/bccli/main/install.ps1 | iex
|
|
24
|
+
|
|
25
|
+
# or manual, if you already have Node.js 22+
|
|
26
|
+
npm i -g @botconnector/bccli # latest stable, requires Node.js 22+
|
|
27
|
+
npm i -g @botconnector/bccli@next # …or the next prerelease
|
|
28
|
+
bccli login # store your BotConnector Cloud API key
|
|
29
|
+
cd your-project && bccli
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
| Command | What it does |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `bccli` | interactive mode |
|
|
37
|
+
| `bccli -p "task"` | one-shot task (scripts/CI) |
|
|
38
|
+
| `bccli -p "task" --output-format json` | final result as a single JSON object; `stream-json` = JSONL events per stage (tool_use/tool_result/message/result) for CI |
|
|
39
|
+
| `bccli -c` / `bccli -r` | continue last session / pick a session |
|
|
40
|
+
| `bccli -m provider/model` | choose a model |
|
|
41
|
+
| `bccli --reasoning <auto\|off\|low\|medium\|high\|max>` | set reasoning level for this invocation |
|
|
42
|
+
| `bccli models` | list models |
|
|
43
|
+
|
|
44
|
+
In-session commands (type `/` for suggestions, ↑↓ to select, Enter to run):
|
|
45
|
+
|
|
46
|
+
| Command | What it does |
|
|
47
|
+
|---|---|
|
|
48
|
+
| `/help` | list commands and shortcuts |
|
|
49
|
+
| `/model` | switch model |
|
|
50
|
+
| `/reasoning` | pick Auto / Off / Low / Medium / High / Max |
|
|
51
|
+
| `/provider` | add/select an AI provider |
|
|
52
|
+
| `/language` | change display language (`en` / `id`) |
|
|
53
|
+
| `/mcp` | install/manage MCP servers |
|
|
54
|
+
| `/new` | new session (old sessions are kept) |
|
|
55
|
+
| `/resume` | continue another session in this folder |
|
|
56
|
+
| `/session` | info about this session |
|
|
57
|
+
| `/status` | version, model, permission mode, MCP, context |
|
|
58
|
+
| `/permissions` | view/revoke permissions |
|
|
59
|
+
| `/pr` | review a pull request (`/pr <n\|url\|branch>`) |
|
|
60
|
+
| `/worktree` | list git worktrees; create one with `bccli -w <name>` |
|
|
61
|
+
| `/undo` | undo the last file-edit turn |
|
|
62
|
+
| `/redo` | re-apply the file edits that /undo just reverted |
|
|
63
|
+
| `/rewind` | step back turns: conversation + file edits (`/rewind 2`) |
|
|
64
|
+
| `/diff` | git diff of the project |
|
|
65
|
+
| `/copy` | copy the last answer |
|
|
66
|
+
| `/export` | save the conversation to markdown |
|
|
67
|
+
| `/memory` | project instructions (/memory <text>, /memory global <text>) |
|
|
68
|
+
| `/init` | create/update AGENTS.md for this project |
|
|
69
|
+
| `/agents` | list subagents |
|
|
70
|
+
| `/tasks` | list background tasks |
|
|
71
|
+
| `/skills` | list skills and custom commands |
|
|
72
|
+
| `/doctor` | check installation health |
|
|
73
|
+
| `/login` | store the active provider's API key |
|
|
74
|
+
| `/logout` | remove the active provider's API key |
|
|
75
|
+
| `/clear` | start a fresh conversation |
|
|
76
|
+
| `/compact` | compact the conversation |
|
|
77
|
+
| `/cost` | token usage for this session |
|
|
78
|
+
| `/exit` | quit |
|
|
79
|
+
|
|
80
|
+
`/undo` only reverts file edit/write tool changes (not bash commands), one turn at a time, up to 20 turns back.
|
|
81
|
+
Shift+Tab cycles permission modes: `default` → `acceptEdits` → `plan` → `allowAll`.
|
|
82
|
+
|
|
83
|
+
Reading a secret file (`.env`, `.ssh`, `.aws`, `id_rsa`, `*.pem`, `*.key`, `secret*`,
|
|
84
|
+
`credential*`) always asks for approval; `allowAll` is the only mode that does not, and the
|
|
85
|
+
approval cannot be granted "for this session".
|
|
86
|
+
|
|
87
|
+
`-p` mode never prompts: permission-requiring tools are refused unless you pass
|
|
88
|
+
`--allow-all` or `--allowed-tools bash,edit,fetch`.
|
|
89
|
+
|
|
90
|
+
## Language
|
|
91
|
+
|
|
92
|
+
BCCLI's UI (help, messages, permission prompts) is **English by default**. Indonesian stays available:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
bccli --lang id # one-off
|
|
96
|
+
BCCLI_LANG=id bccli # via environment
|
|
97
|
+
/language id # inside a session; stored in ~/.bccli/config.json ("language")
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Priority order: `--lang`, then `BCCLI_LANG`, then `language` in config, then English. The model answers in
|
|
101
|
+
the language you write; tool messages the model reads (tool output, errors) are always English so they
|
|
102
|
+
don't distort the reply language.
|
|
103
|
+
|
|
104
|
+
## Providers
|
|
105
|
+
|
|
106
|
+
`/provider` in a session (or `bccli provider add <id>`) adds a provider with just an API key:
|
|
107
|
+
|
|
108
|
+
| Id | Provider |
|
|
109
|
+
|---|---|
|
|
110
|
+
| `bc-cloud` | BotConnector Cloud (default) |
|
|
111
|
+
| `openrouter` | OpenRouter |
|
|
112
|
+
| `openai` | OpenAI |
|
|
113
|
+
| `gemini` | Google Gemini |
|
|
114
|
+
| `deepseek` | DeepSeek |
|
|
115
|
+
| `groq` | Groq |
|
|
116
|
+
| `ollama-cloud` | Ollama Cloud |
|
|
117
|
+
| `ollama` | local Ollama (no key) |
|
|
118
|
+
| `lmstudio` | local LM Studio (no key) |
|
|
119
|
+
|
|
120
|
+
Any other OpenAI-compatible provider: pick **Custom…** in `/provider`, or
|
|
121
|
+
`bccli provider add corp --url https://corp.example/v1 --name "Corp"`.
|
|
122
|
+
|
|
123
|
+
`/model` lists models from **every** provider that has a key, grouped by provider;
|
|
124
|
+
type to filter. Your choice is saved as the default.
|
|
125
|
+
|
|
126
|
+
Reasoning can be set via `bccli --reasoning <auto|off|low|medium|high|max>` or `/reasoning`.
|
|
127
|
+
**Auto** uses the model/provider default and BCCLI sends no reasoning override. BCCLI never
|
|
128
|
+
silently lowers or raises reasoning effort. Manual levels pass through when the provider/model
|
|
129
|
+
contract supports them; unsupported levels produce a clear error instead of a silent downgrade.
|
|
130
|
+
|
|
131
|
+
`.bccli/config.json` inside a project may only pick a `model` and add new keyless providers —
|
|
132
|
+
the `reasoning` preference is read only from the user config `~/.bccli/config.json`, never from a
|
|
133
|
+
cloned repo — permissions (`permissionMode`, `allow`) and existing providers are configured only
|
|
134
|
+
from `~/.bccli/config.json`, so a cloned repo cannot grant itself full permissions or steal API keys.
|
|
135
|
+
|
|
136
|
+
Every key of `~/.bccli/config.json` with its values and scope: [`docs/config.md`](docs/config.md).
|
|
137
|
+
|
|
138
|
+
## External agent integrations
|
|
139
|
+
|
|
140
|
+
BCCLI can set up BotConnector as a provider for other agents:
|
|
141
|
+
|
|
142
|
+
| Command | What it does |
|
|
143
|
+
|---|---|
|
|
144
|
+
| `bccli integrations` | show integration status |
|
|
145
|
+
| `bccli connect opencode` | connect OpenCode to BotConnector |
|
|
146
|
+
| `bccli connect aider` | connect Aider to BotConnector |
|
|
147
|
+
| `bccli connect cline` | connect Cline CLI to BotConnector |
|
|
148
|
+
| `bccli connect deepseek-harness` / `bccli connect dsh` | connect DeepSeek Harness to BotConnector |
|
|
149
|
+
| `bccli connect codex` | create Codex Responses API profile + BotConnector launcher |
|
|
150
|
+
| `bccli connect claude-code` | create a Claude Code launcher via Anthropic Messages compatibility |
|
|
151
|
+
| `bccli connect cursor` | guided Cursor setup + Base URL override warning |
|
|
152
|
+
| `bccli connect openai-cli` | create an OpenAI CLI launcher for BotConnector |
|
|
153
|
+
| `bccli connect openai-sdk` | create an env profile for the OpenAI Python/Node SDK |
|
|
154
|
+
| `bccli connect openai-compatible` | create a universal OpenAI-compatible env profile |
|
|
155
|
+
| `bccli disconnect <agent>` | restore the config from before the integration |
|
|
156
|
+
|
|
157
|
+
OpenCode uses the global config `~/.config/opencode/opencode.json`. BCCLI fetches the BotConnector
|
|
158
|
+
model catalog on connect, preserves other providers' config, and stores secrets in a separate file
|
|
159
|
+
under `~/.bccli/integrations/`.
|
|
160
|
+
Aider uses `~/.aider.conf.yml` pointing at a separate BCCLI env file; BCCLI refuses to overwrite
|
|
161
|
+
existing Aider OpenAI/env-file settings.
|
|
162
|
+
|
|
163
|
+
Cline uses an `openai-compatible` provider in `~/.cline/data/settings/providers.json`. If that slot
|
|
164
|
+
is taken by another endpoint, BCCLI refuses to overwrite it. Cline itself stores provider API keys
|
|
165
|
+
in that file.
|
|
166
|
+
|
|
167
|
+
DeepSeek Harness uses a custom `botconnector` provider in `$DSH_HOME/settings.yaml` with
|
|
168
|
+
`api: openai-completions` and `apiKeyEnv: BOTCONNECTOR_API_KEY`; the key goes in the BCCLI block of
|
|
169
|
+
`$DSH_HOME/.env`. Other DSH providers are kept. After connecting, run the web profile with
|
|
170
|
+
`dsh web` (same as `dsh --profile web`); bare `dsh` without a profile is rejected by DSH 0.1.x.
|
|
171
|
+
|
|
172
|
+
Codex uses a profile `$CODEX_HOME/botconnector.config.toml` with `wire_api = "responses"` and a BCCLI
|
|
173
|
+
launcher that reads the key from BCCLI storage at runtime. Claude Code gets an isolated launcher with
|
|
174
|
+
`ANTHROPIC_BASE_URL=https://api.botconnector.id` and the `/v1/messages` compatibility endpoint +
|
|
175
|
+
token counting. Codex and Claude Code primary login/config are not overwritten.
|
|
176
|
+
|
|
177
|
+
External agents call BotConnector directly, so model discovery does not use BCCLI-specific identity.
|
|
178
|
+
Access restricted to BCCLI/Web App (for example Luna launch access) is not automatically inherited.
|
|
179
|
+
Before changing external config, BCCLI makes a backup so `disconnect` can restore it.
|
|
180
|
+
|
|
181
|
+
## Internet
|
|
182
|
+
|
|
183
|
+
- `web_search`: web search with no permission prompt. Uses your BotConnector Cloud account when a key
|
|
184
|
+
is present, otherwise goes straight to Keenable (free, no key). Results are titles, URLs, and short
|
|
185
|
+
snippets, so they are token-efficient.
|
|
186
|
+
- `fetch`: open one URL from this machine (permission required per host).
|
|
187
|
+
|
|
188
|
+
## MCP
|
|
189
|
+
|
|
190
|
+
`/mcp` (or `bccli mcp add <name>`) installs servers from the catalog:
|
|
191
|
+
`playwright`, `context7`, `fetch`, `filesystem`, `git`, `github`. Other remote servers:
|
|
192
|
+
`bccli mcp add name --url https://…`. Stored in `~/.bccli/mcp.json` (`mcpServers` format, same as
|
|
193
|
+
Claude Code). All MCP tools always require permission.
|
|
194
|
+
|
|
195
|
+
A `.bccli/mcp.json` inside a repo is not executed until you approve it (asked once per folder).
|
|
196
|
+
|
|
197
|
+
`bccli mcp serve` runs a stdio MCP server with your BotConnector tools
|
|
198
|
+
(`bc_search`, `bc_fetch`, `bc_models`, `bc_chat`) for Claude Code, Cursor, opencode, and other MCP
|
|
199
|
+
hosts. Requires `bccli login` (or `BOTCONNECTOR_API_KEY`):
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
claude mcp add botconnector -- npx -y @botconnector/bccli mcp serve
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Subagents
|
|
206
|
+
|
|
207
|
+
The agent can delegate work via the `task` tool:
|
|
208
|
+
- `explore` — read & search only, can run in parallel;
|
|
209
|
+
- `general` — all tools (edits/commands still ask permission);
|
|
210
|
+
- custom — `.bccli/agents/name.md` or `.claude/agents/name.md`:
|
|
211
|
+
|
|
212
|
+
```markdown
|
|
213
|
+
---
|
|
214
|
+
name: reviewer
|
|
215
|
+
description: review code changes
|
|
216
|
+
tools: [read, grep, glob]
|
|
217
|
+
model: openrouter/qwen/qwen3-coder
|
|
218
|
+
---
|
|
219
|
+
You are a code reviewer. Report real bugs only.
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Skills & custom commands
|
|
223
|
+
|
|
224
|
+
- Skills: folders containing `SKILL.md` in `~/.bccli/skills/`, `.bccli/skills/`, `~/.claude/skills/`,
|
|
225
|
+
`.claude/skills/` — used automatically when relevant, or via `/skill-name`.
|
|
226
|
+
- Commands: `commands/name.md` in the same folders → `/name arguments` (`$ARGUMENTS` is replaced).
|
|
227
|
+
|
|
228
|
+
## Todos & plan mode
|
|
229
|
+
|
|
230
|
+
Tasks with ≥ 3 steps show a checklist above the input box. In plan mode (Shift+Tab),
|
|
231
|
+
the agent only reads and then proposes a plan; `[a]` approves with automatic edits,
|
|
232
|
+
`[y]` approves asking at each step, `[n]` asks for revisions.
|
|
233
|
+
|
|
234
|
+
Project instructions are read from `AGENTS.md`, `CLAUDE.md`, and `BCCLI.md`.
|
|
235
|
+
|
|
236
|
+
## Development
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
npm install
|
|
240
|
+
npm test && npm run typecheck && npm run lint && npm run build
|
|
241
|
+
npm run coverage # coverage gate (also enforced on Linux CI)
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
CI (`ci.yml`) runs the same on Linux, macOS, and Windows, plus the coverage gate on Linux.
|
|
245
|
+
Releases: bump `version` in `package.json`, then push a `v<version>` tag — `release.yml`
|
|
246
|
+
runs tests, a smoke test against BotConnector Cloud, and `npm publish --provenance`.
|
|
247
|
+
|
|
248
|
+
## Learn more
|
|
249
|
+
|
|
250
|
+
- [Download & BCCLI guide](https://botconnector.id/id/download)
|
|
251
|
+
- [BotConnector Developer API](https://botconnector.id/id/developers/api) — OpenAI SDK-compatible endpoint
|
|
252
|
+
- [Switchboard](https://github.com/farijarifriyanto-debug/switchboard) — BotConnector's open source agent harness
|
|
253
|
+
- [Contributing](CONTRIBUTING.md)
|
package/legacy/README.md
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# BCCLI
|
|
2
|
+
|
|
3
|
+
**Bahasa Indonesia** · [English](README.en.md)
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@botconnector/bccli?activeTab=versions)
|
|
6
|
+
[](https://www.npmjs.com/package/@botconnector/bccli)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://botconnector.id/id/download)
|
|
10
|
+
|
|
11
|
+
Agent AI coding dari [BotConnector](https://botconnector.id/) yang bekerja di terminal: membaca kode, mengedit file,
|
|
12
|
+
dan menjalankan perintah — dengan izin kamu.
|
|
13
|
+
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
*Rekaman sesi asli: BCCLI membuat file `hello.js` lalu menjalankannya dengan `node`.*
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# install satu baris (macOS / Linux / WSL2) — pasang Node portable bila perlu, tanpa sudo
|
|
20
|
+
curl -fsSL https://raw.githubusercontent.com/farijarifriyanto-debug/bccli/main/install.sh | bash
|
|
21
|
+
|
|
22
|
+
# Windows (PowerShell 5.1+) — butuh Node.js 22+ terpasang lebih dulu
|
|
23
|
+
irm https://raw.githubusercontent.com/farijarifriyanto-debug/bccli/main/install.ps1 | iex
|
|
24
|
+
|
|
25
|
+
# atau manual, bila Node.js 22+ sudah terpasang
|
|
26
|
+
npm i -g @botconnector/bccli # rilis stabil terbaru, butuh Node.js 22+
|
|
27
|
+
npm i -g @botconnector/bccli@next # …atau pra-rilis berikutnya
|
|
28
|
+
bccli login # simpan API key BotConnector Cloud
|
|
29
|
+
cd project-kamu && bccli
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Pemakaian
|
|
33
|
+
|
|
34
|
+
| Perintah | Fungsi |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `bccli` | mode interaktif |
|
|
37
|
+
| `bccli -p "tugas"` | satu tugas tanpa interaksi (skrip/CI) |
|
|
38
|
+
| `bccli -p "tugas" --output-format json` | hasil akhir sebagai satu objek JSON; `stream-json` = event JSONL per tahap (tool_use/tool_result/message/result) untuk CI |
|
|
39
|
+
| `bccli -c` / `bccli -r` | lanjutkan sesi terakhir / pilih sesi |
|
|
40
|
+
| `bccli -m provider/model` | pilih model |
|
|
41
|
+
| `bccli --reasoning <auto|off|low|medium|high|max>` | pilih level reasoning untuk invocation ini |
|
|
42
|
+
| `bccli models` | daftar model |
|
|
43
|
+
|
|
44
|
+
Perintah di dalam sesi (ketik `/` untuk saran, ↑↓ pilih, Enter jalankan):
|
|
45
|
+
|
|
46
|
+
| Perintah | Fungsi |
|
|
47
|
+
|---|---|
|
|
48
|
+
| `/help` | daftar perintah dan pintasan |
|
|
49
|
+
| `/model` | ganti model |
|
|
50
|
+
| `/reasoning` | pilih Auto / Off / Low / Medium / High / Max |
|
|
51
|
+
| `/provider` | tambah/pilih provider AI |
|
|
52
|
+
| `/language` | ganti bahasa tampilan (`en` / `id`) |
|
|
53
|
+
| `/mcp` | pasang/kelola server MCP |
|
|
54
|
+
| `/new` | sesi baru (sesi lama tetap tersimpan) |
|
|
55
|
+
| `/resume` | lanjutkan sesi lain di folder ini |
|
|
56
|
+
| `/session` | info sesi ini |
|
|
57
|
+
| `/status` | versi, model, mode izin, MCP, konteks |
|
|
58
|
+
| `/permissions` | lihat/cabut izin |
|
|
59
|
+
| `/pr` | review pull request (`/pr <n\|url\|branch>`) |
|
|
60
|
+
| `/worktree` | daftar git worktree; buat dengan `bccli -w <nama>` |
|
|
61
|
+
| `/undo` | batalkan edit file giliran terakhir |
|
|
62
|
+
| `/redo` | terapkan ulang edit file yang baru dibatalkan `/undo` |
|
|
63
|
+
| `/rewind` | mundur beberapa giliran: percakapan + edit file (`/rewind 2`) |
|
|
64
|
+
| `/diff` | git diff project |
|
|
65
|
+
| `/copy` | salin jawaban terakhir |
|
|
66
|
+
| `/export` | simpan percakapan ke markdown |
|
|
67
|
+
| `/memory` | instruksi project (/memory <teks>, /memory global <teks>) |
|
|
68
|
+
| `/init` | buat/perbarui AGENTS.md untuk project ini |
|
|
69
|
+
| `/agents` | daftar subagent |
|
|
70
|
+
| `/tasks` | daftar tugas latar belakang |
|
|
71
|
+
| `/skills` | daftar skill dan perintah custom |
|
|
72
|
+
| `/doctor` | cek kesehatan instalasi |
|
|
73
|
+
| `/login` | simpan API key provider aktif |
|
|
74
|
+
| `/logout` | hapus API key provider aktif |
|
|
75
|
+
| `/clear` | mulai percakapan baru |
|
|
76
|
+
| `/compact` | ringkas percakapan |
|
|
77
|
+
| `/cost` | pemakaian token sesi ini |
|
|
78
|
+
| `/exit` | keluar |
|
|
79
|
+
|
|
80
|
+
`/undo` hanya membatalkan perubahan lewat alat edit/tulis (bukan perintah bash), per giliran, sampai 20 giliran ke belakang.
|
|
81
|
+
Shift+Tab ganti mode izin: `default` → `acceptEdits` → `plan` → `allowAll`.
|
|
82
|
+
|
|
83
|
+
Membaca file rahasia (`.env`, `.ssh`, `.aws`, `id_rsa`, `*.pem`, `*.key`, `secret*`,
|
|
84
|
+
`credential*`) selalu meminta izin; `allowAll` satu-satunya mode yang tidak bertanya, dan
|
|
85
|
+
izin itu tidak bisa diberikan "untuk sesi ini".
|
|
86
|
+
|
|
87
|
+
Mode `-p` tidak pernah bertanya: alat yang butuh izin ditolak, kecuali memakai
|
|
88
|
+
`--allow-all` atau `--allowed-tools bash,edit,fetch`.
|
|
89
|
+
|
|
90
|
+
## Bahasa
|
|
91
|
+
|
|
92
|
+
Tampilan BCCLI (bantuan, pesan, prompt izin) memakai **bahasa Inggris secara default**. Bahasa Indonesia tetap tersedia:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
bccli --lang id # hanya untuk satu kali jalan
|
|
96
|
+
BCCLI_LANG=id bccli # lewat environment
|
|
97
|
+
/language id # di dalam sesi; disimpan di ~/.bccli/config.json ("language")
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Urutan prioritas: `--lang`, lalu `BCCLI_LANG`, lalu `language` di config, lalu Inggris. Bahasa jawaban model mengikuti bahasa yang kamu tulis, dan
|
|
101
|
+
pesan alat yang dibaca model (hasil tool, galat) selalu berbahasa Inggris supaya tidak mengganggu bahasa jawabannya.
|
|
102
|
+
|
|
103
|
+
## Provider
|
|
104
|
+
|
|
105
|
+
`/provider` di dalam sesi (atau `bccli provider add <id>`) memasang provider hanya dengan API key:
|
|
106
|
+
|
|
107
|
+
| Id | Provider |
|
|
108
|
+
|---|---|
|
|
109
|
+
| `bc-cloud` | BotConnector Cloud (default) |
|
|
110
|
+
| `openrouter` | OpenRouter |
|
|
111
|
+
| `openai` | OpenAI |
|
|
112
|
+
| `gemini` | Google Gemini |
|
|
113
|
+
| `deepseek` | DeepSeek |
|
|
114
|
+
| `groq` | Groq |
|
|
115
|
+
| `ollama-cloud` | Ollama Cloud |
|
|
116
|
+
| `ollama` | Ollama lokal (tanpa key) |
|
|
117
|
+
| `lmstudio` | LM Studio lokal (tanpa key) |
|
|
118
|
+
|
|
119
|
+
Provider lain yang OpenAI-compatible: pilih **Custom…** di `/provider`, atau
|
|
120
|
+
`bccli provider add corp --url https://corp.example/v1 --name "Corp"`.
|
|
121
|
+
|
|
122
|
+
`/model` menampilkan model dari **semua** provider yang sudah punya key, dikelompokkan
|
|
123
|
+
per provider; ketik untuk menyaring. Pilihan tersimpan sebagai default.
|
|
124
|
+
|
|
125
|
+
Reasoning dapat dipilih lewat `bccli --reasoning <auto|off|low|medium|high|max>` atau `/reasoning`.
|
|
126
|
+
**Auto** memakai default model/provider dan BCCLI tidak mengirim override reasoning apa pun. BCCLI tidak
|
|
127
|
+
otomatis menurunkan atau menaikkan reasoning effort. Level manual diteruskan bila kontrak provider/model
|
|
128
|
+
mendukungnya; level yang tidak didukung menghasilkan error yang jelas dan tidak di-downgrade diam-diam.
|
|
129
|
+
|
|
130
|
+
`.bccli/config.json` di dalam project hanya boleh memilih `model` dan menambah provider baru tanpa API key —
|
|
131
|
+
preference `reasoning` hanya dibaca dari config user `~/.bccli/config.json`, bukan dari repo yang di-clone —
|
|
132
|
+
izin (`permissionMode`, `allow`) dan provider yang sudah ada hanya diatur dari `~/.bccli/config.json`,
|
|
133
|
+
supaya repo yang kamu clone tidak bisa memberi dirinya izin penuh atau mencuri API key.
|
|
134
|
+
|
|
135
|
+
Daftar lengkap kunci `~/.bccli/config.json` beserta nilai dan cakupannya: [`docs/config.md`](docs/config.md).
|
|
136
|
+
|
|
137
|
+
## Integrasi agent eksternal
|
|
138
|
+
|
|
139
|
+
BCCLI dapat memasang BotConnector sebagai provider untuk agent lain:
|
|
140
|
+
|
|
141
|
+
| Perintah | Fungsi |
|
|
142
|
+
|---|---|
|
|
143
|
+
| `bccli integrations` | lihat status integrasi |
|
|
144
|
+
| `bccli connect opencode` | hubungkan OpenCode ke BotConnector |
|
|
145
|
+
| `bccli connect aider` | hubungkan Aider ke BotConnector |
|
|
146
|
+
| `bccli connect cline` | hubungkan Cline CLI ke BotConnector |
|
|
147
|
+
| `bccli connect deepseek-harness` / `bccli connect dsh` | hubungkan DeepSeek Harness ke BotConnector |
|
|
148
|
+
| `bccli connect codex` | buat profile Codex Responses API + launcher BotConnector |
|
|
149
|
+
| `bccli connect claude-code` | buat launcher Claude Code via Anthropic Messages compatibility |
|
|
150
|
+
| `bccli connect cursor` | buat guided setup Cursor + warning override Base URL |
|
|
151
|
+
| `bccli connect openai-cli` | buat launcher OpenAI CLI khusus BotConnector |
|
|
152
|
+
| `bccli connect openai-sdk` | buat env profile untuk OpenAI Python/Node SDK |
|
|
153
|
+
| `bccli connect openai-compatible` | buat env profile universal OpenAI-compatible |
|
|
154
|
+
| `bccli disconnect <agent>` | pulihkan config sebelum integrasi |
|
|
155
|
+
|
|
156
|
+
OpenCode memakai config global `~/.config/opencode/opencode.json`. BCCLI mengambil katalog model BotConnector saat connect,
|
|
157
|
+
menjaga config provider lain, dan menyimpan secret di file terpisah di `~/.bccli/integrations/`.
|
|
158
|
+
Aider memakai `~/.aider.conf.yml` yang menunjuk ke env file BCCLI terpisah; BCCLI menolak menimpa setting
|
|
159
|
+
OpenAI/env-file Aider yang sudah ada.
|
|
160
|
+
|
|
161
|
+
Cline memakai provider `openai-compatible` di `~/.cline/data/settings/providers.json`. Jika slot itu sudah dipakai
|
|
162
|
+
endpoint lain, BCCLI menolak menimpanya. Cline sendiri menyimpan API key provider di file tersebut.
|
|
163
|
+
|
|
164
|
+
DeepSeek Harness memakai custom provider `botconnector` di `$DSH_HOME/settings.yaml` dengan
|
|
165
|
+
`api: openai-completions` dan `apiKeyEnv: BOTCONNECTOR_API_KEY`; key diletakkan pada blok BCCLI di
|
|
166
|
+
`$DSH_HOME/.env`. Provider DSH lain tetap dipertahankan. Setelah connect, jalankan profile web dengan
|
|
167
|
+
`dsh web` (setara dengan `dsh --profile web`); `dsh` tanpa profile memang ditolak oleh DSH 0.1.x.
|
|
168
|
+
|
|
169
|
+
Codex memakai profile `$CODEX_HOME/botconnector.config.toml` dengan `wire_api = "responses"` dan launcher
|
|
170
|
+
BCCLI yang membaca key dari storage BCCLI saat dijalankan. Claude Code memakai launcher terisolasi dengan
|
|
171
|
+
`ANTHROPIC_BASE_URL=https://api.botconnector.id` dan endpoint kompatibilitas `/v1/messages` + token counting.
|
|
172
|
+
Login/config utama Codex dan Claude Code tidak ditimpa.
|
|
173
|
+
|
|
174
|
+
External agent memanggil BotConnector langsung, jadi discovery model tidak memakai identitas khusus BCCLI.
|
|
175
|
+
Akses yang memang dibatasi ke BCCLI/Web App (misalnya Luna launch access) tidak otomatis diwariskan.
|
|
176
|
+
Sebelum mengubah config eksternal, BCCLI membuat backup agar disconnect dapat memulihkannya.
|
|
177
|
+
|
|
178
|
+
## Internet
|
|
179
|
+
|
|
180
|
+
- `web_search`: mencari di web tanpa perlu izin. Memakai akun BotConnector Cloud
|
|
181
|
+
bila ada key, kalau tidak langsung ke Keenable (gratis, tanpa key). Hasilnya
|
|
182
|
+
judul, URL, dan cuplikan singkat, jadi hemat token.
|
|
183
|
+
- `fetch`: membuka satu URL dari komputer ini (butuh izin per host).
|
|
184
|
+
|
|
185
|
+
## MCP
|
|
186
|
+
|
|
187
|
+
`/mcp` (atau `bccli mcp add <nama>`) memasang server dari katalog:
|
|
188
|
+
`playwright`, `context7`, `fetch`, `filesystem`, `git`, `github`. Server remote lain:
|
|
189
|
+
`bccli mcp add nama --url https://…`. Tersimpan di `~/.bccli/mcp.json` (format `mcpServers`
|
|
190
|
+
seperti Claude Code). Semua alat MCP selalu minta izin.
|
|
191
|
+
|
|
192
|
+
`.bccli/mcp.json` di dalam repo tidak dijalankan sebelum kamu setujui (ditanya sekali per folder).
|
|
193
|
+
|
|
194
|
+
`bccli mcp serve` menjalankan MCP server stdio dengan tools BotConnector milikmu
|
|
195
|
+
(`bc_search`, `bc_fetch`, `bc_models`, `bc_chat`) untuk dipakai Claude Code, Cursor,
|
|
196
|
+
opencode, dan host MCP lain. Butuh `bccli login` (atau `BOTCONNECTOR_API_KEY`):
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
claude mcp add botconnector -- npx -y @botconnector/bccli mcp serve
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Subagent
|
|
203
|
+
|
|
204
|
+
Agent bisa mendelegasikan pekerjaan lewat alat `task`:
|
|
205
|
+
- `explore` — hanya baca & cari, bisa jalan paralel;
|
|
206
|
+
- `general` — semua alat (edit/perintah tetap minta izin);
|
|
207
|
+
- custom — `.bccli/agents/nama.md` atau `.claude/agents/nama.md`:
|
|
208
|
+
|
|
209
|
+
```markdown
|
|
210
|
+
---
|
|
211
|
+
name: reviewer
|
|
212
|
+
description: review perubahan kode
|
|
213
|
+
tools: [read, grep, glob]
|
|
214
|
+
model: openrouter/qwen/qwen3-coder
|
|
215
|
+
---
|
|
216
|
+
Kamu reviewer kode. Laporkan bug nyata saja.
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Skill & perintah custom
|
|
220
|
+
|
|
221
|
+
- Skill: folder berisi `SKILL.md` di `~/.bccli/skills/`, `.bccli/skills/`, `~/.claude/skills/`,
|
|
222
|
+
`.claude/skills/` — dipakai agent otomatis bila cocok, atau `/nama-skill`.
|
|
223
|
+
- Perintah: `commands/nama.md` di folder yang sama → `/nama argumen` (`$ARGUMENTS` diganti argumen).
|
|
224
|
+
|
|
225
|
+
## Todo & mode plan
|
|
226
|
+
|
|
227
|
+
Tugas ≥ 3 langkah menampilkan checklist di atas kotak input. Di mode plan (Shift+Tab),
|
|
228
|
+
agent hanya membaca lalu mengajukan rencana; `[a]` setujui dengan edit otomatis,
|
|
229
|
+
`[y]` setujui dengan tanya tiap langkah, `[n]` minta perbaikan.
|
|
230
|
+
|
|
231
|
+
Instruksi project dibaca dari `AGENTS.md`, `CLAUDE.md`, dan `BCCLI.md`.
|
|
232
|
+
|
|
233
|
+
## Pengembangan
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
npm install
|
|
237
|
+
npm test && npm run typecheck && npm run lint && npm run build
|
|
238
|
+
npm run coverage # gerbang coverage (juga dijalankan di CI Linux)
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
CI (`ci.yml`) menjalankan hal yang sama di Linux, macOS, dan Windows, plus gerbang coverage di Linux.
|
|
242
|
+
Rilis: naikkan `version` di `package.json`, lalu push tag `v<version>` — `release.yml`
|
|
243
|
+
menjalankan test, smoke test ke BotConnector Cloud, dan `npm publish --provenance`.
|
|
244
|
+
|
|
245
|
+
## Pelajari lebih lanjut
|
|
246
|
+
|
|
247
|
+
- [Unduh & panduan BCCLI](https://botconnector.id/id/download)
|
|
248
|
+
- [Developer API BotConnector](https://botconnector.id/id/developers/api) — endpoint kompatibel OpenAI SDK
|
|
249
|
+
- [Switchboard](https://github.com/farijarifriyanto-debug/switchboard) — harness agent open source dari BotConnector
|
|
250
|
+
- [Berkontribusi](CONTRIBUTING.md)
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const ABORTED: unique symbol;
|
|
2
|
+
/** Resolves with the promise's value, or with ABORTED as soon as the signal fires. */
|
|
3
|
+
export declare function raceAbort<T>(promise: Promise<T>, signal: AbortSignal): Promise<T | typeof ABORTED>;
|
|
4
|
+
/** Collects an async iterable, giving up (and telling the iterator to stop) as soon as the signal fires. */
|
|
5
|
+
export declare function collectUntilAbort<T>(iterable: AsyncIterable<T>, signal: AbortSignal | undefined, onItem: (item: T) => void): Promise<boolean>;
|