Add expose_port previews with a Preview tab; leave setup to AGENTS.md

This commit is contained in:
Ian Gulliver
2026-10-15 13:15:49 -07:00
parent 86e4e772ed
commit f95a0e5332
32 changed files with 1042 additions and 431 deletions
+30 -3
View File
@@ -507,6 +507,24 @@ paths:
"404": { $ref: "#/components/responses/Error" }
"409": { $ref: "#/components/responses/Error" }
/api/tasks/{taskId}/previews:
parameters:
- { name: taskId, in: path, required: true, schema: { type: string } }
get:
operationId: listPreviews
description: >
The ports the task's agent exposed with expose_port, by name. Each is served by tailscale serve on the same
port number of byre's host, over HTTPS, until the task is merged or discarded.
responses:
"200":
description: The previews.
content:
application/json:
schema:
type: array
items: { $ref: "#/components/schemas/Preview" }
"404": { $ref: "#/components/responses/Error" }
/api/tasks/{taskId}/snapshots:
parameters:
- { name: taskId, in: path, required: true, schema: { type: string } }
@@ -854,7 +872,7 @@ components:
branch: { type: string }
worktree_path: { type: string }
base_ref: { type: string }
port_base: { type: integer, description: "The first of the task's block of ports (port_base to port_base+9), passed to its setup script and agent as PORT." }
port_base: { type: integer, description: "The first of the task's block of ports (port_base to port_base+9), passed to its agent and terminal as PORT." }
status:
type: string
enum: [active, merged, discarded]
@@ -997,6 +1015,15 @@ components:
description: "message: the agent wrote text after one or more tool calls; turn_end: after byre's end-of-turn commit. tool_call, ask_human and timer appear only on snapshots taken by earlier builds."
created_at: { type: string, format: date-time }
Preview:
type: object
required: [task_id, name, port, created_at]
properties:
task_id: { type: string }
name: { type: string }
port: { type: integer, description: "A port in the task's block, served at https://<byre's host>:<port>/." }
created_at: { type: string, format: date-time }
AgentSession:
type: object
required: [id, task_id, owner, vendor, model, vendor_session_id, state, role, created_by, created_at]
@@ -1179,8 +1206,8 @@ components:
TaskTab:
type: string
enum: [transcript, changes, files, terminal, inbox, project]
x-enum-varnames: [TabTranscript, TabChanges, TabFiles, TabTerminal, TabInbox, TabProject]
enum: [transcript, changes, files, terminal, preview, inbox, project]
x-enum-varnames: [TabTranscript, TabChanges, TabFiles, TabTerminal, TabPreview, TabInbox, TabProject]
TerminalSize:
type: object