Appearance
Class: ContextManager
Context manager for the session: query context sync status and trigger sync (upload/download).
Table of contents
Methods
Methods
info
▸ info(contextId?, path?, taskType?): Promise<ContextInfoResult>
Get context sync status (optionally filtered by contextId, path, taskType).
Parameters
| Name | Type | Description |
|---|---|---|
contextId? | string | Optional context ID filter |
path? | string | Optional path filter |
taskType? | string | Optional task type filter |
Returns
Promise<ContextInfoResult>
Promise resolving to ContextInfoResult with items (contextId, path, status, etc.)
sync
▸ sync(contextId?, path?, mode?, maxRetries?, retryInterval?, callback?): Promise<ContextSyncResult>
Trigger context sync (upload or download). Omit contextId and path to sync all contexts.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
contextId? | string | undefined | Optional; if provided, path must also be provided |
path? | string | undefined | Optional; sync only this context path |
mode? | string | undefined | Optional sync mode |
maxRetries | number | 150 | Max poll retries (default 150) |
retryInterval | number | 1500 | Poll interval ms (default 1500) |
callback? | (success: boolean) => void | undefined | Optional callback with success |
Returns
Promise<ContextSyncResult>
Promise resolving to ContextSyncResult
toJSON
▸ toJSON(): Record<string, unknown>
Returns
Record<string, unknown>