Skip to content

Commit d04f04c

Browse files
authored
Limit filter capabilities for session/list (#225)
Let's start with something a bit simpler for a first pass. I'd like to verify the basic implementation a bit in a few agent before committing to all of these filters. Limit seems like a fair (and easy to implement one) so let's leave it.
1 parent 85ff569 commit d04f04c

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

docs/rfds/session-list.mdx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Add a new `session/list` JSON-RPC method to the protocol that returns metadata a
4949
- Search by title or agent-provided metadata
5050

5151
3. **Be an optional capability**:
52-
- Agents advertise `listSessions: true` in initialization if they support this feature
52+
- Agents advertise `listSessions: {}` in initialization if they support this feature
5353
- Clients check for this capability before attempting to call `session/list`
5454
- Agents without persistent session storage don't need to implement this
5555

@@ -64,10 +64,8 @@ The client calls `session/list` with optional filtering and pagination parameter
6464
"method": "session/list",
6565
"params": {
6666
"cwd": "/home/user/project",
67-
"createdAfter": "2025-10-20T00:00:00Z",
6867
"limit": 20,
69-
"cursor": "eyJwYWdlIjogMn0=",
70-
"search": "auth"
68+
"cursor": "eyJwYWdlIjogMn0="
7169
}
7270
}
7371
```
@@ -77,12 +75,8 @@ The client calls `session/list` with optional filtering and pagination parameter
7775
All parameters are optional:
7876

7977
- `cwd` (string) - Filter sessions by working directory
80-
- `createdAfter` (string) - ISO 8601 timestamp, only return sessions created after this time
81-
- `createdBefore` (string) - ISO 8601 timestamp, only return sessions created before this time
82-
- `updatedAfter` (string) - ISO 8601 timestamp, only return sessions updated after this time
83-
- `limit` (number) - Maximum number of results to return (default: 50, max: 1000)
78+
- `limit` (number) - Maximum number of results to return
8479
- `cursor` (string) - Opaque cursor token from a previous response's `nextCursor` field for cursor-based pagination
85-
- `search` (string) - Free-text search across titles or agent metadata
8680

8781
#### Minimal Request Example
8882

@@ -295,7 +289,7 @@ Session deletion is intentionally left out of this RFD to keep scope focused. A
295289

296290
We use cursor-based pagination:
297291

298-
- Request includes `limit` and optional `cursor`
292+
- Request includes an optional `cursor`
299293
- Response includes `nextCursor` when more results are available
300294
- Clients should treat a missing `nextCursor` as the end of results
301295
- Clients MUST treat cursors as opaque tokens: don't parse, modify, or persist them across sessions

0 commit comments

Comments
 (0)