@robota-sdk/agent-cli 3.0.0-beta.60 → 3.0.0-beta.62
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/README.ko.md +297 -0
- package/README.md +76 -37
- package/bin/robota.cjs +43 -0
- package/dist/node/bin.js +6019 -3
- package/dist/node/{chunk-GHQHUBHC.js → chunk-6US65UBD.js} +2314 -2043
- package/dist/node/{chunk-6XQKLNRF.js → chunk-7D75HL37.js} +28 -8
- package/dist/node/chunk-BENOH47A.js +287 -0
- package/dist/node/cli-N6TYREZG.js +9 -0
- package/dist/node/index.cjs +917 -556
- package/dist/node/index.js +5813 -8
- package/dist/node/subagents/child-process-subagent-worker.cjs +249 -0
- package/dist/node/subagents/child-process-subagent-worker.d.cts +2 -0
- package/dist/node/subagents/child-process-subagent-worker.js +1 -1
- package/package.json +39 -32
package/README.ko.md
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
**Language:** [English](README.md) | [한국어](README.ko.md)
|
|
2
|
+
|
|
3
|
+
# @robota-sdk/agent-cli
|
|
4
|
+
|
|
5
|
+
Robota SDK 기반의 AI 코딩 어시스턴트 CLI. AGENTS.md/CLAUDE.md를 로드하여 프로젝트 컨텍스트를 파악하고, Claude Code 호환 권한 모드를 갖춘 도구 호출 REPL을 제공합니다.
|
|
6
|
+
|
|
7
|
+
## 시스템 요구사항
|
|
8
|
+
|
|
9
|
+
**Node.js 22 이상** 필요합니다.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
node --version # v22.x.x 이상이어야 합니다
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Node.js 버전이 22 미만이라면 [nvm](https://github.com/nvm-sh/nvm)으로 업그레이드:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
nvm install 22
|
|
19
|
+
nvm use 22
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 설치
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# 전역 설치
|
|
26
|
+
npm install -g @robota-sdk/agent-cli
|
|
27
|
+
|
|
28
|
+
# 또는 npx로 직접 실행
|
|
29
|
+
npx @robota-sdk/agent-cli
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
> **macOS Terminal.app 사용자**: 한국어/중국어/일본어 입력 시 크래시가 발생할 수 있습니다. **[iTerm2](https://iterm2.com/)** 사용을 권장합니다. 이는 Ink + Terminal.app의 알려진 문제로 Claude Code와 동일합니다.
|
|
33
|
+
|
|
34
|
+
전역 설치 후 시스템 전체에서 `robota` 명령어를 사용할 수 있습니다:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
robota # 인터랙티브 REPL
|
|
38
|
+
robota "프롬프트" # 초기 프롬프트와 함께 REPL 시작
|
|
39
|
+
robota -p "파일 목록 출력" # 출력 모드 (단발성, 응답 후 종료)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 환경 변수
|
|
43
|
+
|
|
44
|
+
| 변수 | 설명 | 필수 여부 |
|
|
45
|
+
| ------------------- | ---------------------------------------- | -------------- |
|
|
46
|
+
| `ANTHROPIC_API_KEY` | Anthropic 프로바이더용 API 키 | Anthropic 전용 |
|
|
47
|
+
| `DEEPSEEK_API_KEY` | DeepSeek 프로바이더용 API 키 | DeepSeek 전용 |
|
|
48
|
+
| `DASHSCOPE_API_KEY` | Qwen(알리바바 클라우드) 모델 스튜디오 키 | Qwen 전용 |
|
|
49
|
+
|
|
50
|
+
실행 전 키를 설정하세요:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
export ANTHROPIC_API_KEY=sk-ant-...
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 개발 환경 설정 (모노레포)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# 의존성 및 CLI 빌드
|
|
60
|
+
pnpm build:deps
|
|
61
|
+
pnpm --filter @robota-sdk/agent-cli build
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 실행 (모노레포)
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# 모노레포 루트에서
|
|
68
|
+
cd packages/agent-cli
|
|
69
|
+
|
|
70
|
+
# 개발 모드 (빌드 불필요)
|
|
71
|
+
pnpm dev
|
|
72
|
+
|
|
73
|
+
# 프로덕션 모드 (빌드 필요)
|
|
74
|
+
pnpm start
|
|
75
|
+
|
|
76
|
+
# 인자 포함 실행
|
|
77
|
+
pnpm dev -- --version
|
|
78
|
+
pnpm dev -- --permission-mode plan
|
|
79
|
+
pnpm dev -- -p "src/ 내 모든 TypeScript 파일 목록"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## CLI 플래그
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
robota # 인터랙티브 REPL (기본 모드)
|
|
86
|
+
robota "프롬프트" # 초기 프롬프트와 함께 REPL 시작
|
|
87
|
+
robota -p "프롬프트" # 출력 모드 (단발성, 응답 후 종료)
|
|
88
|
+
robota -c # 마지막 세션 이어서 시작
|
|
89
|
+
robota -r <session-id> # 세션 ID로 세션 재개
|
|
90
|
+
robota --model <모델> # 모델 지정 (예: claude-sonnet-4-6)
|
|
91
|
+
robota --language <언어> # 응답 언어 (ko, en, ja, zh)
|
|
92
|
+
robota --permission-mode <모드> # plan | default | acceptEdits | bypassPermissions
|
|
93
|
+
robota --max-turns <n> # 인터랙션당 에이전틱 턴 제한
|
|
94
|
+
robota --output-format <형식> # text | json | stream-json (출력 모드)
|
|
95
|
+
robota --system-prompt <텍스트> # 시스템 프롬프트 교체 (출력 모드)
|
|
96
|
+
robota --append-system-prompt <텍스트> # 시스템 프롬프트에 추가 (출력 모드)
|
|
97
|
+
robota --reset # 사용자 설정 삭제 후 종료
|
|
98
|
+
robota --check-update # npm에서 최신 CLI 버전 확인 후 종료
|
|
99
|
+
robota --disable-update-check # 이번 실행에서 시작 시 업데이트 확인 건너뜀
|
|
100
|
+
robota --version # 버전 표시
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### CLI 업데이트 확인
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
robota --check-update
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
업데이트가 있으면 npm 전역 설치 명령어를 출력합니다:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
npm install -g '@robota-sdk/agent-cli@latest'
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 출력 모드 형식
|
|
116
|
+
|
|
117
|
+
출력 모드(`-p`)는 `--output-format`으로 세 가지 형식을 지원합니다:
|
|
118
|
+
|
|
119
|
+
| 형식 | 설명 |
|
|
120
|
+
| ------------- | ---------------------------------------------------------------- |
|
|
121
|
+
| `text` | 표준 출력에 일반 텍스트 응답 (기본값) |
|
|
122
|
+
| `json` | 단일 JSON 객체: `{ type, result, session_id, subtype }` |
|
|
123
|
+
| `stream-json` | `content_block_delta` 스트리밍 이벤트를 줄바꿈으로 구분한 NDJSON |
|
|
124
|
+
|
|
125
|
+
### 표준 입력(Stdin) 파이프
|
|
126
|
+
|
|
127
|
+
`-p`와 위치 인자 없이 stdin이 파이프되면 CLI가 stdin에서 읽습니다:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
echo "이 오류를 설명해줘" | robota -p
|
|
131
|
+
cat file.ts | robota -p "이 코드를 검토해줘" --output-format json
|
|
132
|
+
git diff | robota -p "변경 사항 요약" --output-format stream-json
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## 최초 실행 설정
|
|
136
|
+
|
|
137
|
+
사용 가능한 설정 파일이 없으면 CLI가 다음을 안내합니다:
|
|
138
|
+
|
|
139
|
+
1. **프로바이더 선택** — CLI 바이너리에 포함된 프로바이더 중 선택
|
|
140
|
+
2. **프로바이더별 설정** — 모델, base URL, 마스킹된 API 키 등
|
|
141
|
+
3. **응답 언어** (ko/en/ja/zh, 기본값: en)
|
|
142
|
+
|
|
143
|
+
`~/.robota/settings.json`에 설정이 저장됩니다. `robota --reset`으로 최초 실행 상태로 되돌릴 수 있습니다.
|
|
144
|
+
|
|
145
|
+
## 내장 도구
|
|
146
|
+
|
|
147
|
+
AI 에이전트는 8개의 로컬 도구를 호출할 수 있습니다:
|
|
148
|
+
|
|
149
|
+
| 도구 | 설명 | 주요 인자 |
|
|
150
|
+
| ----------- | ----------------------------- | ---------- |
|
|
151
|
+
| `Bash` | 셸 명령 실행 | `command` |
|
|
152
|
+
| `Read` | 줄 번호와 함께 파일 내용 읽기 | `filePath` |
|
|
153
|
+
| `Write` | 파일에 내용 쓰기 | `filePath` |
|
|
154
|
+
| `Edit` | 파일의 문자열 교체 | `filePath` |
|
|
155
|
+
| `Glob` | 패턴으로 파일 검색 | `pattern` |
|
|
156
|
+
| `Grep` | 정규식으로 파일 내용 검색 | `pattern` |
|
|
157
|
+
| `WebFetch` | URL 내용을 텍스트로 가져오기 | `url` |
|
|
158
|
+
| `WebSearch` | 인터넷 검색 | `query` |
|
|
159
|
+
|
|
160
|
+
## 권한 시스템
|
|
161
|
+
|
|
162
|
+
모든 도구 호출은 세 단계 권한 게이트를 통과합니다:
|
|
163
|
+
|
|
164
|
+
1. **거부 목록** — 거부 패턴이 일치하면 차단
|
|
165
|
+
2. **허용 목록** — 허용 패턴이 일치하면 자동 승인
|
|
166
|
+
3. **모드 정책** — 활성 권한 모드에 따라 결정
|
|
167
|
+
|
|
168
|
+
### 권한 모드
|
|
169
|
+
|
|
170
|
+
| 모드 | Read/Glob/Grep | Write/Edit | Bash |
|
|
171
|
+
| ------------------- | :------------: | :--------: | :--: |
|
|
172
|
+
| `plan` | 자동 | 거부 | 거부 |
|
|
173
|
+
| `default` | 자동 | 승인 | 승인 |
|
|
174
|
+
| `acceptEdits` | 자동 | 자동 | 승인 |
|
|
175
|
+
| `bypassPermissions` | 자동 | 자동 | 자동 |
|
|
176
|
+
|
|
177
|
+
### 런타임 모드 변경
|
|
178
|
+
|
|
179
|
+
`/permissions` 슬래시 커맨드 사용:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
> /permissions # 현재 모드 및 세션 승인 도구 표시
|
|
183
|
+
> /permissions plan # 읽기 전용 모드로 전환
|
|
184
|
+
> /permissions bypassPermissions # 모든 프롬프트 건너뜀
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
또는 시작 시 설정:
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
robota --permission-mode plan
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### 권한 패턴
|
|
194
|
+
|
|
195
|
+
`.robota/settings.json` 또는 `.robota/settings.local.json`에 설정:
|
|
196
|
+
|
|
197
|
+
```json
|
|
198
|
+
{
|
|
199
|
+
"permissions": {
|
|
200
|
+
"allow": ["Bash(pnpm *)", "Bash(git status)", "Read(/src/**)"],
|
|
201
|
+
"deny": ["Bash(rm -rf *)", "Write(.env)"]
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
패턴 문법: `ToolName`은 모든 호출에 매칭; `ToolName(pattern)`은 셸 스타일 글로브(`*`, `**`)로 주요 인자에 매칭.
|
|
207
|
+
|
|
208
|
+
## 키보드 단축키
|
|
209
|
+
|
|
210
|
+
| 키 | 동작 |
|
|
211
|
+
| --------- | ------------------------------------------ |
|
|
212
|
+
| Enter | 입력 제출 |
|
|
213
|
+
| ESC | 현재 실행 중단 (부분 응답 저장) |
|
|
214
|
+
| Ctrl+C | 즉시 프로세스 종료 |
|
|
215
|
+
| Up/Down | 여러 줄 입력에서 줄 탐색 |
|
|
216
|
+
| 화살표 키 | 슬래시 커맨드 자동완성, 권한 프롬프트 탐색 |
|
|
217
|
+
|
|
218
|
+
## 주요 슬래시 커맨드
|
|
219
|
+
|
|
220
|
+
| 커맨드 | 설명 |
|
|
221
|
+
| --------------------- | ----------------------------------------------- |
|
|
222
|
+
| `/help` | 사용 가능한 커맨드 표시 |
|
|
223
|
+
| `/clear` | 대화 기록 초기화 |
|
|
224
|
+
| `/model [모델명]` | AI 모델 변경 (확인 프롬프트, CLI 재시작) |
|
|
225
|
+
| `/language [언어]` | 응답 언어 설정 (ko, en, ja, zh), 저장 후 재시작 |
|
|
226
|
+
| `/compact [지시사항]` | 컨텍스트 창 압축 |
|
|
227
|
+
| `/cost` | 세션 정보 표시 |
|
|
228
|
+
| `/context` | 컨텍스트 창 상세, 참조 목록, 자동 압축 설정 |
|
|
229
|
+
| `/agent` | 백그라운드 서브에이전트 작업 실행 및 관리 |
|
|
230
|
+
| `/permissions [모드]` | 권한 규칙 표시 또는 권한 모드 변경 |
|
|
231
|
+
| `/plugin [하위명령]` | 플러그인 관리 |
|
|
232
|
+
| `/resume` | 최근 세션 목록 표시 및 재개 |
|
|
233
|
+
| `/rename <이름>` | 현재 세션 이름 변경 |
|
|
234
|
+
| `/exit` | CLI 종료 |
|
|
235
|
+
|
|
236
|
+
## 세션 관리
|
|
237
|
+
|
|
238
|
+
### CLI 플래그
|
|
239
|
+
|
|
240
|
+
| 플래그 | 설명 |
|
|
241
|
+
| --------------------- | ---------------------------------------- |
|
|
242
|
+
| `-c`, `--continue` | 가장 최근 세션 이어서 시작 |
|
|
243
|
+
| `-r`, `--resume <id>` | 특정 세션 ID로 재개 |
|
|
244
|
+
| `--fork-session <id>` | 세션 포크 (복사된 기록으로 새 세션 시작) |
|
|
245
|
+
| `--name <이름>` | 시작 시 세션에 이름 지정 |
|
|
246
|
+
|
|
247
|
+
## 설정
|
|
248
|
+
|
|
249
|
+
설정은 다음 순서로 병합됩니다 (낮은 우선순위 → 높은 우선순위):
|
|
250
|
+
|
|
251
|
+
1. `~/.robota/settings.json` (사용자 전역)
|
|
252
|
+
2. `~/.claude/settings.json` (사용자 전역, Claude Code 호환)
|
|
253
|
+
3. `.robota/settings.json` (프로젝트, 공유)
|
|
254
|
+
4. `.robota/settings.local.json` (로컬, gitignore 대상)
|
|
255
|
+
5. `.claude/settings.json` (프로젝트, Claude Code 호환)
|
|
256
|
+
6. `.claude/settings.local.json` (로컬, gitignore 대상, Claude Code 호환)
|
|
257
|
+
|
|
258
|
+
```json
|
|
259
|
+
{
|
|
260
|
+
"defaultMode": "default",
|
|
261
|
+
"language": "ko",
|
|
262
|
+
"currentProvider": "claude-sonnet-4-6",
|
|
263
|
+
"providers": {
|
|
264
|
+
"claude-sonnet-4-6": {
|
|
265
|
+
"type": "anthropic",
|
|
266
|
+
"model": "claude-sonnet-4-6",
|
|
267
|
+
"apiKey": "$ENV:ANTHROPIC_API_KEY"
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"permissions": {
|
|
271
|
+
"allow": ["Bash(pnpm *)"],
|
|
272
|
+
"deny": ["Bash(rm -rf *)"]
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
## 컨텍스트 자동 탐색
|
|
278
|
+
|
|
279
|
+
CLI는 다음을 자동으로 탐색하고 로드합니다:
|
|
280
|
+
|
|
281
|
+
- **AGENTS.md** — cwd에서 파일시스템 루트까지 상위 디렉토리 탐색
|
|
282
|
+
- **CLAUDE.md** — 동일한 상위 탐색
|
|
283
|
+
- **프로젝트 메타데이터** — `package.json`, `tsconfig.json`
|
|
284
|
+
|
|
285
|
+
모든 컨텍스트가 시스템 프롬프트로 조합됩니다.
|
|
286
|
+
|
|
287
|
+
## 세션 로깅
|
|
288
|
+
|
|
289
|
+
세션 로그는 JSONL 형식으로 `.robota/logs/{sessionId}.jsonl`에 기록됩니다. 재개 가능한 세션 JSON은 `.robota/sessions/{sessionId}.json`에 저장됩니다.
|
|
290
|
+
|
|
291
|
+
## 아키텍처
|
|
292
|
+
|
|
293
|
+
CLI는 순수 TUI 레이어입니다. 모든 비즈니스 로직은 `@robota-sdk/agent-sdk`의 `InteractiveSession`에 있습니다. `useInteractiveSession`이 유일한 React↔SDK 브릿지입니다.
|
|
294
|
+
|
|
295
|
+
## 라이선스
|
|
296
|
+
|
|
297
|
+
MIT
|
package/README.md
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
**Language:** [English](README.md) | [한국어](README.ko.md)
|
|
2
|
+
|
|
1
3
|
# @robota-sdk/agent-cli
|
|
2
4
|
|
|
3
5
|
AI coding assistant CLI built on Robota SDK. Loads AGENTS.md/CLAUDE.md for project context and provides a tool-calling REPL with Claude Code-compatible permission modes.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## Prerequisites
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Node.js **22 or higher** is required.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
node --version # Must output v22.x.x or higher
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
If your version is below 22, upgrade using [nvm](https://github.com/nvm-sh/nvm):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
nvm install 22
|
|
19
|
+
nvm use 22
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
8
23
|
|
|
9
24
|
```bash
|
|
10
25
|
# Global install
|
|
@@ -29,6 +44,7 @@ robota -p "List all files" # Print mode (one-shot, exit after response)
|
|
|
29
44
|
| Variable | Description | Required |
|
|
30
45
|
| ------------------- | ---------------------------------------------- | -------------- |
|
|
31
46
|
| `ANTHROPIC_API_KEY` | Anthropic API key for the `anthropic` provider | Anthropic only |
|
|
47
|
+
| `DEEPSEEK_API_KEY` | DeepSeek API key for the `deepseek` provider | DeepSeek only |
|
|
32
48
|
| `DASHSCOPE_API_KEY` | Alibaba Cloud Model Studio key for `qwen` | Qwen only |
|
|
33
49
|
|
|
34
50
|
Set your key before running:
|
|
@@ -130,7 +146,14 @@ When no usable settings file exists, the CLI prompts for:
|
|
|
130
146
|
|
|
131
147
|
Creates `~/.robota/settings.json`. Use `robota --reset` to return to first-run state.
|
|
132
148
|
|
|
133
|
-
Provider setup is generated from provider definitions. The default CLI build includes Anthropic,
|
|
149
|
+
Provider setup is generated from provider definitions. The default CLI build includes Anthropic,
|
|
150
|
+
OpenAI-compatible, DeepSeek, Gemma, and Qwen providers; other embeddings can inject their own
|
|
151
|
+
provider definitions.
|
|
152
|
+
Interactive setup creates a readable profile key from the selected model id, such as
|
|
153
|
+
`claude-sonnet-4-6` or `gpt-4o`, and appends `-2`, `-3`, etc. when that key already exists. Generated
|
|
154
|
+
profile keys never include API keys or credential hints.
|
|
155
|
+
|
|
156
|
+
Inside the TUI, `/provider` and `/provider list` show configured profiles as an interactive picker. Selecting a profile opens command-owned actions for switch, edit, test, duplicate, delete, and cancel. Headless mode prints the same profile list text without opening prompts.
|
|
134
157
|
|
|
135
158
|
Non-interactive/headless mode never prompts. Configure a provider ahead of time with `robota --configure` in an interactive terminal, or use `robota --configure-provider <profile> --type <type> ... --set-current`.
|
|
136
159
|
|
|
@@ -151,12 +174,14 @@ The AI agent can invoke 8 local tools:
|
|
|
151
174
|
|
|
152
175
|
## Recent TUI Capabilities
|
|
153
176
|
|
|
154
|
-
- Provider setup
|
|
177
|
+
- Provider setup and profile management are generated from provider definitions, so the default CLI
|
|
178
|
+
build can configure, switch, edit, test, duplicate, and delete Anthropic, OpenAI-compatible,
|
|
179
|
+
DeepSeek, Gemma, and Qwen profiles without provider-specific UI branches.
|
|
155
180
|
- Interactive startup can check npm for newer CLI versions; print/headless mode skips startup update checks to keep scripted output deterministic.
|
|
156
181
|
- Long-running sessions show provider usage summaries, status activity, background job tree rows, and collapsed command-output transcripts.
|
|
157
182
|
- Edit results render as context hunks with markdown-friendly diff blocks.
|
|
158
183
|
- Background subagents are real runtime jobs with transcripts and resumable task snapshots.
|
|
159
|
-
- Explicit multi-agent requests
|
|
184
|
+
- Explicit multi-agent requests use the `/agent` command module batch path through the SDK runtime.
|
|
160
185
|
|
|
161
186
|
## Permission System
|
|
162
187
|
|
|
@@ -177,12 +202,12 @@ Every tool call passes through a three-step permission gate:
|
|
|
177
202
|
|
|
178
203
|
### Changing Mode at Runtime
|
|
179
204
|
|
|
180
|
-
Use the `/
|
|
205
|
+
Use the `/permissions` slash command:
|
|
181
206
|
|
|
182
207
|
```
|
|
183
|
-
> /
|
|
184
|
-
> /
|
|
185
|
-
> /
|
|
208
|
+
> /permissions # Show current mode and session-approved tools
|
|
209
|
+
> /permissions plan # Switch to plan (read-only)
|
|
210
|
+
> /permissions bypassPermissions # Skip all prompts
|
|
186
211
|
```
|
|
187
212
|
|
|
188
213
|
Or set it at startup:
|
|
@@ -261,28 +286,27 @@ When a session has a name, it appears in three places:
|
|
|
261
286
|
|
|
262
287
|
- **Input border** — session name shown in the input area border
|
|
263
288
|
- **Terminal title** — updated via ANSI escape sequences
|
|
264
|
-
- **StatusBar** — displayed alongside
|
|
289
|
+
- **StatusBar** — displayed alongside activity, model, and context usage
|
|
265
290
|
|
|
266
291
|
## Slash Commands
|
|
267
292
|
|
|
268
|
-
| Command | Description
|
|
269
|
-
| ------------------------- |
|
|
270
|
-
| `/help` | Show available commands
|
|
271
|
-
| `/clear` | Clear conversation history
|
|
272
|
-
| `/
|
|
273
|
-
| `/
|
|
274
|
-
| `/
|
|
275
|
-
| `/
|
|
276
|
-
| `/
|
|
277
|
-
| `/
|
|
278
|
-
| `/
|
|
279
|
-
| `/
|
|
280
|
-
| `/
|
|
281
|
-
| `/
|
|
282
|
-
| `/
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
Typing `/` triggers an autocomplete popup with arrow-key navigation and Esc to dismiss. Tab inserts the highlighted command into the input field without executing — continue typing args or press Enter to execute. Enter selects and executes immediately. Commands with subcommands (e.g., `/mode`, `/model`) show a nested submenu. Skill commands discovered from `.agents/skills/` and `.claude/commands/` appear alongside built-in commands.
|
|
293
|
+
| Command | Description |
|
|
294
|
+
| ------------------------- | ---------------------------------------------------------------------- |
|
|
295
|
+
| `/help` | Show available commands |
|
|
296
|
+
| `/clear` | Clear conversation history |
|
|
297
|
+
| `/model [model]` | Select AI model (confirmation prompt, CLI restarts) |
|
|
298
|
+
| `/language [lang]` | Set response language (ko, en, ja, zh), saves and restarts |
|
|
299
|
+
| `/compact [instructions]` | Compress context window |
|
|
300
|
+
| `/cost` | Show session info |
|
|
301
|
+
| `/context` | Context window details, reference inventory, and auto-compact controls |
|
|
302
|
+
| `/agent` | Run and manage background subagent jobs |
|
|
303
|
+
| `/permissions [mode]` | Show permission rules or change permission mode |
|
|
304
|
+
| `/plugin [subcommand]` | Plugin management |
|
|
305
|
+
| `/resume` | List recent sessions and resume one |
|
|
306
|
+
| `/rename <name>` | Rename the current session |
|
|
307
|
+
| `/exit` | Exit CLI |
|
|
308
|
+
|
|
309
|
+
Typing `/` triggers an autocomplete popup with arrow-key navigation and Esc to dismiss. Tab inserts the highlighted command into the input field without executing — continue typing args or press Enter to execute. Enter selects and executes immediately. Commands with subcommands (e.g., `/permissions`, `/model`) show a nested submenu. Skill commands discovered from `.agents/skills/` and `.claude/commands/` appear alongside built-in commands.
|
|
286
310
|
|
|
287
311
|
## Plugin Management
|
|
288
312
|
|
|
@@ -315,26 +339,26 @@ Settings are merged in this order, from lowest to highest priority:
|
|
|
315
339
|
{
|
|
316
340
|
"defaultMode": "default",
|
|
317
341
|
"language": "en",
|
|
318
|
-
"currentProvider": "qwen",
|
|
342
|
+
"currentProvider": "qwen-plus",
|
|
319
343
|
"providers": {
|
|
320
|
-
"qwen": {
|
|
344
|
+
"qwen-plus": {
|
|
321
345
|
"type": "qwen",
|
|
322
346
|
"model": "qwen-plus",
|
|
323
347
|
"apiKey": "$ENV:DASHSCOPE_API_KEY",
|
|
324
348
|
"baseURL": "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
|
|
325
349
|
},
|
|
326
|
-
"
|
|
350
|
+
"supergemma4-26b-uncensored-v2": {
|
|
327
351
|
"type": "gemma",
|
|
328
352
|
"model": "supergemma4-26b-uncensored-v2",
|
|
329
353
|
"apiKey": "lm-studio",
|
|
330
354
|
"baseURL": "http://localhost:1234/v1"
|
|
331
355
|
},
|
|
332
|
-
"
|
|
356
|
+
"gpt-4o": {
|
|
333
357
|
"type": "openai",
|
|
334
|
-
"model": "
|
|
358
|
+
"model": "gpt-4o",
|
|
335
359
|
"apiKey": "$ENV:OPENAI_API_KEY"
|
|
336
360
|
},
|
|
337
|
-
"
|
|
361
|
+
"claude-sonnet-4-6": {
|
|
338
362
|
"type": "anthropic",
|
|
339
363
|
"model": "claude-sonnet-4-6",
|
|
340
364
|
"apiKey": "$ENV:ANTHROPIC_API_KEY"
|
|
@@ -347,7 +371,17 @@ Settings are merged in this order, from lowest to highest priority:
|
|
|
347
371
|
}
|
|
348
372
|
```
|
|
349
373
|
|
|
350
|
-
`currentProvider` selects a profile from `providers`.
|
|
374
|
+
`currentProvider` selects a profile key from `providers`. The key is the stable profile identity, not
|
|
375
|
+
the provider type; multiple profile keys may use the same provider type and model when they represent
|
|
376
|
+
different credentials, endpoints, accounts, or operational defaults. Qwen Model Studio profiles use
|
|
377
|
+
`type: "qwen"` with a DashScope-compatible `baseURL`; the API key is usually stored as
|
|
378
|
+
`$ENV:DASHSCOPE_API_KEY`. DeepSeek profiles use `type: "deepseek"` with
|
|
379
|
+
`https://api.deepseek.com` and `$ENV:DEEPSEEK_API_KEY`. Gemma-family LM Studio models use
|
|
380
|
+
`type: "gemma"` so Robota can apply Gemma-specific channel-marker projection while still talking to
|
|
381
|
+
the OpenAI-compatible `/v1/chat/completions` API through `baseURL`. Generic OpenAI-compatible profiles use
|
|
382
|
+
`type: "openai"` and do not apply provider-specific projection. Use `--provider <profile>` for a
|
|
383
|
+
one-shot invocation override; add `--set-current` only when the selected profile should become the
|
|
384
|
+
persisted default. The legacy single-provider shape remains supported:
|
|
351
385
|
|
|
352
386
|
```json
|
|
353
387
|
{
|
|
@@ -369,6 +403,11 @@ The CLI automatically discovers and loads:
|
|
|
369
403
|
|
|
370
404
|
All context is assembled into the system prompt.
|
|
371
405
|
|
|
406
|
+
Ordinary prompts may also reference workspace-local files with path-like `@file` tokens, for
|
|
407
|
+
example `@AGENTS.md` or `@docs/SPEC.md`. The CLI passes those prompts through unchanged; the SDK
|
|
408
|
+
resolves bounded file content under the active `cwd`, sends the enriched prompt to the model, and
|
|
409
|
+
records a structured file-reference event in the session history.
|
|
410
|
+
|
|
372
411
|
## Memory Management
|
|
373
412
|
|
|
374
413
|
- **Message windowing** — React state keeps the most recent 100 messages. Older messages are dropped from the render tree; full history remains in the session store.
|
|
@@ -392,14 +431,14 @@ bin.ts → cli.ts (arg parsing)
|
|
|
392
431
|
│ ├── InteractiveSession (SDK)
|
|
393
432
|
│ ├── CommandRegistry (SDK, re-exported by CLI)
|
|
394
433
|
│ │ ├── BuiltinCommandSource (SDK, empty by default)
|
|
395
|
-
│ │ ├──
|
|
434
|
+
│ │ ├── agent-command-skills (/skills command + virtual skill aliases)
|
|
396
435
|
│ │ ├── PluginCommandSource (SDK, plugin skills)
|
|
397
436
|
│ │ └── ICommandModule sources (/help, /compact, ...)
|
|
398
437
|
│ └── SystemCommandExecutor (SDK)
|
|
399
438
|
├── plugin-hooks-merger.ts (merges plugin hooks into SDK config)
|
|
400
439
|
├── MessageList.tsx
|
|
401
440
|
├── InputArea.tsx (CjkTextInput, bracketed paste, slash detection)
|
|
402
|
-
├── StatusBar.tsx (mode, model, context
|
|
441
|
+
├── StatusBar.tsx (activity, conditional mode, model, context %)
|
|
403
442
|
├── PermissionPrompt.tsx (arrow-key Allow/Deny)
|
|
404
443
|
├── SlashAutocomplete.tsx (command popup with scroll)
|
|
405
444
|
├── DiffBlock.tsx (Edit tool diff display)
|
package/bin/robota.cjs
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
// CJS wrapper — runs synchronously before any ESM module is loaded.
|
|
4
|
+
// Static ESM imports in dist/node/bin.js are hoisted by the JS engine,
|
|
5
|
+
// so version/env checks placed there would execute too late.
|
|
6
|
+
|
|
7
|
+
const REQUIRED_NODE_MAJOR = 22;
|
|
8
|
+
const nodeMajor = parseInt(process.versions.node.split('.')[0], 10);
|
|
9
|
+
if (nodeMajor < REQUIRED_NODE_MAJOR) {
|
|
10
|
+
process.stderr.write(
|
|
11
|
+
'\n Robota requires Node.js ' +
|
|
12
|
+
REQUIRED_NODE_MAJOR +
|
|
13
|
+
' or higher.\n' +
|
|
14
|
+
' Current version: ' +
|
|
15
|
+
process.versions.node +
|
|
16
|
+
'\n\n' +
|
|
17
|
+
' Upgrade options:\n' +
|
|
18
|
+
' nvm: nvm install ' +
|
|
19
|
+
REQUIRED_NODE_MAJOR +
|
|
20
|
+
' && nvm use ' +
|
|
21
|
+
REQUIRED_NODE_MAJOR +
|
|
22
|
+
'\n' +
|
|
23
|
+
' Download: https://nodejs.org/en/download\n\n',
|
|
24
|
+
);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (process.env.TERM_PROGRAM === 'Apple_Terminal') {
|
|
29
|
+
process.stderr.write(
|
|
30
|
+
'\n ⚠️ Warning: macOS Terminal.app detected.\n' +
|
|
31
|
+
' CJK input (Korean/Chinese/Japanese) may cause crashes.\n' +
|
|
32
|
+
' Recommended: use iTerm2 or another terminal emulator.\n\n',
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Load ESM main entry only after synchronous checks pass.
|
|
37
|
+
// CJS can dynamic-import ESM in Node.js 12+. This is the only way to load
|
|
38
|
+
// an ESM module from CJS — eslint-disable is intentional and required.
|
|
39
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
40
|
+
import(new URL('../dist/node/bin.js', 'file://' + __filename)).catch(function (err) {
|
|
41
|
+
process.stderr.write((err && err.message ? err.message : String(err)) + '\n');
|
|
42
|
+
process.exit(1);
|
|
43
|
+
});
|