Commits API
Create and manage semantic commits.
Create Commit
POST /api/v1/commits
Request
{
"project_id": "proj_abc123",
"conversation_id": "conv_456",
"turn_window": {
"start_turn_hash": "sha256:start...",
"end_turn_hash": "sha256:end..."
},
"message": "Initial research complete"
}
Response
{
"commit_hash": "sha256:xyz789...",
"parent_hashes": ["sha256:prev..."],
"branch": "main",
"message": "Initial research complete",
"turn_window": {...},
"facet_snapshot": {
"entities": ["Tokyo", "Kyoto"],
"keywords": ["travel", "budget"],
"topics": ["trip planning"]
},
"created_at": "2024-01-15T12:00:00Z"
}
List Commits
GET /api/v1/commits
Query Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | string | Filter by project |
branch | string | Filter by branch |
limit | int | Max results |
offset | int | Skip results |
curl "http://localhost:8000/api/v1/commits?project_id=proj_abc123&branch=main"
Get Commit
GET /api/v1/commits/{commit_hash}
Returns full commit with facet snapshot.