GET /api/sessions/:id/git-status
Get git status for a session’s working directory. Authentication: RequiredPath Parameters
Session ID
Response
Whether the operation succeeded
Array of changed files with status
Current branch name
Error message if failed
Example
Errors
403- Access denied404- Session not found503- Hub not connected
GET /api/sessions/:id/git-diff-numstat
Get git diff summary with line count statistics. Authentication: RequiredPath Parameters
Session ID
Query Parameters
Show only staged changes (default: false shows unstaged)
Response
Whether the operation succeeded
Array of file change statistics
Error message if failed
Example
GET /api/sessions/:id/git-diff-file
Get git diff for a specific file. Authentication: RequiredPath Parameters
Session ID
Query Parameters
File path to diff
Show staged diff (default: false shows unstaged)
Response
Whether the operation succeeded
Unified diff output
Error message if failed
Example
GET /api/sessions/:id/file
Read the contents of a file in the session’s working directory. Authentication: RequiredPath Parameters
Session ID
Query Parameters
Relative path to the file
Response
Whether the operation succeeded
File contents
Error message if failed
Example
Errors
400- Invalid file path403- Access denied404- Session not found503- Hub not connected
GET /api/sessions/:id/files
Search for files in the session’s working directory using ripgrep. Authentication: RequiredPath Parameters
Session ID
Query Parameters
Search pattern (filename glob)
Maximum number of results (1-500, default: 200)
Response
Whether the operation succeeded
Array of file objects
Error message if failed
Example: List All Files
Example: Search for TypeScript Files
Errors
400- Invalid query403- Access denied404- Session not found503- Hub not connected
GET /api/sessions/:id/directory
List contents of a directory in the session’s working directory. Authentication: RequiredPath Parameters
Session ID
Query Parameters
Relative directory path (empty = root)
Response
Whether the operation succeeded
Array of directory entries (files and directories)
Error message if failed