@pirol/nido 0.2.0 → 0.2.1

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.
Files changed (2) hide show
  1. package/README.md +63 -81
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,50 +1,52 @@
1
1
  # nido
2
2
 
3
- CLI für Agenten-Sandboxes, wie im Konzept
4
- [Agenten-Sandboxes auf OpenShell](../docs/concepts/agent-sandboxes.md)
5
- beschrieben. Man gibt nido einen Ordner, nido lässt darin einen Agenten
6
- arbeiten und holt die Ergebnisse zurück. Jede Sandbox läuft in einer eigenen
7
- Kata-VM.
3
+ Run coding agents and commands in isolated sandboxes. Give nido a folder, it lets an agent work
4
+ on it in a sandbox and brings the results back.
8
5
 
9
- Stand: geschlossene Beta (#686–#688). nido spricht mit `pirol-agents-api`
10
- unter `https://nido.pirol.ai`. Die API prüft den Pirol-Schlüssel, trennt die
11
- Kunden und reicht die Aufrufe an das OpenShell-Gateway weiter. Die Doku für
12
- Kunden steht unter [pirol.ai/docs/sandboxes](https://pirol.ai/docs/sandboxes).
6
+ Every sandbox is its own small virtual machine (Kata Containers) in Frankfurt, run by
7
+ [Pirol](https://pirol.ai).
13
8
 
14
- ## Einrichten
9
+ > **Closed beta.** Free during the beta, for invited accounts only, up to 5 sandboxes per account.
10
+ > Ask for access at [hello@pirol.ai](mailto:hello@pirol.ai).
15
11
 
16
- Voraussetzung: Node 20 oder neuer und ein Pirol-Konto, das für die Beta
17
- freigeschaltet ist (`BETA_ALLOWLIST` in
18
- [deploy-agents-api.sh](../infra/agent-sandbox/deploy-agents-api.sh)).
12
+ Full documentation: [pirol.ai/docs/sandboxes](https://pirol.ai/docs/sandboxes)
13
+
14
+ ## Install
15
+
16
+ Requires Node 20 or newer.
19
17
 
20
18
  ```bash
21
19
  npm install -g @pirol/nido
22
20
  nido login
23
21
  ```
24
22
 
25
- `nido login` läuft wie `kyte login`: Der Browser öffnet pirol.ai, man
26
- bestätigt, und nido legt den Schlüssel in `~/.nido/config.json` ab (nur für
27
- den Nutzer lesbar). Ohne Browser hilft `nido login --manual`. In CI reicht
28
- die Umgebungsvariable `PIROL_API_KEY`. `NIDO_API_URL` zeigt nido auf eine
29
- andere API, etwa eine lokale.
23
+ `nido login` opens your browser. You confirm with your Pirol account, and nido stores a key in
24
+ `~/.nido/config.json` (readable only by you). Without a browser, use `nido login --manual`. In CI,
25
+ set `PIROL_API_KEY` instead.
30
26
 
31
- Aus dem Repo statt von npm:
27
+ ## Run an agent on a folder
32
28
 
33
29
  ```bash
34
- cd nido && npm install && npm run build && npm link
30
+ cd my-project
31
+ nido init # writes nido.json
32
+ nido secret set anthropic # once; asks for the key without echo
33
+ nido run
35
34
  ```
36
35
 
37
- ## Ordner mit `nido.json`
36
+ `nido run`:
38
37
 
39
- ```bash
40
- mkdir survey && cd survey
41
- cp ~/Downloads/results.csv .
42
- nido init # writes nido.json for Claude Code
43
- nido secret set anthropic # once, asks for the key without echo
44
- nido run
45
- ```
38
+ 1. Creates the sandbox if it does not exist yet. The name comes from `name` or the folder name.
39
+ A new sandbox is ready in about 20 seconds.
40
+ 2. Uploads changed files. Unchanged files are not uploaded again; files you deleted locally are
41
+ deleted in the sandbox too.
42
+ 3. Runs the agent and shows each step on one line.
43
+ 4. Brings `output/` back. A file you changed locally is not overwritten; the sandbox version is
44
+ saved next to it, for example as `report.remote.md`.
46
45
 
47
- `nido.json`:
46
+ The sandbox keeps running afterwards. The next `nido run` reuses it, `nido run --fresh` starts
47
+ over. `nido pull` fetches `output/` again.
48
+
49
+ ### nido.json
48
50
 
49
51
  ```json
50
52
  {
@@ -57,40 +59,23 @@ nido run
57
59
  }
58
60
  ```
59
61
 
60
- Was `nido run` macht:
61
-
62
- 1. Sandbox anlegen, falls es sie noch nicht gibt. Der Name kommt aus
63
- `name` oder dem Ordnernamen. Ein neuer Start dauert etwa 20 Sekunden.
64
- 2. Geänderte Dateien hochladen. nido merkt sich die Hashes in
65
- `.nido/state.json`. Unveränderte Dateien gehen nicht noch einmal hoch,
66
- lokal gelöschte verschwinden auch in der Sandbox.
67
- 3. Den Agenten starten. Bei Claude zeigt nido jeden Schritt in einer Zeile.
68
- 4. `output/` zurückholen. Neue Dateien landen im Ordner. Eine Datei, die
69
- man lokal geändert hat, überschreibt nido nicht. Die Fassung aus der
70
- Sandbox heißt dann zum Beispiel `report.remote.md`.
71
-
72
- Die Sandbox bleibt danach stehen. Der nächste `nido run` nutzt sie weiter,
73
- `nido run --fresh` fängt neu an.
74
-
75
- Statt eines Agenten geht auch ein Befehl, das braucht keinen Schlüssel:
62
+ Instead of an agent, run any command. It needs no key:
76
63
 
77
64
  ```json
78
65
  { "command": "python analyze.py", "output": "output/" }
79
66
  ```
80
67
 
81
- Felder:
82
-
83
- | Feld | Bedeutung |
84
- |---|---|
85
- | `agent` | `claude`, weitere folgen |
86
- | `task` | Auftrag an den Agenten |
87
- | `command` | statt `agent`: Befehl als Text (läuft in bash) oder Liste |
88
- | `name` | Name der Sandbox, sonst der Ordnername |
89
- | `image` | eigenes Image, sonst das OpenShell-Community-Image mit Claude Code, Codex und OpenCode |
90
- | `files.exclude` | Muster wie in `.gitignore`. `.git` und `.nido` bleiben immer draußen |
91
- | `secrets` | Namen von Secrets, nie die Werte |
92
- | `network` | Hosts, die die Sandbox auf Port 443 erreichen darf. Sonst ist das Netz zu |
93
- | `output` | Ordner, den nido zurückholt, Standard `output/` |
68
+ | Field | Meaning |
69
+ | --- | --- |
70
+ | `agent` | `claude`; more will follow |
71
+ | `task` | What the agent should do |
72
+ | `command` | Instead of `agent`: a command as a string (runs in bash) or a list |
73
+ | `name` | Sandbox name; defaults to the folder name |
74
+ | `image` | Your own container image; defaults to an image with Claude Code, Codex and OpenCode |
75
+ | `files.exclude` | Patterns like in `.gitignore`; `.git` and `.nido` are always excluded |
76
+ | `secrets` | Names of stored secrets, never values |
77
+ | `network` | Hosts the sandbox may reach on port 443; everything else is blocked |
78
+ | `output` | Folder that comes back after the run; default `output/` |
94
79
 
95
80
  ## Secrets
96
81
 
@@ -102,14 +87,10 @@ nido secret ls
102
87
  nido secret rm github
103
88
  ```
104
89
 
105
- Der Wert geht per HTTPS an die API und von dort über eine
106
- Umgebungsvariable an das Gateway, nie als Argument. Lesen kann ihn danach
107
- niemand mehr, auch der Kunde nicht.
108
- In der Sandbox steht nur ein Platzhalter. Der Proxy von OpenShell setzt den
109
- echten Wert erst beim Aufruf ein, und nur für die Hosts des Dienstes, etwa
110
- `api.anthropic.com`. Andere Namen kennt nido noch nicht.
90
+ A secret is stored once and can never be read again, not even by you. Inside the sandbox the agent
91
+ only sees a placeholder; the real value is added on the way to the provider's API.
111
92
 
112
- ## Weitere Befehle
93
+ ## More commands
113
94
 
114
95
  ```bash
115
96
  nido create shop --secret anthropic --network pypi.org
@@ -120,26 +101,27 @@ nido cp shop:/sandbox/work/output ./out
120
101
  nido logs shop
121
102
  nido stop shop && nido start shop
122
103
  nido rm shop
104
+ nido whoami
105
+ nido logout
123
106
  ```
124
107
 
125
- ## Entwicklung
108
+ Paths inside a sandbox must be below `/sandbox`.
126
109
 
127
- ```bash
128
- npm test # unit tests
129
- npm run build # dist/
130
- ```
110
+ ## Limits in the beta
131
111
 
132
- Die Regeln für Hoch- und Herunterladen stecken in `src/sync.ts` und sind
133
- reine Funktionen. Die Aufrufe an die API liegen in `src/api.ts`, die Anmeldung
134
- in `src/login.ts`. Mit OpenShell spricht nur noch
135
- [agents-api](../agents-api).
112
+ - Up to 5 sandboxes per account.
113
+ - No interactive shell yet; use `nido exec`.
114
+ - The agent runs in the foreground. If the connection drops, `nido pull` fetches what is already
115
+ in `output/`.
116
+ - No persistent workspaces or backups yet. Keep anything important in `output/`.
136
117
 
137
- Veröffentlichen: `npm publish` im Ordner `nido` (baut vorher neu).
118
+ ## Development
138
119
 
139
- ## Grenzen
120
+ ```bash
121
+ cd nido && npm install && npm run build && npm link
122
+ npm test
123
+ ```
140
124
 
141
- - Höchstens 5 Sandboxes pro Konto in der Beta.
142
- - `nido shell` fehlt noch. Stattdessen `nido exec`.
143
- - Der Agent läuft im Vordergrund. Bricht die Verbindung ab, holt
144
- `nido pull` das, was schon in `output/` liegt.
145
- - Keine dauerhaften Arbeitsbereiche und kein Backup (#695).
125
+ `NIDO_API_URL` points nido at another API, for example a local agents-api. Upload and
126
+ download rules live in `src/sync.ts` as pure functions, API calls in `src/api.ts`, login in
127
+ `src/login.ts`. Publish with `npm publish` in this folder; it builds and tests first.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pirol/nido",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Run agents in isolated sandboxes. Give it a folder, get results back.",
5
5
  "type": "module",
6
6
  "bin": {