open-agents-ai 0.186.70 → 0.186.72

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 +41 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2246,7 +2246,7 @@ Step 1 → Select endpoints (auto-discovers local Ollama models + configured /en
2246
2246
  Step 2 → Choose banner animation (8 presets: wave, pulse, matrix, sparkle, radar, circuit, fire)
2247
2247
  or generate a custom animation with your local LLM
2248
2248
  Step 3 → Set header message + clickable link (displayed to consumers during inference)
2249
- Step 4 → Configure transport (cloudflared tunnel and/or libp2p P2P mesh)
2249
+ Step 4 → Configure transport (libp2p P2P mesh (primary) and/or cloudflared tunnel (fallback))
2250
2250
  + rate limits (req/min, tokens/day, max concurrent, model allowlist)
2251
2251
  Step 5 → Review and Go Live
2252
2252
  ```
@@ -2257,8 +2257,9 @@ Step 5 → Review and Go Live
2257
2257
  - Per-IP sliding window rate limiting + global daily token budget
2258
2258
  - Model allowlist enforcement (block models you don't want to share)
2259
2259
  - Token usage tracked from both Ollama and OpenAI response formats
2260
- - Cloudflared tunnel creates a public HTTPS URL (or libp2p for decentralized relay)
2261
- - Your raw API endpoint URL is **never exposed** consumers only see the tunnel URL
2260
+ - **libp2p P2P mesh** provides decentralized relay no DNS, no port forwarding, NAT-traversing
2261
+ - Cloudflared tunnel available as HTTPS fallback for non-P2P consumers
2262
+ - Your raw API endpoint URL is **never exposed** — consumers connect via peerId or tunnel
2262
2263
  - Config persists to `.oa/sponsor/config.json` — survives restarts
2263
2264
 
2264
2265
  **Management:**
@@ -2284,18 +2285,47 @@ When using sponsored inference, the sponsor's banner animation and message appea
2284
2285
  ### Architecture
2285
2286
 
2286
2287
  ```
2288
+ Primary path (libp2p):
2289
+ Consumer OA ──→ libp2p mesh ──→ Sponsor Daemon ──→ Ollama/vLLM
2290
+ (P2P, NAT-traversing) (auth + rate limit) (local)
2291
+
2292
+ Fallback path (tunnel):
2287
2293
  Consumer OA ──→ Cloudflared Tunnel ──→ Sponsor Proxy ──→ Ollama/vLLM
2288
2294
  (HTTPS) (auth + rate limit) (local)
2289
-
2290
- ├─ Bearer token gate
2291
- ├─ Per-IP sliding window (N req/min)
2292
- ├─ Daily token budget tracking
2293
- ├─ Model allowlist enforcement
2294
- ├─ Concurrent request cap
2295
- └─ Response header sanitization
2295
+
2296
+ Both paths enforce:
2297
+ ├─ Bearer token auth gate
2298
+ ├─ Per-IP sliding window rate limiting
2299
+ ├─ Daily token budget tracking
2300
+ ├─ Model allowlist enforcement
2301
+ ├─ Tool definitions forwarded (v0.186.68+)
2302
+ └─ Response header sanitization
2296
2303
  ```
2297
2304
 
2298
- The tunnel fix uses debounced restarts with exponential cooldown (10s → 20s → 40s), stopping auto-restart after 3 consecutive failures to prevent Cloudflare rate limiting. Progress indicators emit every 5 seconds during startup, and specific error messages are shown for common failure modes (ENOENT, port conflict, 429, DNS).
2305
+ libp2p relay uses GossipSub discovery + NATS (wss://demo.nats.io:8443) for peer announcement. Direct streams via invoke/1.1.0 protocol with payment negotiation (x402). The tunnel fallback uses debounced restarts with exponential cooldown.
2306
+
2307
+ ### Ollama Endpoint Security
2308
+
2309
+ Three independent layers prevent remote peers from accessing destructive Ollama endpoints:
2310
+
2311
+ | Endpoint | Default | `--full` | Sponsor Mode |
2312
+ |----------|---------|----------|-------------|
2313
+ | `/api/chat` (inference) | ALLOWED | ALLOWED | ALLOWED |
2314
+ | `/api/tags` (list models) | ALLOWED | ALLOWED | ALLOWED |
2315
+ | `/v1/chat/completions` | ALLOWED | ALLOWED | ALLOWED |
2316
+ | `/api/pull` (download model) | **BLOCKED** | ALLOWED | **BLOCKED** |
2317
+ | `/api/delete` (delete model) | **BLOCKED** | ALLOWED | **BLOCKED** |
2318
+ | `/api/push` (upload model) | **BLOCKED** | ALLOWED | **BLOCKED** |
2319
+ | `/api/create` (create model) | **BLOCKED** | ALLOWED | **BLOCKED** |
2320
+ | `/api/copy` (copy model) | **BLOCKED** | ALLOWED | **BLOCKED** |
2321
+
2322
+ **Defense-in-depth:**
2323
+ 1. **COHERE handler** — Only ever calls `/api/tags` + `/api/chat`. No code path to destructive endpoints.
2324
+ 2. **Expose capability handler** — Only forwards inference requests. Auth validated before processing.
2325
+ 3. **Expose reverse proxy** — Hardcoded path blocklist returns 403 for all model management endpoints.
2326
+ 4. **Sponsor mode** — Whitelist of 6 read-only/inference endpoints only, overrides `--full`.
2327
+
2328
+ The `--full` flag is required to grant remote peers model management access. Sponsor mode always blocks destructive operations regardless of flags. Tool definitions are now forwarded through all relay paths (v0.186.68+).
2299
2329
 
2300
2330
  </details>
2301
2331
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.186.70",
3
+ "version": "0.186.72",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",