@calliopelabs/cli 0.4.6 → 0.6.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/README.md +258 -105
- package/dist/branching.d.ts +56 -0
- package/dist/branching.d.ts.map +1 -0
- package/dist/branching.js +211 -0
- package/dist/branching.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +235 -2
- package/dist/cli.js.map +1 -1
- package/dist/completion.d.ts +75 -0
- package/dist/completion.d.ts.map +1 -0
- package/dist/completion.js +234 -0
- package/dist/completion.js.map +1 -0
- package/dist/config.d.ts +36 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +90 -0
- package/dist/config.js.map +1 -1
- package/dist/diff.d.ts +73 -0
- package/dist/diff.d.ts.map +1 -0
- package/dist/diff.js +317 -0
- package/dist/diff.js.map +1 -0
- package/dist/errors.d.ts +41 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +199 -0
- package/dist/errors.js.map +1 -0
- package/dist/file-watcher.d.ts +91 -0
- package/dist/file-watcher.d.ts.map +1 -0
- package/dist/file-watcher.js +269 -0
- package/dist/file-watcher.js.map +1 -0
- package/dist/files.d.ts +49 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.js +191 -0
- package/dist/files.js.map +1 -0
- package/dist/fuzzy-search.d.ts +75 -0
- package/dist/fuzzy-search.d.ts.map +1 -0
- package/dist/fuzzy-search.js +240 -0
- package/dist/fuzzy-search.js.map +1 -0
- package/dist/hooks.d.ts +79 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +271 -0
- package/dist/hooks.js.map +1 -0
- package/dist/keyboard.d.ts +57 -0
- package/dist/keyboard.d.ts.map +1 -0
- package/dist/keyboard.js +265 -0
- package/dist/keyboard.js.map +1 -0
- package/dist/markdown.d.ts +14 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +248 -0
- package/dist/markdown.js.map +1 -0
- package/dist/mcp.d.ts +90 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +290 -0
- package/dist/mcp.js.map +1 -0
- package/dist/memory.d.ts +104 -0
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +394 -0
- package/dist/memory.js.map +1 -0
- package/dist/model-router.d.ts +67 -0
- package/dist/model-router.d.ts.map +1 -0
- package/dist/model-router.js +289 -0
- package/dist/model-router.js.map +1 -0
- package/dist/parallel-tools.d.ts +51 -0
- package/dist/parallel-tools.d.ts.map +1 -0
- package/dist/parallel-tools.js +278 -0
- package/dist/parallel-tools.js.map +1 -0
- package/dist/project-config.d.ts +84 -0
- package/dist/project-config.d.ts.map +1 -0
- package/dist/project-config.js +250 -0
- package/dist/project-config.js.map +1 -0
- package/dist/providers.d.ts +10 -2
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +240 -38
- package/dist/providers.js.map +1 -1
- package/dist/risk.d.ts +31 -0
- package/dist/risk.d.ts.map +1 -0
- package/dist/risk.js +367 -0
- package/dist/risk.js.map +1 -0
- package/dist/sandbox.d.ts +49 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +347 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/skills.d.ts +71 -0
- package/dist/skills.d.ts.map +1 -0
- package/dist/skills.js +383 -0
- package/dist/skills.js.map +1 -0
- package/dist/storage.d.ts +139 -0
- package/dist/storage.d.ts.map +1 -0
- package/dist/storage.js +508 -0
- package/dist/storage.js.map +1 -0
- package/dist/streaming.d.ts +94 -0
- package/dist/streaming.d.ts.map +1 -0
- package/dist/streaming.js +305 -0
- package/dist/streaming.js.map +1 -0
- package/dist/summarization.d.ts +76 -0
- package/dist/summarization.d.ts.map +1 -0
- package/dist/summarization.js +242 -0
- package/dist/summarization.js.map +1 -0
- package/dist/themes.d.ts +110 -0
- package/dist/themes.d.ts.map +1 -0
- package/dist/themes.js +329 -0
- package/dist/themes.js.map +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +335 -1
- package/dist/tools.js.map +1 -1
- package/dist/types.d.ts +56 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +105 -0
- package/dist/types.js.map +1 -1
- package/dist/ui-cli.d.ts +9 -2
- package/dist/ui-cli.d.ts.map +1 -1
- package/dist/ui-cli.js +1315 -220
- package/dist/ui-cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> The Muse of Digital Eloquence
|
|
4
4
|
|
|
5
|
-
Multi-model AI agent CLI with
|
|
5
|
+
Multi-model AI agent CLI with autonomous loops, project memory, and advanced tooling. Use Claude, Gemini, GPT, and more from a single elegant interface.
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
██████╗ █████╗ ██╗ ██╗ ██╗ ██████╗ ██████╗ ███████╗
|
|
@@ -36,11 +36,6 @@ calliope -g
|
|
|
36
36
|
calliope --god-mode
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
On first run, Calliope will guide you through:
|
|
40
|
-
1. Selecting an AI provider (Anthropic, Google, OpenAI, etc.)
|
|
41
|
-
2. Entering your API key
|
|
42
|
-
3. Choosing a persona (Calliope, Professional, or Minimal)
|
|
43
|
-
|
|
44
39
|
## Features
|
|
45
40
|
|
|
46
41
|
### Multi-Model Support
|
|
@@ -48,81 +43,246 @@ On first run, Calliope will guide you through:
|
|
|
48
43
|
Switch between 12+ providers on the fly:
|
|
49
44
|
|
|
50
45
|
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
/provider anthropic # Use Claude
|
|
47
|
+
/provider google # Use Gemini
|
|
48
|
+
/provider openai # Use GPT
|
|
49
|
+
/provider mistral # Use Mistral
|
|
50
|
+
/provider ollama # Use local models
|
|
51
|
+
/provider openrouter # Use any model via OpenRouter
|
|
52
|
+
/provider litellm # Use LiteLLM proxy
|
|
58
53
|
```
|
|
59
54
|
|
|
60
|
-
###
|
|
55
|
+
### Auto Model Routing
|
|
61
56
|
|
|
62
|
-
|
|
57
|
+
Automatically select the best model based on task complexity:
|
|
63
58
|
|
|
64
59
|
```
|
|
65
|
-
|
|
60
|
+
/route on # Enable auto-routing
|
|
61
|
+
/route test "explain quantum computing" # Test routing decision
|
|
66
62
|
```
|
|
67
63
|
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
|
|
64
|
+
Model tiers:
|
|
65
|
+
- **Fast**: Haiku/GPT-4o Mini/Flash - quick, simple tasks
|
|
66
|
+
- **Balanced**: Sonnet/GPT-4o/Pro - moderate complexity
|
|
67
|
+
- **Smart**: Opus/o1/Pro - complex reasoning tasks
|
|
68
|
+
|
|
69
|
+
### Project Memory (CALLIOPE.md)
|
|
70
|
+
|
|
71
|
+
Persistent memory across sessions using markdown files:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
/memory init # Create CALLIOPE.md
|
|
75
|
+
/memory add context "This is a TypeScript project"
|
|
76
|
+
/memory add preference "Use functional components"
|
|
77
|
+
/memory show # View project memory
|
|
78
|
+
/memory global # View global preferences
|
|
79
|
+
```
|
|
73
80
|
|
|
74
|
-
|
|
81
|
+
Calliope automatically loads context from standard files:
|
|
82
|
+
- `CALLIOPE.md` - Project memory
|
|
83
|
+
- `CLAUDE.md` - Claude context
|
|
84
|
+
- `README.md`, `SPEC.md`, `TODO.md`
|
|
85
|
+
- `ARCHITECTURE.md`, `DESIGN.md`, `NOTES.md`
|
|
86
|
+
- `.cursorrules`, `.github/copilot-instructions.md`
|
|
75
87
|
|
|
76
88
|
### Tools
|
|
77
89
|
|
|
78
|
-
|
|
79
|
-
- **Shell** - Run any command
|
|
80
|
-
- **Read/Write Files** - File operations
|
|
81
|
-
- **Think** - Structured reasoning
|
|
90
|
+
Built-in tools for autonomous operation:
|
|
82
91
|
|
|
83
|
-
|
|
92
|
+
| Tool | Description |
|
|
93
|
+
|------|-------------|
|
|
94
|
+
| `shell` | Execute shell commands |
|
|
95
|
+
| `read_file` | Read file contents |
|
|
96
|
+
| `write_file` | Write files with diff preview |
|
|
97
|
+
| `list_files` | Directory listing |
|
|
98
|
+
| `think` | Structured reasoning |
|
|
99
|
+
| `execute_code` | Run Python/Node/Bash in sandbox |
|
|
100
|
+
| `web_search` | Search the web |
|
|
101
|
+
| `git` | Git operations |
|
|
102
|
+
| `mermaid` | Generate diagrams |
|
|
84
103
|
|
|
85
|
-
|
|
104
|
+
### Sandboxed Code Execution
|
|
86
105
|
|
|
106
|
+
Execute code safely in Docker containers:
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
The execute_code tool automatically:
|
|
110
|
+
- Uses Docker when available (recommended)
|
|
111
|
+
- Falls back to local execution
|
|
112
|
+
- Shows [sandboxed] or [unsandboxed] status
|
|
113
|
+
- Enforces resource limits and timeouts
|
|
87
114
|
```
|
|
88
|
-
calliope> /models
|
|
89
|
-
🔍 Discovering models for anthropic...
|
|
90
|
-
✨ Found 5 models
|
|
91
115
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
Claude 3 Opus (200K tokens) - $15.00/$75.00/1M
|
|
96
|
-
...
|
|
116
|
+
### MCP Server Support
|
|
117
|
+
|
|
118
|
+
Connect external tools via Model Context Protocol:
|
|
97
119
|
|
|
98
|
-
calliope> /model # Interactive selection
|
|
99
|
-
calliope> /model gpt-4o # Direct model set
|
|
100
120
|
```
|
|
121
|
+
/mcp add https://mcp-server.example.com
|
|
122
|
+
/mcp list # Show connected servers
|
|
123
|
+
/mcp tools # List available tools
|
|
124
|
+
/mcp refresh # Reconnect all servers
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Agent Skills (AgentSkills.io)
|
|
128
|
+
|
|
129
|
+
Install reusable skills from the registry:
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
/skills add git-workflow
|
|
133
|
+
/skills add code-review
|
|
134
|
+
/skills list
|
|
135
|
+
/skills info <name>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Conversation Branching
|
|
139
|
+
|
|
140
|
+
Fork conversations to explore different approaches:
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
/branch new experiment "Try approach B"
|
|
144
|
+
/branch list
|
|
145
|
+
/branch switch experiment
|
|
146
|
+
/branch delete experiment
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Themes
|
|
101
150
|
|
|
102
|
-
|
|
151
|
+
Customize the color scheme:
|
|
152
|
+
|
|
153
|
+
```
|
|
154
|
+
/theme list # Show available themes
|
|
155
|
+
/theme monokai # Set theme
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Available themes: `default`, `light`, `monokai`, `nord`, `minimal`
|
|
159
|
+
|
|
160
|
+
### Hooks System
|
|
161
|
+
|
|
162
|
+
Run custom scripts before/after tool execution:
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
/hooks init # Initialize default hooks
|
|
166
|
+
/hooks list # Show configured hooks
|
|
167
|
+
/hooks add pre-shell "echo Running: $CALLIOPE_COMMAND"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Hook events: `pre-tool`, `post-tool`, `pre-shell`, `post-shell`, `pre-write`, `post-write`, `session-start`, `session-end`
|
|
171
|
+
|
|
172
|
+
### Context Summarization
|
|
173
|
+
|
|
174
|
+
Manage long conversations:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
/summarize context # View conversation summary
|
|
178
|
+
/summarize compact # Compress context to fit limits
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Project Configuration (.calliope)
|
|
182
|
+
|
|
183
|
+
Human-readable project config:
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
/project init # Create .calliope file
|
|
187
|
+
/project show # View config
|
|
188
|
+
/project run build # Run defined command
|
|
189
|
+
```
|
|
103
190
|
|
|
191
|
+
Format:
|
|
104
192
|
```
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
193
|
+
project: My Project
|
|
194
|
+
provider: anthropic
|
|
195
|
+
model: claude-sonnet-4-20250514
|
|
196
|
+
|
|
197
|
+
[tech]
|
|
198
|
+
typescript
|
|
199
|
+
react
|
|
200
|
+
postgres
|
|
201
|
+
|
|
202
|
+
[conventions]
|
|
203
|
+
Use functional components
|
|
204
|
+
Prefer async/await
|
|
205
|
+
|
|
206
|
+
[commands]
|
|
207
|
+
build: npm run build
|
|
208
|
+
test: npm test
|
|
108
209
|
```
|
|
109
210
|
|
|
110
|
-
## Commands
|
|
211
|
+
## Commands Reference
|
|
111
212
|
|
|
213
|
+
### Core
|
|
112
214
|
| Command | Description |
|
|
113
215
|
|---------|-------------|
|
|
114
216
|
| `/help` | Show all commands |
|
|
115
|
-
| `/
|
|
116
|
-
| `/model [name]` | Set model (interactive if no name) |
|
|
117
|
-
| `/models` | Browse and select available models |
|
|
118
|
-
| `/persona <name>` | Switch persona |
|
|
217
|
+
| `/exit` | Exit Calliope |
|
|
119
218
|
| `/clear` | Clear conversation |
|
|
120
219
|
| `/status` | Show current status |
|
|
121
|
-
| `/
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
|
125
|
-
|
|
220
|
+
| `/config` | Show configuration |
|
|
221
|
+
|
|
222
|
+
### Model & Provider
|
|
223
|
+
| Command | Description |
|
|
224
|
+
|---------|-------------|
|
|
225
|
+
| `/provider [name]` | Switch AI provider |
|
|
226
|
+
| `/model [name]` | Set model (interactive if no name) |
|
|
227
|
+
| `/models` | Browse available models |
|
|
228
|
+
| `/route [on\|off\|test]` | Auto model routing |
|
|
229
|
+
| `/persona [name]` | Switch persona |
|
|
230
|
+
|
|
231
|
+
### Modes
|
|
232
|
+
| Command | Description |
|
|
233
|
+
|---------|-------------|
|
|
234
|
+
| `/mode [plan\|hybrid\|work]` | Switch operating mode |
|
|
235
|
+
| `/confirm [on\|off]` | Toggle risky op confirmation |
|
|
236
|
+
|
|
237
|
+
Modes:
|
|
238
|
+
- **Plan**: Analyze and plan, don't execute
|
|
239
|
+
- **Hybrid**: Plan then execute (default)
|
|
240
|
+
- **Work**: Execute without planning
|
|
241
|
+
|
|
242
|
+
### Session & History
|
|
243
|
+
| Command | Description |
|
|
244
|
+
|---------|-------------|
|
|
245
|
+
| `/session [list\|info]` | Session management |
|
|
246
|
+
| `/history [search]` | Chat history |
|
|
247
|
+
| `/context [load\|summary]` | Context management |
|
|
248
|
+
| `/summarize [context\|compact]` | Summarize conversation |
|
|
249
|
+
|
|
250
|
+
### Memory & Config
|
|
251
|
+
| Command | Description |
|
|
252
|
+
|---------|-------------|
|
|
253
|
+
| `/memory [init\|add\|show\|global]` | Project memory |
|
|
254
|
+
| `/project [init\|show\|run]` | Project config |
|
|
255
|
+
| `/profile [name\|save\|del]` | Switch/save profiles |
|
|
256
|
+
|
|
257
|
+
### Search & Navigation
|
|
258
|
+
| Command | Description |
|
|
259
|
+
|---------|-------------|
|
|
260
|
+
| `/find <pattern>` | Fuzzy file search |
|
|
261
|
+
| `/search <query>` | Search conversation |
|
|
262
|
+
| `/branch [new\|switch\|list]` | Conversation branches |
|
|
263
|
+
|
|
264
|
+
### Tools & Extensions
|
|
265
|
+
| Command | Description |
|
|
266
|
+
|---------|-------------|
|
|
267
|
+
| `/mcp [list\|add\|remove\|tools]` | MCP servers |
|
|
268
|
+
| `/skills [list\|add\|remove\|info]` | Agent skills |
|
|
269
|
+
| `/hooks [list\|add\|init]` | Pre/post tool hooks |
|
|
270
|
+
|
|
271
|
+
### Tasks & Planning
|
|
272
|
+
| Command | Description |
|
|
273
|
+
|---------|-------------|
|
|
274
|
+
| `/todo [add\|done\|list]` | Manage TODOs |
|
|
275
|
+
| `/plans [list\|view]` | View plan history |
|
|
276
|
+
|
|
277
|
+
### Interface
|
|
278
|
+
| Command | Description |
|
|
279
|
+
|---------|-------------|
|
|
280
|
+
| `/theme [name\|list]` | Color themes |
|
|
281
|
+
| `/copy` | Copy last response |
|
|
282
|
+
| `/export [file.md]` | Export conversation |
|
|
283
|
+
| `/edit` | Edit last message |
|
|
284
|
+
| `/undo` | Remove last exchange |
|
|
285
|
+
| `/upgrade` | Check for updates |
|
|
126
286
|
|
|
127
287
|
## Environment Variables
|
|
128
288
|
|
|
@@ -156,84 +316,77 @@ calliope --reset
|
|
|
156
316
|
calliope --setup
|
|
157
317
|
```
|
|
158
318
|
|
|
159
|
-
|
|
319
|
+
### Profiles
|
|
160
320
|
|
|
161
|
-
|
|
321
|
+
Save and switch between configurations:
|
|
162
322
|
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
╭─ ⚡ shell
|
|
169
|
-
│ $ ls -la
|
|
170
|
-
│ ...
|
|
171
|
-
╰─ ✓
|
|
172
|
-
│ This directory contains...
|
|
323
|
+
```
|
|
324
|
+
/profile save work # Save current settings
|
|
325
|
+
/profile work # Load profile
|
|
326
|
+
/profile delete work # Delete profile
|
|
327
|
+
/profile list # Show all profiles
|
|
173
328
|
```
|
|
174
329
|
|
|
175
|
-
|
|
330
|
+
Built-in profiles: `fast`, `smart`, `cheap`, `local`
|
|
176
331
|
|
|
177
|
-
|
|
178
|
-
calliope> /loop "Refactor all TypeScript files to use strict mode. Run tsc after each change. Output DONE when no errors." --max-iterations 30 --completion-promise "DONE"
|
|
332
|
+
## Keyboard Shortcuts
|
|
179
333
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
334
|
+
| Key | Action |
|
|
335
|
+
|-----|--------|
|
|
336
|
+
| `ESC` | Exit |
|
|
337
|
+
| `Shift+Tab` | Cycle modes |
|
|
338
|
+
| `Ctrl+C` | Cancel operation |
|
|
339
|
+
| `Ctrl+L` | Clear screen |
|
|
340
|
+
| `Up/Down` | Navigate history |
|
|
341
|
+
| `Tab` | Tab completion |
|
|
184
342
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
343
|
+
## File References
|
|
344
|
+
|
|
345
|
+
Reference files directly in your messages:
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
@filename.ts # Include file content
|
|
349
|
+
./path/to/file # Relative path
|
|
350
|
+
/absolute/path/file # Absolute path
|
|
188
351
|
```
|
|
189
352
|
|
|
353
|
+
Images are automatically detected and sent for vision models.
|
|
354
|
+
|
|
190
355
|
## Security
|
|
191
356
|
|
|
192
357
|
### API Key Storage
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
-
|
|
196
|
-
- The config file should have restricted permissions (0600)
|
|
197
|
-
- Never commit your config file to version control
|
|
358
|
+
- Keys stored in `~/.config/calliope/config.json`
|
|
359
|
+
- Prefer environment variables for better security
|
|
360
|
+
- Never commit config to version control
|
|
198
361
|
|
|
199
362
|
### Tool Execution
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
-
|
|
203
|
-
-
|
|
204
|
-
- **Timeout limits** - Shell commands timeout after 60 seconds by default
|
|
363
|
+
- Path traversal protection
|
|
364
|
+
- Sandboxed code execution via Docker
|
|
365
|
+
- Timeout limits on all commands
|
|
366
|
+
- Hook system for custom validation
|
|
205
367
|
|
|
206
368
|
### Best Practices
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
4. **Work in project directories** - Run Calliope from your project root, not system directories
|
|
369
|
+
1. Review tool calls before execution
|
|
370
|
+
2. Use god mode (`-g`) only for trusted tasks
|
|
371
|
+
3. Set iteration limits on loops
|
|
372
|
+
4. Work from project directories, not system directories
|
|
212
373
|
|
|
213
374
|
## Troubleshooting
|
|
214
375
|
|
|
215
|
-
### Common Issues
|
|
216
|
-
|
|
217
376
|
**"No API keys configured"**
|
|
218
|
-
- Run `calliope --setup`
|
|
219
|
-
- Or set environment variable: `export ANTHROPIC_API_KEY=sk-ant-...`
|
|
220
|
-
|
|
221
|
-
**"API key too short"**
|
|
222
|
-
- API keys have minimum length requirements (usually 40+ characters)
|
|
223
|
-
- Make sure you copied the full key
|
|
377
|
+
- Run `calliope --setup` or set environment variable
|
|
224
378
|
|
|
225
379
|
**"Empty response from API"**
|
|
226
|
-
- Check
|
|
227
|
-
- Try a different provider
|
|
380
|
+
- Check API key validity and credits
|
|
381
|
+
- Try a different provider
|
|
228
382
|
|
|
229
383
|
**"Access denied" for file operations**
|
|
230
|
-
-
|
|
231
|
-
- Use absolute paths within allowed directories
|
|
232
|
-
|
|
233
|
-
## More from Calliope
|
|
384
|
+
- Operations restricted to cwd and home directory
|
|
234
385
|
|
|
235
|
-
|
|
386
|
+
**Docker not available for sandbox**
|
|
387
|
+
- Install Docker for safer code execution
|
|
388
|
+
- Without Docker, code runs locally (unsandboxed)
|
|
236
389
|
|
|
237
390
|
## License
|
|
238
391
|
|
|
239
|
-
MIT
|
|
392
|
+
MIT
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calliope CLI - Conversation Branching
|
|
3
|
+
*
|
|
4
|
+
* Fork conversations to try different approaches.
|
|
5
|
+
* Supports creating, switching, and merging branches.
|
|
6
|
+
*/
|
|
7
|
+
import type { Message as LLMMessage } from './types.js';
|
|
8
|
+
export interface Branch {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
parentId: string | null;
|
|
12
|
+
parentMessageIndex: number;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface BranchState {
|
|
17
|
+
currentBranch: string;
|
|
18
|
+
branches: Record<string, Branch>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Load branch state for a session
|
|
22
|
+
*/
|
|
23
|
+
export declare function loadBranchState(sessionId: string): BranchState;
|
|
24
|
+
/**
|
|
25
|
+
* Save branch state
|
|
26
|
+
*/
|
|
27
|
+
export declare function saveBranchState(sessionId: string, state: BranchState): void;
|
|
28
|
+
/**
|
|
29
|
+
* Create a new branch from current position
|
|
30
|
+
*/
|
|
31
|
+
export declare function createBranch(sessionId: string, name: string, messages: LLMMessage[], description?: string): Branch;
|
|
32
|
+
/**
|
|
33
|
+
* Switch to a different branch
|
|
34
|
+
*/
|
|
35
|
+
export declare function switchBranch(sessionId: string, branchIdOrName: string, currentMessages: LLMMessage[]): LLMMessage[] | null;
|
|
36
|
+
/**
|
|
37
|
+
* List all branches
|
|
38
|
+
*/
|
|
39
|
+
export declare function listBranches(sessionId: string): Branch[];
|
|
40
|
+
/**
|
|
41
|
+
* Get current branch
|
|
42
|
+
*/
|
|
43
|
+
export declare function getCurrentBranch(sessionId: string): Branch;
|
|
44
|
+
/**
|
|
45
|
+
* Delete a branch
|
|
46
|
+
*/
|
|
47
|
+
export declare function deleteBranch(sessionId: string, branchIdOrName: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Rename a branch
|
|
50
|
+
*/
|
|
51
|
+
export declare function renameBranch(sessionId: string, branchIdOrName: string, newName: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Get branch tree for display
|
|
54
|
+
*/
|
|
55
|
+
export declare function getBranchTree(sessionId: string): string;
|
|
56
|
+
//# sourceMappingURL=branching.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branching.d.ts","sourceRoot":"","sources":["../src/branching.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAC;AAMxD,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AA4BD;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,CAuB9D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAG3E;AAMD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,UAAU,EAAE,EACtB,WAAW,CAAC,EAAE,MAAM,GACnB,MAAM,CA4BR;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,UAAU,EAAE,GAC5B,UAAU,EAAE,GAAG,IAAI,CAqBrB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAKxD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAG1D;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAwB/E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,GACd,OAAO,CAYT;AA8BD;;GAEG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CA2BvD"}
|