Ship a range of a terminal chat's session file
curl --request PUT \
--url https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bytes": "<string>",
"generation": 2,
"offset": 1
}
'import requests
url = "https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}"
payload = {
"bytes": "<string>",
"generation": 2,
"offset": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({bytes: '<string>', generation: 2, offset: 1})
};
fetch('https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'bytes' => '<string>',
'generation' => 2,
'offset' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}"
payload := strings.NewReader("{\n \"bytes\": \"<string>\",\n \"generation\": 2,\n \"offset\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bytes\": \"<string>\",\n \"generation\": 2,\n \"offset\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bytes\": \"<string>\",\n \"generation\": 2,\n \"offset\": 1\n}"
response = http.request(request)
puts response.read_body{
"file": "<string>",
"generation": 1,
"size": 1,
"tail_sha256": "<string>",
"turn_running": true
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Computers
Ship a range of a terminal chat's session file
Stores a range of one file of a terminal chat's session artifact, by byte offset, and answers what Aether then holds of the file and whether the chat runs a turn then. The machine bridge ships each file's new lines as they are written.
Use this tool when you need to:
- Ship the lines a Claude Code session wrote to its session file, or to a sub-agent's file beside it
- Replace a file that was rotated, truncated or rewritten under the bridge's cursor
Examples:
- PUT /computers/{computerID}/terminal-chats/{sessionID}/session-files/session {"generation": 1, "offset": 0, "bytes": "eyJ0eXBlIjoidXNlciJ9Cg=="}
Hints:
- bytes are 1 byte to 4 MiB, base64. A range is idempotent by offset: the part Aether already holds must match the stored bytes and is stored once, so a resent range is harmless.
- A range that starts past the end of what Aether holds is refused with 409 session_file_hole; one of another generation with 409 session_file_generation; one whose bytes differ from the stored bytes at the same offsets with 409 session_file_range_differs. Read the file with getTerminalChatSessionFile and ship from what Aether holds.
- A range of the generation after the current one, from offset 0, replaces the file: the replaced marker, from which the chat's record is read anew.
- A range of the session file names the chat by the session's first prompt and records the times its lines carry.
- turn_running is whether the chat runs a turn once the range is taken in, read with it: a range whose lines end a turn no hook reported (Escape, a prompt a hook blocked) answers false, and so does the same range sent again after its answer was lost, until a later turn begins.
- A session the computer holds no chat of for the caller (ensureTerminalChat creates it), or a computer that is not theirs, is refused with 404 not_found.
- Only the grant of the caller's coding agent's bridge calls it, the machine bridge on the computer: a session or an API key is refused with 403 credential_kind_not_admitted.
- The call presents the computer's own secret, which aether setup keeps on it, in the Aether-Computer-Secret header. A computer that has none is refused with 403 computer_needs_setup: update the aether CLI there and run aether setup. A call that presents no secret, or another, is refused with 403 computer_set_up_elsewhere.
PUT
/
computers
/
{computerID}
/
terminal-chats
/
{sessionID}
/
session-files
/
{file}
Ship a range of a terminal chat's session file
curl --request PUT \
--url https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bytes": "<string>",
"generation": 2,
"offset": 1
}
'import requests
url = "https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}"
payload = {
"bytes": "<string>",
"generation": 2,
"offset": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({bytes: '<string>', generation: 2, offset: 1})
};
fetch('https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'bytes' => '<string>',
'generation' => 2,
'offset' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}"
payload := strings.NewReader("{\n \"bytes\": \"<string>\",\n \"generation\": 2,\n \"offset\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bytes\": \"<string>\",\n \"generation\": 2,\n \"offset\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/computers/{computerID}/terminal-chats/{sessionID}/session-files/{file}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bytes\": \"<string>\",\n \"generation\": 2,\n \"offset\": 1\n}"
response = http.request(request)
puts response.read_body{
"file": "<string>",
"generation": 1,
"size": 1,
"tail_sha256": "<string>",
"turn_running": true
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Authorizations
Path Parameters
Body
application/json
Response
OK