@robota-sdk/agent-cli 3.0.0-beta.45 → 3.0.0-beta.47
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.md +67 -13
- package/dist/node/bin.js +1 -1
- package/dist/node/{chunk-Y6VSMUKG.js → chunk-74WEPZG2.js} +346 -98
- package/dist/node/index.cjs +345 -97
- package/dist/node/index.js +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -78,10 +78,33 @@ robota --model <model> # Model override (e.g., claude-sonnet-4-6)
|
|
|
78
78
|
robota --language <lang> # Response language (ko, en, ja, zh)
|
|
79
79
|
robota --permission-mode <mode> # plan | default | acceptEdits | bypassPermissions
|
|
80
80
|
robota --max-turns <n> # Limit agentic turns per interaction
|
|
81
|
+
robota --output-format <fmt> # text | json | stream-json (print mode)
|
|
82
|
+
robota --system-prompt <text> # Replace system prompt (print mode)
|
|
83
|
+
robota --append-system-prompt <text> # Append to system prompt (print mode)
|
|
81
84
|
robota --reset # Delete user settings and exit
|
|
82
85
|
robota --version # Show version
|
|
83
86
|
```
|
|
84
87
|
|
|
88
|
+
### Print Mode Output Formats
|
|
89
|
+
|
|
90
|
+
Print mode (`-p`) supports three output formats via `--output-format`:
|
|
91
|
+
|
|
92
|
+
| Format | Description |
|
|
93
|
+
| ------------- | ------------------------------------------------------------------ |
|
|
94
|
+
| `text` | Plain text response to stdout (default) |
|
|
95
|
+
| `json` | Single JSON object: `{ type, result, session_id, subtype }` |
|
|
96
|
+
| `stream-json` | Newline-delimited JSON with `content_block_delta` streaming events |
|
|
97
|
+
|
|
98
|
+
### Stdin Pipe
|
|
99
|
+
|
|
100
|
+
When `-p` is used without a positional argument and stdin is piped, the CLI reads from stdin:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
echo "Explain this error" | robota -p
|
|
104
|
+
cat file.ts | robota -p "Review this code" --output-format json
|
|
105
|
+
git diff | robota -p "Summarize changes" --output-format stream-json
|
|
106
|
+
```
|
|
107
|
+
|
|
85
108
|
## First-Run Setup
|
|
86
109
|
|
|
87
110
|
When no settings file exists, the CLI prompts for:
|
|
@@ -181,6 +204,34 @@ After the Edit tool runs, a `DiffBlock` component renders the change inline:
|
|
|
181
204
|
|
|
182
205
|
Removed lines appear in red with `-`, added lines in green with `+`. Diffs longer than 10 lines show the first 8 + a `... and N more lines` summary.
|
|
183
206
|
|
|
207
|
+
## Session Management
|
|
208
|
+
|
|
209
|
+
The CLI supports continuing, resuming, forking, and naming sessions.
|
|
210
|
+
|
|
211
|
+
### CLI Flags
|
|
212
|
+
|
|
213
|
+
| Flag | Description |
|
|
214
|
+
| --------------------- | ------------------------------------------------ |
|
|
215
|
+
| `-c`, `--continue` | Continue the most recent session |
|
|
216
|
+
| `-r`, `--resume <id>` | Resume a specific session by ID |
|
|
217
|
+
| `--fork-session <id>` | Fork a session (new session with copied history) |
|
|
218
|
+
| `--name <name>` | Assign a name to the session at startup |
|
|
219
|
+
|
|
220
|
+
### TUI Commands
|
|
221
|
+
|
|
222
|
+
| Command | Description |
|
|
223
|
+
| ---------------- | ----------------------------------- |
|
|
224
|
+
| `/resume` | List recent sessions and resume one |
|
|
225
|
+
| `/rename <name>` | Rename the current session |
|
|
226
|
+
|
|
227
|
+
### Session Name Display
|
|
228
|
+
|
|
229
|
+
When a session has a name, it appears in three places:
|
|
230
|
+
|
|
231
|
+
- **Input border** — session name shown in the input area border
|
|
232
|
+
- **Terminal title** — updated via ANSI escape sequences
|
|
233
|
+
- **StatusBar** — displayed alongside mode, model, and context usage
|
|
234
|
+
|
|
184
235
|
## Slash Commands
|
|
185
236
|
|
|
186
237
|
| Command | Description |
|
|
@@ -195,9 +246,11 @@ Removed lines appear in red with `-`, added lines in green with `+`. Diffs longe
|
|
|
195
246
|
| `/context` | Context window details |
|
|
196
247
|
| `/permissions` | Show permission rules |
|
|
197
248
|
| `/plugin [subcommand]` | Plugin management TUI |
|
|
249
|
+
| `/resume` | List recent sessions and resume one |
|
|
250
|
+
| `/rename <name>` | Rename the current session |
|
|
198
251
|
| `/exit` | Exit CLI |
|
|
199
252
|
|
|
200
|
-
Typing `/` triggers an autocomplete popup with arrow-key navigation
|
|
253
|
+
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.
|
|
201
254
|
|
|
202
255
|
## Plugin Management
|
|
203
256
|
|
|
@@ -287,18 +340,19 @@ bin.ts → cli.ts (arg parsing)
|
|
|
287
340
|
|
|
288
341
|
## Dependencies
|
|
289
342
|
|
|
290
|
-
| Package
|
|
291
|
-
|
|
|
292
|
-
| `@robota-sdk/agent-sdk`
|
|
293
|
-
| `@robota-sdk/agent-core`
|
|
294
|
-
| `
|
|
295
|
-
| `ink
|
|
296
|
-
| `ink-
|
|
297
|
-
| `
|
|
298
|
-
| `
|
|
299
|
-
| `
|
|
300
|
-
| `
|
|
301
|
-
| `
|
|
343
|
+
| Package | Purpose |
|
|
344
|
+
| -------------------------------------- | ------------------------------------------ |
|
|
345
|
+
| `@robota-sdk/agent-sdk` | Session factory, query, config, context |
|
|
346
|
+
| `@robota-sdk/agent-core` | Types (TPermissionMode, TToolArgs) |
|
|
347
|
+
| `@robota-sdk/agent-transport-headless` | Headless runner for print mode (`-p`) |
|
|
348
|
+
| `ink`, `react` | TUI rendering |
|
|
349
|
+
| `ink-select-input` | Arrow-key selection (permission prompt) |
|
|
350
|
+
| `ink-spinner` | Loading spinner |
|
|
351
|
+
| `chalk` | Terminal colors |
|
|
352
|
+
| `ink-text-input` | Base text input (extended by CjkTextInput) |
|
|
353
|
+
| `marked`, `marked-terminal` | Markdown parsing and terminal rendering |
|
|
354
|
+
| `cli-highlight` | Syntax highlighting for code blocks |
|
|
355
|
+
| `string-width` | Unicode-aware string width (CJK support) |
|
|
302
356
|
|
|
303
357
|
## Documentation
|
|
304
358
|
|