Expand description
API service module - translated from api/
Re-exports§
pub use empty_usage::*;pub use error_utils::*;pub use errors::*;pub use logging::*;pub use usage::*;pub use with_retry::*;
Modules§
- empty_
usage - Empty usage tracking - translated from emptyUsage.ts
- error_
utils - API error utilities Extracts connection error details and formats API errors
- errors
- API error types and utilities translated from TypeScript errors.ts
- logging
- API logging utilities Handles API query, error, and success logging with analytics
- retry_
helpers - String-based error predicates for retry decisions.
- usage
- Usage API - fetches utilization data from the API
- with_
retry - API retry utilities - canonical implementation translated from withRetry.ts
Structs§
- Download
Result - Result of a file download operation
- File
- File specification parsed from CLI args Format: –file=<file_id>:<relative_path>
- File
Metadata - File metadata returned from list_files_created_after
- Files
ApiConfig - Configuration for the files API client
Enums§
- Upload
Result - Result of a file upload operation
Functions§
- build_
download_ path - Normalizes a relative path, strips redundant prefixes, and builds the full download path under {basePath}/{session_id}/uploads/. Returns None if the path is invalid (e.g., path traversal).
- download_
and_ save_ file - Downloads a file and saves it to the session-specific workspace directory
- download_
session_ files - Downloads all file attachments for a session
- list_
files_ created_ after - List files created after a given timestamp (1P/Cloud mode).
- parse_
file_ specs - Parse file attachment specs from CLI arguments Format: <file_id>:<relative_path>
- upload_
file - Upload a single file to the Files API (BYOC mode)
- upload_
session_ files - Upload multiple files (BYOC mode)