Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,55 @@ End a session and clean up resources.
}
```

#### POST /api/v1/sessions/{token}/heartbeat

Extend session TTL explicitly. Useful for long-running operations.

**Auth:** Bearer {launcher_secret}

**Rate limit:** 100 per hour per session

**Response:**
```json
{
"success": true,
"message": "Heartbeat recorded",
"data": {
"expires_at": "2026-02-04T12:00:00Z"
}
}
```

### Repository Visibility

#### GET /api/v1/repos/visibility

Query visibility for multiple repositories.

**Auth:** Bearer {launcher_secret}

**Query params:**
- `repos`: Comma-separated list of owner/repo strings

**Request:**
```bash
curl "http://egg-gateway:9847/api/v1/repos/visibility?repos=owner/repo1,owner/repo2"
```

**Response:**
```json
{
"success": true,
"message": "Visibility queried",
"data": {
"visibilities": {
"owner/repo1": "public",
"owner/repo2": "private"
}
}
}
```

### Git Operations

#### POST /api/v1/git/status
Expand Down Expand Up @@ -291,6 +340,56 @@ Add a comment to a pull request.
}
```

#### POST /api/v1/gh/pr/edit

Edit a PR title or body. Requires PR ownership.

**Request:**
```json
{
"repo": "owner/repo",
"pr_number": 123,
"title": "Updated title",
"body": "Updated description"
}
```

**Response:**
```json
{
"success": true,
"message": "PR edited",
"data": {
"stdout": "...",
"auth_mode": "bot"
}
}
```

#### POST /api/v1/gh/pr/close

Close a PR. Requires PR ownership.

**Request:**
```json
{
"repo": "owner/repo",
"pr_number": 123
}
```

**Response:**
```json
{
"success": true,
"message": "PR closed",
"data": {
"stdout": "...",
"auth_mode": "bot"
}
}
```

#### POST /api/v1/gh/execute

Execute a generic gh command. Commands are validated.
Expand Down
Loading
Loading