chattercatcher 0.1.6 → 0.1.8

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.ts CHANGED
@@ -282,7 +282,7 @@ declare class FeishuResourceDownloader {
282
282
  }
283
283
 
284
284
  declare class MessageRepository {
285
- readonly database: SqliteDatabase;
285
+ private readonly database;
286
286
  constructor(database: SqliteDatabase);
287
287
  ingest(input: IngestMessageInput): string;
288
288
  listRecentMessages(limit?: number): MessageSearchResult[];
@@ -585,6 +585,8 @@ interface GatewayPidRecord {
585
585
  pid: number;
586
586
  startedAt: string;
587
587
  command: string;
588
+ logFile?: string;
589
+ mode?: "gateway" | "web";
588
590
  }
589
591
  interface GatewayRuntimeState {
590
592
  pidFile: string;
@@ -597,6 +599,7 @@ interface StopGatewayResult {
597
599
  message: string;
598
600
  }
599
601
  declare function getGatewayPidPath(): string;
602
+ declare function getGatewayLogPath(): string;
600
603
  declare function isProcessRunning(pid: number): boolean;
601
604
  declare function readGatewayPidRecord(pidFile?: string): GatewayPidRecord | null;
602
605
  declare function writeGatewayPidRecord(pidFile?: string, record?: GatewayPidRecord): void;
@@ -737,13 +740,19 @@ declare function indexMessageChunks(input: {
737
740
  messageIds?: string[];
738
741
  }): Promise<VectorIndexStats>;
739
742
 
740
- declare class SQLiteVectorStore implements VectorStore {
741
- private readonly database;
742
- constructor(database: SqliteDatabase);
743
+ declare function getLanceDbPath(config: AppConfig): string;
744
+ declare class LanceDbVectorStore implements VectorStore {
745
+ private readonly connection;
746
+ private readonly tableName;
747
+ private constructor();
748
+ static connect(uri: string, tableName?: string): Promise<LanceDbVectorStore>;
749
+ static connectFromConfig(config: AppConfig, tableName?: string): Promise<LanceDbVectorStore>;
750
+ close(): void;
743
751
  upsert(records: VectorRecord[]): Promise<void>;
744
752
  search(vector: number[], limit: number): Promise<VectorSearchResult[]>;
745
753
  count(): Promise<number>;
746
- close(): void;
754
+ private ensureTable;
755
+ private openTableIfExists;
747
756
  }
748
757
 
749
758
  declare function hasEmbeddingConfig(config: AppConfig, secrets: AppSecrets): boolean;
@@ -799,4 +808,4 @@ declare class VectorRetriever implements Retriever {
799
808
  declare function createWebApp(config: AppConfig): FastifyInstance;
800
809
  declare function startWebServer(config: AppConfig): Promise<void>;
801
810
 
802
- export { type AppConfig, type AppSecrets, type AskWithRagInput, type BuildEvidencePromptOptions, type ChatMessage, type ChatModel, type ChatRecord, type Citation, type DataExportResult, type DataRestoreResult, type DeleteLocalDataResult, type DeleteTargetType, type DoctorCheck, type DoctorOptions, type DoctorStatus, type EmbeddingModel, type EvidenceBlock, type EvidencePrompt, type EvidenceSource, type FeishuAttachmentMetadata, type FeishuDownloadResourceInput, type FeishuDownloadedResource, type FeishuGatewayOptions, type FeishuGatewayRuntime, FeishuMessageSender, type FeishuQuestionDecision, FeishuQuestionHandler, type FeishuQuestionHandlerOptions, type FeishuReceiveMessageEvent, FeishuResourceDownloader, type FileJobRecord, FileJobRepository, type FileJobStatus, type FileRecord, type GatewayAttachmentIngestResult, type GatewayIngestAndDownloadResult, type GatewayIngestResult, GatewayIngestor, type GatewayPidRecord, type GatewayRuntimeState, type GroundedAnswer, HybridRetriever, type HybridRetrieverOptions, type IngestLocalFileResult, type IngestMessageInput, type LogFileInfo, type LogTailResult, type ManualMessageIndexResult, MemoryVectorStore, MessageFtsRetriever, type MessageRecord, MessageRepository, type MessageSearchResult, type MessageSender, OpenAICompatibleChatModel, type OpenAICompatibleChatOptions, OpenAICompatibleEmbeddingModel, type OpenAICompatibleEmbeddingOptions, type ParsedFile, SQLiteVectorStore, type SourceType, type SqliteDatabase, type StopGatewayResult, type TextChunk, type VectorIndexStats, type VectorRecord, VectorRetriever, type VectorSearchResult, type VectorStore, appConfigSchema, appSecretsSchema, applySecretInput, askWithRag, buildEvidencePrompt, chunkText, cosineSimilarity, createChatModel, createDefaultConfig, createDefaultSecrets, createEmbeddingModel, createFeishuEventDispatcher, createFeishuGateway, createHybridRetriever, createWebApp, deleteLocalData, describeSupportedParseTypes, ensureConfigFiles, exportLocalData, extractFeishuAttachment, followLogFile, formatCitation, formatCitations, formatDoctorChecks, generateGroundedAnswer, getDatabasePath, getFeishuQuestionDecision, getGatewayPidPath, getGatewayRuntimeState, getLogsDirectory, hasEmbeddingConfig, indexMessageChunks, ingestLocalFile, isFeishuMessageAddressedToBot, isProcessRunning, isSupportedParseFile, isSupportedTextFile, listLogFiles, loadConfig, loadSecrets, mapDomain, maskSecret, migrateDatabase, normalizeFeishuReceiveMessageEvent, normalizeLineCount, openDatabase, parseFileToText, processMessagesNow, rankEvidenceForPrompt, readGatewayPidRecord, readLatestLogTail, readLogTail, removeGatewayPidRecord, resetConfigFiles, resolveEmbeddingApiKey, resolveLogPath, restoreLocalData, runDoctor, saveConfig, saveSecrets, startWebServer, stopGatewayProcess, writeGatewayPidRecord };
811
+ export { type AppConfig, type AppSecrets, type AskWithRagInput, type BuildEvidencePromptOptions, type ChatMessage, type ChatModel, type ChatRecord, type Citation, type DataExportResult, type DataRestoreResult, type DeleteLocalDataResult, type DeleteTargetType, type DoctorCheck, type DoctorOptions, type DoctorStatus, type EmbeddingModel, type EvidenceBlock, type EvidencePrompt, type EvidenceSource, type FeishuAttachmentMetadata, type FeishuDownloadResourceInput, type FeishuDownloadedResource, type FeishuGatewayOptions, type FeishuGatewayRuntime, FeishuMessageSender, type FeishuQuestionDecision, FeishuQuestionHandler, type FeishuQuestionHandlerOptions, type FeishuReceiveMessageEvent, FeishuResourceDownloader, type FileJobRecord, FileJobRepository, type FileJobStatus, type FileRecord, type GatewayAttachmentIngestResult, type GatewayIngestAndDownloadResult, type GatewayIngestResult, GatewayIngestor, type GatewayPidRecord, type GatewayRuntimeState, type GroundedAnswer, HybridRetriever, type HybridRetrieverOptions, type IngestLocalFileResult, type IngestMessageInput, LanceDbVectorStore, type LogFileInfo, type LogTailResult, type ManualMessageIndexResult, MemoryVectorStore, MessageFtsRetriever, type MessageRecord, MessageRepository, type MessageSearchResult, type MessageSender, OpenAICompatibleChatModel, type OpenAICompatibleChatOptions, OpenAICompatibleEmbeddingModel, type OpenAICompatibleEmbeddingOptions, type ParsedFile, type SourceType, type SqliteDatabase, type StopGatewayResult, type TextChunk, type VectorIndexStats, type VectorRecord, VectorRetriever, type VectorSearchResult, type VectorStore, appConfigSchema, appSecretsSchema, applySecretInput, askWithRag, buildEvidencePrompt, chunkText, cosineSimilarity, createChatModel, createDefaultConfig, createDefaultSecrets, createEmbeddingModel, createFeishuEventDispatcher, createFeishuGateway, createHybridRetriever, createWebApp, deleteLocalData, describeSupportedParseTypes, ensureConfigFiles, exportLocalData, extractFeishuAttachment, followLogFile, formatCitation, formatCitations, formatDoctorChecks, generateGroundedAnswer, getDatabasePath, getFeishuQuestionDecision, getGatewayLogPath, getGatewayPidPath, getGatewayRuntimeState, getLanceDbPath, getLogsDirectory, hasEmbeddingConfig, indexMessageChunks, ingestLocalFile, isFeishuMessageAddressedToBot, isProcessRunning, isSupportedParseFile, isSupportedTextFile, listLogFiles, loadConfig, loadSecrets, mapDomain, maskSecret, migrateDatabase, normalizeFeishuReceiveMessageEvent, normalizeLineCount, openDatabase, parseFileToText, processMessagesNow, rankEvidenceForPrompt, readGatewayPidRecord, readLatestLogTail, readLogTail, removeGatewayPidRecord, resetConfigFiles, resolveEmbeddingApiKey, resolveLogPath, restoreLocalData, runDoctor, saveConfig, saveSecrets, startWebServer, stopGatewayProcess, writeGatewayPidRecord };