@threadbase-sh/scanner 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -236,6 +236,18 @@ declare function createLogger(options?: LoggerOptions | Logger): Logger;
236
236
  declare function setLogger(logger: Logger): void;
237
237
  declare function getLogger(): Logger;
238
238
 
239
+ interface ConvReducerState {
240
+ cwd: string;
241
+ sessionId: string;
242
+ sessionName: string;
243
+ latestTimestamp: string;
244
+ lastPrompt: string;
245
+ pendingToolUses: Record<string, ToolUseBlock>;
246
+ teamInfo: Record<string, TeamInfo>;
247
+ }
248
+ declare function initialConvState(): ConvReducerState;
249
+ declare function parseJsonlLine(line: string, state?: ConvReducerState): ConversationMessage | null;
250
+
239
251
  interface Sidecar {
240
252
  version: number;
241
253
  sourcePath: string;
@@ -390,7 +402,10 @@ declare class ConversationScanner {
390
402
  getConversation(id: string, _options?: GetConversationOptions): Promise<Conversation | null>;
391
403
  getConversationPage(id: string, options: GetConversationPageOptions): Promise<ConversationPage | null>;
392
404
  parseSingleFilePage(filePath: string, account: string | undefined, options: GetConversationPageOptions): Promise<SingleFilePage | null>;
405
+ private readonly refreshesInFlight;
393
406
  refreshFile(filePath: string, account?: string): Promise<ConversationMeta | null>;
407
+ private doRefreshFile;
408
+ private extendCachedConversations;
394
409
  getMetadataCache(): Map<string, ConversationMeta>;
395
410
  getConversationsBySessionId(sessionId: string): ConversationMeta[];
396
411
  getProjects(): string[];
@@ -422,4 +437,4 @@ declare function scan(options?: ScanOptions, scanner?: ConversationScanner): Pro
422
437
  declare function search(query: string, options?: SearchOptions, scanner?: ConversationScanner): Promise<SearchResult[]>;
423
438
  declare function getConversation(id: string, options?: GetConversationOptions, scanner?: ConversationScanner): Promise<Conversation | null>;
424
439
 
425
- export { type AttachmentSidecar, CodexCliProvider, type ContentTier, type Conversation, type ConversationMessage, type ConversationMeta, type ConversationPage, ConversationScanner, type ConversationScannerOptions, DEFAULT_TIERS, type DeferredToolsDeltaAttachment, type DiscoveredConversationFile, type FileStatEntry, type GetConversationOptions, type GetConversationPageOptions, type GroupedConversations, type Include, type MessageMetadata, type MessageSender, type MessageSnapshot, type PersistentConfig, type Profile, type ProviderName, type ScanOptions, type ScanResult, type ScannerChangeEvent, type ScannerProvider, type ScannerProviderName, SearchIndexer, type SearchMatch, type SearchOptions, type SearchResult, type Sidecar, type SingleFilePage, type SortOrder, type TeamInfo, ThreadbaseProvider, type ToolResultBlock, type ToolUseBlock, type TreeConversation, type TurnDuration, VALID_SORT_ORDERS, type View, type WatchOptions, applyAccountFilter, applyIncludeFilter, applyPagination, applyProjectFilter, applySinceFilter, applySort, cleanSystemTags, createLogger, detectDefaultProfile, getConversation, getLogger, getProjectsDir, loadProfiles, readGitBranch, readSidecar, resetDefaultScanner, resolveConfigDir, resolveTier, saveProfiles, scan, search, setLogger, sidecarPath };
440
+ export { type AttachmentSidecar, CodexCliProvider, type ContentTier, type Conversation, type ConversationMessage, type ConversationMeta, type ConversationPage, ConversationScanner, type ConversationScannerOptions, DEFAULT_TIERS, type DeferredToolsDeltaAttachment, type DiscoveredConversationFile, type FileStatEntry, type GetConversationOptions, type GetConversationPageOptions, type GroupedConversations, type Include, type ConvReducerState as JsonlParseState, type MessageMetadata, type MessageSender, type MessageSnapshot, type PersistentConfig, type Profile, type ProviderName, type ScanOptions, type ScanResult, type ScannerChangeEvent, type ScannerProvider, type ScannerProviderName, SearchIndexer, type SearchMatch, type SearchOptions, type SearchResult, type Sidecar, type SingleFilePage, type SortOrder, type TeamInfo, ThreadbaseProvider, type ToolResultBlock, type ToolUseBlock, type TreeConversation, type TurnDuration, VALID_SORT_ORDERS, type View, type WatchOptions, applyAccountFilter, applyIncludeFilter, applyPagination, applyProjectFilter, applySinceFilter, applySort, cleanSystemTags, initialConvState as createJsonlParseState, createLogger, detectDefaultProfile, getConversation, getLogger, getProjectsDir, loadProfiles, parseJsonlLine, readGitBranch, readSidecar, resetDefaultScanner, resolveConfigDir, resolveTier, saveProfiles, scan, search, setLogger, sidecarPath };
package/dist/index.d.ts CHANGED
@@ -236,6 +236,18 @@ declare function createLogger(options?: LoggerOptions | Logger): Logger;
236
236
  declare function setLogger(logger: Logger): void;
237
237
  declare function getLogger(): Logger;
238
238
 
239
+ interface ConvReducerState {
240
+ cwd: string;
241
+ sessionId: string;
242
+ sessionName: string;
243
+ latestTimestamp: string;
244
+ lastPrompt: string;
245
+ pendingToolUses: Record<string, ToolUseBlock>;
246
+ teamInfo: Record<string, TeamInfo>;
247
+ }
248
+ declare function initialConvState(): ConvReducerState;
249
+ declare function parseJsonlLine(line: string, state?: ConvReducerState): ConversationMessage | null;
250
+
239
251
  interface Sidecar {
240
252
  version: number;
241
253
  sourcePath: string;
@@ -390,7 +402,10 @@ declare class ConversationScanner {
390
402
  getConversation(id: string, _options?: GetConversationOptions): Promise<Conversation | null>;
391
403
  getConversationPage(id: string, options: GetConversationPageOptions): Promise<ConversationPage | null>;
392
404
  parseSingleFilePage(filePath: string, account: string | undefined, options: GetConversationPageOptions): Promise<SingleFilePage | null>;
405
+ private readonly refreshesInFlight;
393
406
  refreshFile(filePath: string, account?: string): Promise<ConversationMeta | null>;
407
+ private doRefreshFile;
408
+ private extendCachedConversations;
394
409
  getMetadataCache(): Map<string, ConversationMeta>;
395
410
  getConversationsBySessionId(sessionId: string): ConversationMeta[];
396
411
  getProjects(): string[];
@@ -422,4 +437,4 @@ declare function scan(options?: ScanOptions, scanner?: ConversationScanner): Pro
422
437
  declare function search(query: string, options?: SearchOptions, scanner?: ConversationScanner): Promise<SearchResult[]>;
423
438
  declare function getConversation(id: string, options?: GetConversationOptions, scanner?: ConversationScanner): Promise<Conversation | null>;
424
439
 
425
- export { type AttachmentSidecar, CodexCliProvider, type ContentTier, type Conversation, type ConversationMessage, type ConversationMeta, type ConversationPage, ConversationScanner, type ConversationScannerOptions, DEFAULT_TIERS, type DeferredToolsDeltaAttachment, type DiscoveredConversationFile, type FileStatEntry, type GetConversationOptions, type GetConversationPageOptions, type GroupedConversations, type Include, type MessageMetadata, type MessageSender, type MessageSnapshot, type PersistentConfig, type Profile, type ProviderName, type ScanOptions, type ScanResult, type ScannerChangeEvent, type ScannerProvider, type ScannerProviderName, SearchIndexer, type SearchMatch, type SearchOptions, type SearchResult, type Sidecar, type SingleFilePage, type SortOrder, type TeamInfo, ThreadbaseProvider, type ToolResultBlock, type ToolUseBlock, type TreeConversation, type TurnDuration, VALID_SORT_ORDERS, type View, type WatchOptions, applyAccountFilter, applyIncludeFilter, applyPagination, applyProjectFilter, applySinceFilter, applySort, cleanSystemTags, createLogger, detectDefaultProfile, getConversation, getLogger, getProjectsDir, loadProfiles, readGitBranch, readSidecar, resetDefaultScanner, resolveConfigDir, resolveTier, saveProfiles, scan, search, setLogger, sidecarPath };
440
+ export { type AttachmentSidecar, CodexCliProvider, type ContentTier, type Conversation, type ConversationMessage, type ConversationMeta, type ConversationPage, ConversationScanner, type ConversationScannerOptions, DEFAULT_TIERS, type DeferredToolsDeltaAttachment, type DiscoveredConversationFile, type FileStatEntry, type GetConversationOptions, type GetConversationPageOptions, type GroupedConversations, type Include, type ConvReducerState as JsonlParseState, type MessageMetadata, type MessageSender, type MessageSnapshot, type PersistentConfig, type Profile, type ProviderName, type ScanOptions, type ScanResult, type ScannerChangeEvent, type ScannerProvider, type ScannerProviderName, SearchIndexer, type SearchMatch, type SearchOptions, type SearchResult, type Sidecar, type SingleFilePage, type SortOrder, type TeamInfo, ThreadbaseProvider, type ToolResultBlock, type ToolUseBlock, type TreeConversation, type TurnDuration, VALID_SORT_ORDERS, type View, type WatchOptions, applyAccountFilter, applyIncludeFilter, applyPagination, applyProjectFilter, applySinceFilter, applySort, cleanSystemTags, initialConvState as createJsonlParseState, createLogger, detectDefaultProfile, getConversation, getLogger, getProjectsDir, loadProfiles, parseJsonlLine, readGitBranch, readSidecar, resetDefaultScanner, resolveConfigDir, resolveTier, saveProfiles, scan, search, setLogger, sidecarPath };