Interface: ImportCursorPosition
Makaio Framework / ai-adapters-core / ImportCursorPosition
Interface: ImportCursorPosition
Section titled “Interface: ImportCursorPosition”Defined in: ../../../adapters/core/src/log-importer/types.ts:112
Cursor position for tracking import progress within a file.
Used to resume import from the last successfully processed position after restarts, avoiding duplicate event emission.
Remarks
Section titled “Remarks”Cursors track byte offsets rather than line numbers for efficiency and to handle partial lines correctly. The lastModified timestamp enables detection of file truncation/rotation.
LogImporter - Uses cursors for incremental import
Properties
Section titled “Properties”bytesRead
Section titled “bytesRead”bytesRead:
number
Defined in: ../../../adapters/core/src/log-importer/types.ts:117
Number of bytes successfully read and processed
filePath
Section titled “filePath”filePath:
string
Defined in: ../../../adapters/core/src/log-importer/types.ts:114
Absolute path to the log file being tracked
lastModified
Section titled “lastModified”lastModified:
string
Defined in: ../../../adapters/core/src/log-importer/types.ts:120
ISO 8601 timestamp of file’s last modification when cursor was saved
sessionContext?
Section titled “sessionContext?”
optionalsessionContext?:object&object
Defined in: ../../../adapters/core/src/log-importer/types.ts:126
Session context for incremental imports (persisted on first read). Contains adapter-specific state needed to resume processing mid-session.
Type Declaration
Section titled “Type Declaration”cwd:
string|null
Working directory (null if unknown, e.g., some external imports)
model:
string|null
Model identifier (null if unknown, e.g., some external imports)
Type Declaration
Section titled “Type Declaration”adapterSessionId
Section titled “adapterSessionId”adapterSessionId:
string
Adapter’s native session identifier
sessionEvent
Section titled “sessionEvent”sessionEvent:
NormalizedEvent
Session discovered event (emitted once at session start)
startedEvent
Section titled “startedEvent”startedEvent:
NormalizedEvent
Agent started event (emitted once at session start)
state:
JsonObject
Serialized adapter-specific state for resumption