aegis-bridge 2.5.5 → 2.6.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 +76 -0
- package/dashboard/dist/assets/{index-DIyuyrlO.js → index-4UlRaqol.js} +10 -10
- package/dashboard/dist/assets/index-9Hkkvm_I.css +32 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/config.d.ts +9 -0
- package/dist/config.js +5 -0
- package/dist/continuation-pointer.d.ts +11 -0
- package/dist/continuation-pointer.js +64 -0
- package/dist/dashboard/assets/{index-DIyuyrlO.js → index-4UlRaqol.js} +10 -10
- package/dist/dashboard/assets/index-9Hkkvm_I.css +32 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/diagnostics.d.ts +27 -0
- package/dist/diagnostics.js +95 -0
- package/dist/events.d.ts +14 -0
- package/dist/events.js +43 -14
- package/dist/fault-injection.d.ts +29 -0
- package/dist/fault-injection.js +115 -0
- package/dist/handshake.d.ts +60 -0
- package/dist/handshake.js +124 -0
- package/dist/hook-settings.d.ts +3 -2
- package/dist/hook-settings.js +6 -4
- package/dist/hook.js +10 -1
- package/dist/hooks.js +5 -0
- package/dist/logger.d.ts +35 -0
- package/dist/logger.js +65 -0
- package/dist/monitor.js +80 -16
- package/dist/permission-routes.d.ts +7 -0
- package/dist/permission-routes.js +28 -0
- package/dist/server.js +94 -47
- package/dist/session.d.ts +24 -0
- package/dist/session.js +105 -31
- package/dist/suppress.d.ts +33 -0
- package/dist/suppress.js +79 -0
- package/dist/tmux.js +2 -2
- package/dist/utils/circular-buffer.d.ts +11 -0
- package/dist/utils/circular-buffer.js +37 -0
- package/dist/validation.d.ts +23 -0
- package/dist/validation.js +13 -3
- package/dist/worktree-lookup.d.ts +24 -0
- package/dist/worktree-lookup.js +71 -0
- package/package.json +3 -2
- package/dashboard/dist/assets/index-B7DYf7vF.css +0 -32
- package/dist/dashboard/assets/index-B7DYf7vF.css +0 -32
package/README.md
CHANGED
|
@@ -114,6 +114,7 @@ All endpoints under `/v1/`.
|
|
|
114
114
|
| `POST` | `/v1/sessions/:id/interrupt` | Ctrl+C |
|
|
115
115
|
| `DELETE` | `/v1/sessions/:id` | Kill session |
|
|
116
116
|
| `POST` | `/v1/sessions/batch` | Batch create |
|
|
117
|
+
| `POST` | `/v1/handshake` | Capability negotiation |
|
|
117
118
|
| `POST` | `/v1/pipelines` | Create pipeline |
|
|
118
119
|
|
|
119
120
|
<details>
|
|
@@ -124,6 +125,7 @@ All endpoints under `/v1/`.
|
|
|
124
125
|
| `GET` | `/v1/sessions/:id/pane` | Raw terminal capture |
|
|
125
126
|
| `GET` | `/v1/sessions/:id/health` | Health check with actionable hints |
|
|
126
127
|
| `GET` | `/v1/sessions/:id/summary` | Condensed transcript summary |
|
|
128
|
+
| `GET` | `/v1/sessions/:id/transcript/cursor` | Cursor-based transcript replay |
|
|
127
129
|
| `POST` | `/v1/sessions/:id/screenshot` | Screenshot a URL (Playwright) |
|
|
128
130
|
| `POST` | `/v1/sessions/:id/escape` | Send Escape |
|
|
129
131
|
| `GET` | `/v1/pipelines` | List all pipelines |
|
|
@@ -175,6 +177,80 @@ Only **idle** sessions are reused. Working, stalled, or permission-prompt sessio
|
|
|
175
177
|
|
|
176
178
|
</details>
|
|
177
179
|
|
|
180
|
+
<details>
|
|
181
|
+
<summary>Capability Handshake</summary>
|
|
182
|
+
|
|
183
|
+
Before using advanced integration paths, clients can negotiate capabilities with Aegis via `POST /v1/handshake`. This prevents version-drift breakage.
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
curl -X POST http://localhost:9100/v1/handshake \
|
|
187
|
+
-H "Content-Type: application/json" \
|
|
188
|
+
-d '{"protocolVersion": "1", "clientCapabilities": ["session.create", "session.transcript.cursor"]}'
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**Response** (200 OK when compatible):
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
{
|
|
195
|
+
"protocolVersion": "1",
|
|
196
|
+
"serverCapabilities": ["session.create", "session.resume", "session.approve", "session.transcript", "session.transcript.cursor", "session.events.sse", "session.screenshot", "hooks.pre_tool_use", "hooks.post_tool_use", "hooks.notification", "hooks.stop", "swarm", "metrics"],
|
|
197
|
+
"negotiatedCapabilities": ["session.create", "session.transcript.cursor"],
|
|
198
|
+
"warnings": [],
|
|
199
|
+
"compatible": true
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
| Field | Description |
|
|
204
|
+
|-------|-------------|
|
|
205
|
+
| `protocolVersion` | Server's protocol version (`"1"` currently) |
|
|
206
|
+
| `serverCapabilities` | Full list of server-supported capabilities |
|
|
207
|
+
| `negotiatedCapabilities` | Intersection of client + server capabilities |
|
|
208
|
+
| `warnings` | Non-fatal issues (unknown caps, version skew) |
|
|
209
|
+
| `compatible` | `true` (200) or `false` (409 Conflict) |
|
|
210
|
+
|
|
211
|
+
Returns **409** if the client's `protocolVersion` is below the server minimum.
|
|
212
|
+
|
|
213
|
+
</details>
|
|
214
|
+
|
|
215
|
+
<details>
|
|
216
|
+
<summary>Cursor-Based Transcript Replay</summary>
|
|
217
|
+
|
|
218
|
+
Stable pagination for long transcripts that doesn't skip or duplicate messages under concurrent appends. Use instead of offset-based `/read` when you need reliable back-paging.
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Get the newest 50 messages
|
|
222
|
+
curl http://localhost:9100/v1/sessions/abc123/transcript/cursor
|
|
223
|
+
|
|
224
|
+
# Get the next page (pass oldest_id from previous response)
|
|
225
|
+
curl "http://localhost:9100/v1/sessions/abc123/transcript/cursor?before_id=16&limit=50"
|
|
226
|
+
|
|
227
|
+
# Filter by role
|
|
228
|
+
curl "http://localhost:9100/v1/sessions/abc123/transcript/cursor?role=user"
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Query params:**
|
|
232
|
+
|
|
233
|
+
| Param | Default | Description |
|
|
234
|
+
|-------|---------|-------------|
|
|
235
|
+
| `before_id` | (none) | Cursor ID to page before. Omit for newest entries. |
|
|
236
|
+
| `limit` | `50` | Entries per page (1–200). |
|
|
237
|
+
| `role` | (none) | Filter: `user`, `assistant`, or `system`. |
|
|
238
|
+
|
|
239
|
+
**Response:**
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"messages": [...],
|
|
244
|
+
"has_more": true,
|
|
245
|
+
"oldest_id": 16,
|
|
246
|
+
"newest_id": 25
|
|
247
|
+
}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Cursor IDs are stable — they won't shift when new messages are appended. Use `oldest_id` from one response as `before_id` in the next to page backwards without gaps or overlaps.
|
|
251
|
+
|
|
252
|
+
</details>
|
|
253
|
+
|
|
178
254
|
---
|
|
179
255
|
|
|
180
256
|
### Telegram
|