autopilot-ai 1.0.0 → 1.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.
- package/README.md +9 -9
- package/dist/index.js +1649 -912
- package/dist/index.js.map +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
## How it works
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
autopilot sends every model call to **[OpenRouter](https://openrouter.ai)** using **your own OpenRouter API key** — bring-your-own-key, nothing proxied, nothing marked up. On first run you paste the key once (it's checked against OpenRouter before it's saved) and pick a model. That's the whole setup.
|
|
20
20
|
|
|
21
21
|
- **Any model, one key.** The model picker is OpenRouter's live catalog — Claude, GPT, Gemini, Grok, Qwen, GLM, Kimi, DeepSeek, free models and more — opening on the best & latest by benchmark score, with fuzzy search over everything. Switch any time with `/model`.
|
|
22
22
|
- **Real cost, per turn.** OpenRouter reports what each generation actually cost; the status bar shows it (a local estimate marked `≈$` only until the billed number arrives). `/cost` totals it by session, day, month and all time.
|
|
@@ -44,7 +44,7 @@ KimiFlare sends every model call to **[OpenRouter](https://openrouter.ai)** usin
|
|
|
44
44
|
- **Smart permission modal with inline feedback** — Deny a tool and immediately tell the agent what to do instead. Keyboard-native navigation with `↑/↓`, `j/k`, `Alt+1/2/3`.
|
|
45
45
|
- **True message queuing** — Enter queues messages while the agent is busy; Escape interrupts and auto-drains the queue.
|
|
46
46
|
- **Hard-stop loop guardrail** — Stops token-burning cycles when all tools in a turn are blocked.
|
|
47
|
-
- **Headless SDK** — Programmatic `createAgentSession` API and JSONL-over-stdio RPC mode for building on top of
|
|
47
|
+
- **Headless SDK** — Programmatic `createAgentSession` API and JSONL-over-stdio RPC mode for building on top of autopilot.
|
|
48
48
|
|
|
49
49
|
See the full changelog at [github.com/sinameraji/autopilot/releases](https://github.com/sinameraji/autopilot/releases).
|
|
50
50
|
|
|
@@ -55,7 +55,7 @@ npm install -g autopilot-ai
|
|
|
55
55
|
autopilot
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
On first run autopilot
|
|
58
|
+
On first run, **Sign in with OpenRouter**: approve autopilot in your browser and a key is created for you (or paste one from <https://openrouter.ai/keys>). Then pick a model. That's it.
|
|
59
59
|
|
|
60
60
|
Or run without installing:
|
|
61
61
|
|
|
@@ -72,7 +72,7 @@ Requires Node.js ≥ 20.
|
|
|
72
72
|
Three ways to provide it — the first one found wins:
|
|
73
73
|
|
|
74
74
|
1. **Environment:** `OPENROUTER_API_KEY` (or `KIMIFLARE_OPENROUTER_KEY`). With this set, the setup screen never appears — the way to run kimiflare headless (CI, a VM, a container).
|
|
75
|
-
2. **
|
|
75
|
+
2. **Sign in / setup screen / CLI:** "Sign in with OpenRouter" on first run, or `autopilot auth openrouter` — approve in the browser and a key is created and saved (OpenRouter's OAuth PKCE flow). Over SSH or in a container it shows a link to open on any device and asks for the code OpenRouter displays (force this with `--code`). `--paste` prompts for an existing key instead, and `autopilot auth openrouter <key>` saves one directly. Inside the TUI, `/key set <key>` replaces it.
|
|
76
76
|
3. **Config file:** `"openrouterApiKey": "sk-or-…"` in `~/.config/kimiflare/config.json` (created with mode 600).
|
|
77
77
|
|
|
78
78
|
`/key` shows which key is in use, what it has spent and how much credit is left. Model calls — including memory embeddings and small internal side-calls (summaries, memory extraction) — are all billed to this key.
|
|
@@ -140,7 +140,7 @@ autopilot -p "..." --reasoning # include chain-of-thought i
|
|
|
140
140
|
|
|
141
141
|
### Headless SDK
|
|
142
142
|
|
|
143
|
-
Use
|
|
143
|
+
Use autopilot programmatically from your own application — no TUI required.
|
|
144
144
|
|
|
145
145
|
```ts
|
|
146
146
|
import { createAgentSession } from "autopilot-ai/sdk";
|
|
@@ -206,7 +206,7 @@ const { session } = await createAgentSession({
|
|
|
206
206
|
|
|
207
207
|
#### RPC mode (subprocess)
|
|
208
208
|
|
|
209
|
-
If you need process isolation or a non-Node consumer, run
|
|
209
|
+
If you need process isolation or a non-Node consumer, run autopilot in JSONL-over-stdio RPC mode:
|
|
210
210
|
|
|
211
211
|
```sh
|
|
212
212
|
node bin/autopilot.mjs --mode rpc
|
|
@@ -287,7 +287,7 @@ autopilot
|
|
|
287
287
|
|
|
288
288
|
## Logs
|
|
289
289
|
|
|
290
|
-
|
|
290
|
+
autopilot writes structured JSON logs of agent-side activity (tool calls,
|
|
291
291
|
permission decisions, MCP/LSP lifecycle, session events, errors) to
|
|
292
292
|
`~/.config/kimiflare/logs/<date>.jsonl`, one file per day, with 7-day
|
|
293
293
|
retention pruned automatically at startup.
|
|
@@ -316,7 +316,7 @@ output — independent of the file sink.
|
|
|
316
316
|
|
|
317
317
|
### Shipping to an OpenTelemetry collector
|
|
318
318
|
|
|
319
|
-
If you set `KIMIFLARE_OTEL_ENDPOINT`,
|
|
319
|
+
If you set `KIMIFLARE_OTEL_ENDPOINT`, autopilot also ships each log
|
|
320
320
|
entry to that endpoint over [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/)
|
|
321
321
|
so it lands in Datadog, Honeycomb, Grafana Loki, an internal collector,
|
|
322
322
|
or any other backend that speaks OTel. Batched every 5 s (or every
|
|
@@ -341,7 +341,7 @@ on the resource.
|
|
|
341
341
|
|
|
342
342
|
## Hooks
|
|
343
343
|
|
|
344
|
-
|
|
344
|
+
autopilot can fire shell commands at five points in an agent turn,
|
|
345
345
|
configured per-project (`.kimiflare/settings.json`) or globally
|
|
346
346
|
(`~/.config/kimiflare/settings.json`):
|
|
347
347
|
|