autopilot-ai 2.1.0 → 2.2.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 CHANGED
@@ -236,6 +236,20 @@ autopilot -p "..." --dangerously-allow-all # auto-approve mutating tool
236
236
  autopilot -p "..." --reasoning # include chain-of-thought in stderr
237
237
  ```
238
238
 
239
+ ### Run tasks on your own server
240
+
241
+ Send a task to an Autopilot server you run. It works in its own sandbox and opens a pull request, and you can close your laptop while it does.
242
+
243
+ ```sh
244
+ autopilot remote add https://acme.example.com # approve the code in your browser; no keys copied
245
+ autopilot --on acme "fix the flaky checkout test" # runs on the server; uncommitted changes go along
246
+ autopilot runs # what's running or done, with PR links
247
+ autopilot runs watch <run> # follow a run (Ctrl-C detaches, the run keeps going)
248
+ autopilot pull <run> # check out the run's branch here
249
+ ```
250
+
251
+ The run starts from the last commit your branch shares with `origin`. Unpushed commits, staged and unstaged edits, and untracked files that aren't ignored are sent along as a patch, up to 3 MiB. Add `--detach` to return right away and `-m <model>` to pick one of the server's models. Each task gets its own sandbox and branch, so several can run at once. The server keeps the model key and GitHub credentials; your laptop holds only a revocable, 90-day pairing credential in `~/.config/autopilot/remotes.json`. Setting up the server side is covered in [docs/aster-api.md](docs/aster-api.md).
252
+
239
253
  ### Headless SDK
240
254
 
241
255
  Use autopilot programmatically from your own application — no TUI required.
@@ -532,12 +546,12 @@ still read (see [Settings location](#settings-location)):
532
546
 
533
547
  | Event | Fires when | Veto? |
534
548
  |--------------------|-------------------------------------------------|-------|
535
- | `SessionStart` | A session's first turn (`source`: startup/resume) | No |
549
+ | `SessionStart` | A session's first prompt, before `UserPromptSubmit` (`source`: startup/resume) | No |
536
550
  | `PreToolUse` | A tool call is about to run | Yes |
537
551
  | `PostToolUse` | A tool call just finished (success or failure) | No |
538
552
  | `PostToolUseFailure` | A tool call failed (also fires `PostToolUse`) | No |
539
553
  | `PermissionRequest` | You're about to be asked to approve a call | Allow / deny |
540
- | `UserPromptSubmit` | You hit Enter on a prompt | Yes |
554
+ | `UserPromptSubmit` | A prompt is submitted, in every mode (TUI, `-p`, `--emit-events`, `serve`, SDK) | Yes |
541
555
  | `Stop` | A turn ended cleanly | No |
542
556
  | `PreCompact` | Auto-compaction is about to run | No |
543
557
  | `SessionEnd` | autopilot exits, or `/clear` (`reason`) | No |
@@ -553,7 +567,17 @@ prefer reading stdin. Payloads
553
567
  also carry Claude Code's field names (`hook_event_name`, `tool_name`,
554
568
  `tool_input`, `tool_response`, `tool_call_id`, `transcript_path`), so
555
569
  Claude Code hook scripts — and tools built for them, like
556
- [Agent Beacon](docs/beacon.md) — work unchanged.
570
+ [Agent Beacon](docs/beacon.md) — work unchanged. A successful
571
+ `write`/`edit`'s `tool_response` carries Claude Code's `structuredPatch`
572
+ and `originalFile` (and `type: "create" | "update"` for `Write`); see
573
+ [docs/beacon.md](docs/beacon.md#tool-names-and-result-shapes) for the
574
+ size limits.
575
+
576
+ A blocked `UserPromptSubmit` never reaches the model: the TUI shows the
577
+ reason, `-p` and one-shot `--emit-events` exit with code **44**,
578
+ `serve` answers `403 prompt_blocked`, and the SDK's `prompt()` rejects
579
+ with `PromptBlockedError` (details in
580
+ [docs/beacon.md](docs/beacon.md#session-and-prompt-events)).
557
581
  #### Blocking and exit codes
558
582
 
559
583
  Veto events (`PreToolUse`, `UserPromptSubmit`) follow Claude Code's rules: