@protolabsai/proto 0.26.16 → 0.26.21
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 +44 -21
- package/cli.js +7128 -5997
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -51,9 +51,40 @@ cargo install beads_rust
|
|
|
51
51
|
|
|
52
52
|
## Quick Start
|
|
53
53
|
|
|
54
|
-
### 1.
|
|
54
|
+
### 1. Run the setup wizard
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
```bash
|
|
57
|
+
proto setup
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`proto setup` is an interactive wizard that picks a provider (OpenAI, Anthropic, Gemini, or any OpenAI-compatible endpoint), discovers the available models, optionally configures voice/STT, and writes everything to `~/.proto/settings.json` for you. Re-run it any time to switch providers or pick a different default model.
|
|
61
|
+
|
|
62
|
+
### 2. Set your API key
|
|
63
|
+
|
|
64
|
+
The wizard tells you which env var it expects (e.g. `OPENAI_API_KEY`). Set it once:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
export OPENAI_API_KEY=sk-your-key-here
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Or persist it in `~/.proto/.env`:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
OPENAI_API_KEY=sk-your-key-here
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 3. Run proto
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
proto # interactive mode
|
|
80
|
+
proto -p "explain this codebase" # one-shot mode
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
No auth screen — proto connects directly to your endpoint.
|
|
84
|
+
|
|
85
|
+
### Manual setup (advanced)
|
|
86
|
+
|
|
87
|
+
If you'd rather skip the wizard, drop a `~/.proto/settings.json` of your own:
|
|
57
88
|
|
|
58
89
|
```json
|
|
59
90
|
{
|
|
@@ -74,25 +105,6 @@ proto connects to any OpenAI-compatible API. Create `~/.proto/settings.json`:
|
|
|
74
105
|
}
|
|
75
106
|
```
|
|
76
107
|
|
|
77
|
-
### 2. Set your API key
|
|
78
|
-
|
|
79
|
-
Create `~/.proto/.env`:
|
|
80
|
-
|
|
81
|
-
```
|
|
82
|
-
MY_API_KEY=sk-your-key-here
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Or export it in your shell: `export MY_API_KEY=sk-your-key-here`
|
|
86
|
-
|
|
87
|
-
### 3. Run proto
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
proto # interactive mode
|
|
91
|
-
proto -p "explain this codebase" # one-shot mode
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
No auth screen — proto connects directly to your endpoint.
|
|
95
|
-
|
|
96
108
|
### Example: Multiple models via a gateway
|
|
97
109
|
|
|
98
110
|
If you run a gateway like [LiteLLM](https://github.com/BerriAI/litellm) in front of multiple providers, register them all under `modelProviders.openai` and switch between them with `/model`:
|
|
@@ -256,6 +268,17 @@ br create --title "Fix auth bug" --type task --priority 1
|
|
|
256
268
|
br close <id> --reason "Fixed in commit abc123"
|
|
257
269
|
```
|
|
258
270
|
|
|
271
|
+
## Long-running Background Shells
|
|
272
|
+
|
|
273
|
+
proto captures the output of shell commands run with `is_background: true` to disk so detached processes never silently lose their stdout. The agent gets a stable task ID and an absolute output file path it can read at any time, plus an automatic `<task_notification>` on the next turn when the task exits.
|
|
274
|
+
|
|
275
|
+
- **Output file:** `<projectTempDir>/<sessionId>/tasks/<taskId>.output` — written by the OS via shell-level redirection, so it keeps growing even after the parent wrapper exits.
|
|
276
|
+
- **Completion:** when the bg process exits, the next user prompt is prefixed with a `<task_notification>` block carrying `task_id`, `output_file`, `status` (completed/failed/killed), and `exit_code`. The agent can then `read_file` the output for results.
|
|
277
|
+
- **`/bg`** lists running and recently-completed background tasks.
|
|
278
|
+
- **`bg_stop` tool** — sends SIGTERM to the process group, escalating to SIGKILL after a 3s grace.
|
|
279
|
+
|
|
280
|
+
This is what fixes the "agent runs an eval, can't find the results" failure mode that plagued earlier versions where backgrounded `&` commands streamed into nowhere.
|
|
281
|
+
|
|
259
282
|
## Memory
|
|
260
283
|
|
|
261
284
|
proto has a persistent memory system inspired by Claude Code. Memories are individual markdown files with YAML frontmatter, organized by type and stored per-project or globally.
|