@claude-sessions/core 0.4.6 → 0.4.7-beta.1
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 +16 -5
- package/dist/index.js +311 -102
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,11 @@ declare const getRealPathFromSession: (folderName: string, sessionsDir?: string,
|
|
|
43
43
|
/**
|
|
44
44
|
* Convert folder name to relative or absolute path for display
|
|
45
45
|
* If path is under home directory, show relative (~/...)
|
|
46
|
+
*
|
|
47
|
+
* Priority order (fastest first):
|
|
48
|
+
* 1. Claude config lookup (~/.claude.json) - single async file read, cached by OS
|
|
49
|
+
* 2. Session cwd extraction (sync reads session files - expensive but accurate)
|
|
50
|
+
* 3. Pattern-based conversion (pure function, zero I/O - fallback, may be inaccurate for dots/spaces)
|
|
46
51
|
*/
|
|
47
52
|
declare const folderNameToPath: (folderName: string) => Promise<string>;
|
|
48
53
|
/**
|
|
@@ -114,15 +119,19 @@ declare const getSessionSortTimestamp: (session: {
|
|
|
114
119
|
*/
|
|
115
120
|
declare const tryParseJsonLine: <T = Record<string, unknown>>(line: string, lineNumber: number, filePath?: string) => T | null;
|
|
116
121
|
/**
|
|
117
|
-
* Parse JSONL lines with
|
|
118
|
-
* @throws
|
|
122
|
+
* Parse JSONL lines with optional strict mode
|
|
123
|
+
* @param strict - When true, throws on malformed lines. When false (default), skips with a warning.
|
|
119
124
|
*/
|
|
120
|
-
declare const parseJsonlLines: <T = Record<string, unknown>>(lines: string[], filePath: string
|
|
125
|
+
declare const parseJsonlLines: <T = Record<string, unknown>>(lines: string[], filePath: string, { strict }?: {
|
|
126
|
+
strict?: boolean;
|
|
127
|
+
}) => T[];
|
|
121
128
|
/**
|
|
122
129
|
* Read and parse JSONL file (Effect wrapper)
|
|
123
130
|
* Combines file reading and JSONL parsing with proper error messages
|
|
124
131
|
*/
|
|
125
|
-
declare const readJsonlFile: <T = Record<string, unknown>>(filePath: string
|
|
132
|
+
declare const readJsonlFile: <T = Record<string, unknown>>(filePath: string, options?: {
|
|
133
|
+
strict?: boolean;
|
|
134
|
+
}) => Effect.Effect<T[], effect_Cause.UnknownException, never>;
|
|
126
135
|
/**
|
|
127
136
|
* Format timestamp as relative time (e.g., "2h ago", "3d ago")
|
|
128
137
|
* Used by both VSCode Extension tree view and Web UI
|
|
@@ -385,6 +394,8 @@ declare const loadSessionTreeData: (projectName: string, sessionId: string) => E
|
|
|
385
394
|
}, effect_Cause.UnknownException, never>;
|
|
386
395
|
declare const loadProjectTreeData: (projectName: string, sortOptions?: SessionSortOptions) => Effect.Effect<ProjectTreeData | null, effect_Cause.UnknownException, never>;
|
|
387
396
|
|
|
397
|
+
declare const getCachePath: (projectName: string) => string;
|
|
398
|
+
|
|
388
399
|
declare const analyzeSession: (projectName: string, sessionId: string) => Effect.Effect<{
|
|
389
400
|
sessionId: string;
|
|
390
401
|
projectName: string;
|
|
@@ -659,4 +670,4 @@ declare const getLogger: () => Logger;
|
|
|
659
670
|
*/
|
|
660
671
|
declare const createLogger: (namespace: string) => Logger;
|
|
661
672
|
|
|
662
|
-
export { AgentInfo, type ChainError, CompressSessionOptions, ConversationLine, FileChange, type GenericMessage, type Logger, Message, MessagePayload$1 as MessagePayload, MoveSessionResult, type ProgressError, Project, ProjectTreeData, SearchResult, SessionIndexEntry, SessionSortOptions, SessionTodos, SessionsIndex, SummarizeSessionOptions, SummaryInfo, TREE_ICONS, type ToolUseResultError, type TreeItemType, type ValidationResult, analyzeSession, autoRepairChain, canMoveSession, clearSessions, compressSession, createLogger, deleteLinkedTodos, deleteMessage, deleteMessageWithChainRepair, deleteOrphanAgents, deleteOrphanTodos, deleteSession, expandHomePath, extractProjectKnowledge, extractTextContent, extractTitle, findLinkedAgents, findLinkedTodos, findOrphanAgents, findOrphanTodos, findProjectByWorkspacePath, folderNameToDisplayPath, folderNameToPath, formatRelativeTime, generateTreeNodeId, getDisplayTitle, getIndexEntryDisplayTitle, getLogger, getRealPathFromSession, getSessionFiles, getSessionSortTimestamp, getSessionTooltip, getSessionsDir, getTodoIcon, getTodosDir, getTotalTodoCount, hasSessionsIndex, isContinuationSummary, isInvalidApiKeyMessage, listProjects, listSessions, loadAgentMessages, loadProjectTreeData, loadSessionTreeData, loadSessionsIndex, maskHomePath, moveSession, parseCommandMessage, parseJsonlLines, parseTreeNodeId, pathToFolderName, previewCleanup, readJsonlFile, readSession, renameSession, repairChain, repairParentUuidChain, restoreMessage, searchSessions, sessionHasSubItems, sessionHasTodos, setLogger, sortIndexEntriesByModified, sortProjects, splitSession, summarizeSession, tryParseJsonLine, updateSessionSummary, validateChain, validateProgressMessages, validateToolUseResult };
|
|
673
|
+
export { AgentInfo, type ChainError, CompressSessionOptions, ConversationLine, FileChange, type GenericMessage, type Logger, Message, MessagePayload$1 as MessagePayload, MoveSessionResult, type ProgressError, Project, ProjectTreeData, SearchResult, SessionIndexEntry, SessionSortOptions, SessionTodos, SessionsIndex, SummarizeSessionOptions, SummaryInfo, TREE_ICONS, type ToolUseResultError, type TreeItemType, type ValidationResult, analyzeSession, autoRepairChain, canMoveSession, clearSessions, compressSession, createLogger, deleteLinkedTodos, deleteMessage, deleteMessageWithChainRepair, deleteOrphanAgents, deleteOrphanTodos, deleteSession, expandHomePath, extractProjectKnowledge, extractTextContent, extractTitle, findLinkedAgents, findLinkedTodos, findOrphanAgents, findOrphanTodos, findProjectByWorkspacePath, folderNameToDisplayPath, folderNameToPath, formatRelativeTime, generateTreeNodeId, getCachePath, getDisplayTitle, getIndexEntryDisplayTitle, getLogger, getRealPathFromSession, getSessionFiles, getSessionSortTimestamp, getSessionTooltip, getSessionsDir, getTodoIcon, getTodosDir, getTotalTodoCount, hasSessionsIndex, isContinuationSummary, isInvalidApiKeyMessage, listProjects, listSessions, loadAgentMessages, loadProjectTreeData, loadSessionTreeData, loadSessionsIndex, maskHomePath, moveSession, parseCommandMessage, parseJsonlLines, parseTreeNodeId, pathToFolderName, previewCleanup, readJsonlFile, readSession, renameSession, repairChain, repairParentUuidChain, restoreMessage, searchSessions, sessionHasSubItems, sessionHasTodos, setLogger, sortIndexEntriesByModified, sortProjects, splitSession, summarizeSession, tryParseJsonLine, updateSessionSummary, validateChain, validateProgressMessages, validateToolUseResult };
|