cherry-studio/tests/apis/agents/sessions.http
Vaayne 58dbb514e0 feat: Implement Claude Code service with streaming support and tool integration
- Added `aisdk-stream-protocel.md` to document text and data stream protocols.
- Created `ClaudeCodeService` for invoking and streaming responses from the Claude Code CLI.
- Introduced built-in tools for Claude Code, including Bash, Edit, and WebFetch.
- Developed transformation functions to convert Claude Code messages to AI SDK format.
- Enhanced OCR utility with delayed loading of the Sharp module.
- Updated agent types and session message structures to accommodate new features.
- Modified API tests to reflect changes in session creation and message streaming.
- Upgraded `uuid` package to version 13.0.0 for improved UUID generation.
2025-09-16 15:12:03 +08:00

64 lines
1.5 KiB
HTTP

@host=http://localhost:23333
@token=cs-sk-af798ed4-7cf5-4fd7-ae4b-df203b164194
@agent_id=agent_1757947603408_t1y2mbnq4
@session_id=session_1757947684264_z2wcwn8t7
### List Sessions
GET {{host}}/v1/agents/{{agent_id}}/sessions
Authorization: Bearer {{token}}
Content-Type: application/json
### Create Session
POST {{host}}/v1/agents/{{agent_id}}/sessions
Authorization: Bearer {{token}}
Content-Type: application/json
{
"name": "Joke telling Session",
"user_goal": "Tell me a funny joke"
}
### Get Session Details
GET {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815260195_eldvompnv
Authorization: Bearer {{token}}
Content-Type: application/json
### Delete Session
DELETE {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815245456_tfs6oogl0
Authorization: Bearer {{token}}
Content-Type: application/json
### Update Session
PUT {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815281790_q4yxgdk74
Authorization: Bearer {{token}}
Content-Type: application/json
{
"name": "Code Review Session 1",
"user_goal": "Review the newly implemented feature for bugs and improvements"
}
### Create Session Message
POST {{host}}/v1/agents/{{agent_id}}/sessions/{{session_id}}/messages
Authorization: Bearer {{token}}
Content-Type: application/json
{
"role": "user",
"content": "a joke about programmers"
}
### Create Session Message Stream
POST {{host}}/v1/agents/{{agent_id}}/sessions/{{session_id}}/messages/stream
Authorization: Bearer {{token}}
Content-Type: application/json
{
"role": "user",
"content": "a joke about programmers"
}