@claude-sessions/core 0.4.1 → 0.4.2-beta.2
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 +41 -18
- package/dist/index.js +502 -465
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/{types-DZsLFIFK.d.ts → types-BoYCOac3.d.ts} +2 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MessagePayload$1, a as Message,
|
|
2
|
-
export { p as CleanupPreview, o as ClearSessionsResult, v as CompressSessionResult, k as ContentItem, D as DeleteSessionResult, w as ProjectKnowledge, R as RenameSessionResult, r as ResumeSessionOptions, s as ResumeSessionResult, u as SessionAnalysis, m as SessionFilesSummary, l as SessionMeta, y as SessionSortField, z as SessionSortOrder, q as SessionTreeData, n as SplitSessionResult, x as SummarizeSessionResult, T as TodoItem, t as ToolUsageStats } from './types-
|
|
1
|
+
import { P as Project, M as MessagePayload$1, a as Message, S as SummaryInfo, b as SessionTodos, c as MoveSessionResult, A as AgentInfo, d as SessionSortOptions, e as ProjectTreeData, C as CompressSessionOptions, f as SummarizeSessionOptions, g as ConversationLine, h as SearchResult, F as FileChange, i as SessionsIndex, j as SessionIndexEntry } from './types-BoYCOac3.js';
|
|
2
|
+
export { p as CleanupPreview, o as ClearSessionsResult, v as CompressSessionResult, k as ContentItem, D as DeleteSessionResult, w as ProjectKnowledge, R as RenameSessionResult, r as ResumeSessionOptions, s as ResumeSessionResult, u as SessionAnalysis, m as SessionFilesSummary, l as SessionMeta, y as SessionSortField, z as SessionSortOrder, q as SessionTreeData, n as SplitSessionResult, x as SummarizeSessionResult, T as TodoItem, t as ToolUsageStats } from './types-BoYCOac3.js';
|
|
3
3
|
import * as effect_Cause from 'effect/Cause';
|
|
4
4
|
import { Effect } from 'effect';
|
|
5
5
|
|
|
@@ -59,9 +59,21 @@ declare const folderNameToPath: (folderName: string) => string;
|
|
|
59
59
|
declare const findProjectByWorkspacePath: (workspacePath: string, projectNames: string[], sessionsDir?: string, fileSystem?: FileSystem, logger?: Logger$1) => string | null;
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
62
|
+
* Project-level utilities
|
|
63
63
|
*/
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Sort projects with priority:
|
|
67
|
+
* 1. Current project (if specified)
|
|
68
|
+
* 2. Current user's home directory subpaths
|
|
69
|
+
* 3. Others (alphabetically by displayName)
|
|
70
|
+
*/
|
|
71
|
+
declare const sortProjects: (projects: Project[], options?: {
|
|
72
|
+
currentProjectName?: string | null;
|
|
73
|
+
homeDir?: string;
|
|
74
|
+
filterEmpty?: boolean;
|
|
75
|
+
}) => Project[];
|
|
76
|
+
|
|
65
77
|
declare const extractTextContent: (message: MessagePayload$1 | undefined) => string;
|
|
66
78
|
/**
|
|
67
79
|
* Parse command message content (e.g., slash commands like /commit)
|
|
@@ -85,17 +97,6 @@ declare const getDisplayTitle: (customTitle: string | undefined, currentSummary:
|
|
|
85
97
|
* Only masks the specified homeDir, not other users' paths
|
|
86
98
|
*/
|
|
87
99
|
declare const maskHomePath: (text: string, homeDir: string) => string;
|
|
88
|
-
/**
|
|
89
|
-
* Sort projects with priority:
|
|
90
|
-
* 1. Current project (if specified)
|
|
91
|
-
* 2. Current user's home directory subpaths
|
|
92
|
-
* 3. Others (alphabetically by displayName)
|
|
93
|
-
*/
|
|
94
|
-
declare const sortProjects: (projects: Project[], options?: {
|
|
95
|
-
currentProjectName?: string | null;
|
|
96
|
-
homeDir?: string;
|
|
97
|
-
filterEmpty?: boolean;
|
|
98
|
-
}) => Project[];
|
|
99
100
|
/**
|
|
100
101
|
* Get sort timestamp for session (Unix timestamp ms)
|
|
101
102
|
* Priority: summaries[0].timestamp > createdAt > 0
|
|
@@ -104,6 +105,21 @@ declare const getSessionSortTimestamp: (session: {
|
|
|
104
105
|
summaries?: SummaryInfo[];
|
|
105
106
|
createdAt?: string;
|
|
106
107
|
}) => number;
|
|
108
|
+
/**
|
|
109
|
+
* Try to parse a single JSON line, returning null on failure with optional warning log
|
|
110
|
+
* Use this when you want to skip invalid lines instead of throwing
|
|
111
|
+
*/
|
|
112
|
+
declare const tryParseJsonLine: <T = Record<string, unknown>>(line: string, lineNumber: number, filePath?: string) => T | null;
|
|
113
|
+
/**
|
|
114
|
+
* Parse JSONL lines with detailed error messages including file path and line number
|
|
115
|
+
* @throws Error with "Failed to parse line X in /path/to/file: original error"
|
|
116
|
+
*/
|
|
117
|
+
declare const parseJsonlLines: <T = Record<string, unknown>>(lines: string[], filePath: string) => T[];
|
|
118
|
+
/**
|
|
119
|
+
* Read and parse JSONL file (Effect wrapper)
|
|
120
|
+
* Combines file reading and JSONL parsing with proper error messages
|
|
121
|
+
*/
|
|
122
|
+
declare const readJsonlFile: <T = Record<string, unknown>>(filePath: string) => Effect.Effect<T[], effect_Cause.UnknownException, never>;
|
|
107
123
|
|
|
108
124
|
declare const findLinkedAgents: (projectName: string, sessionId: string) => Effect.Effect<string[], effect_Cause.UnknownException, never>;
|
|
109
125
|
declare const findOrphanAgents: (projectName: string) => Effect.Effect<{
|
|
@@ -123,7 +139,7 @@ declare const deleteOrphanAgents: (projectName: string) => Effect.Effect<{
|
|
|
123
139
|
declare const loadAgentMessages: (projectName: string, _sessionId: string, // Reserved for future validation
|
|
124
140
|
agentId: string) => Effect.Effect<Message[], effect_Cause.UnknownException, never>;
|
|
125
141
|
|
|
126
|
-
declare const findLinkedTodos: (sessionId: string, agentIds?: string[]) => Effect.Effect<SessionTodos
|
|
142
|
+
declare const findLinkedTodos: (sessionId: string, agentIds?: string[]) => Effect.Effect<SessionTodos, effect_Cause.UnknownException, never>;
|
|
127
143
|
declare const sessionHasTodos: (sessionId: string, agentIds?: string[]) => Effect.Effect<boolean, effect_Cause.UnknownException, never>;
|
|
128
144
|
declare const deleteLinkedTodos: (sessionId: string, agentIds: string[]) => Effect.Effect<{
|
|
129
145
|
deletedCount: number;
|
|
@@ -214,7 +230,7 @@ declare const loadSessionTreeData: (projectName: string, sessionId: string) => E
|
|
|
214
230
|
sortTimestamp: number;
|
|
215
231
|
summaries: SummaryInfo[];
|
|
216
232
|
agents: AgentInfo[];
|
|
217
|
-
todos: SessionTodos
|
|
233
|
+
todos: SessionTodos;
|
|
218
234
|
lastCompactBoundaryUuid: string | undefined;
|
|
219
235
|
}, effect_Cause.UnknownException, never>;
|
|
220
236
|
declare const loadProjectTreeData: (projectName: string, sortOptions?: SessionSortOptions) => Effect.Effect<ProjectTreeData | null, effect_Cause.UnknownException, never>;
|
|
@@ -251,6 +267,7 @@ declare const compressSession: (projectName: string, sessionId: string, options?
|
|
|
251
267
|
success: true;
|
|
252
268
|
originalSize: number;
|
|
253
269
|
compressedSize: number;
|
|
270
|
+
removedProgress: number;
|
|
254
271
|
removedSnapshots: number;
|
|
255
272
|
truncatedOutputs: number;
|
|
256
273
|
}, effect_Cause.UnknownException, never>;
|
|
@@ -323,7 +340,13 @@ declare const clearSessions: (options: {
|
|
|
323
340
|
declare const searchSessions: (query: string, options?: {
|
|
324
341
|
projectName?: string;
|
|
325
342
|
searchContent?: boolean;
|
|
326
|
-
}) => Effect.Effect<SearchResult
|
|
343
|
+
}) => Effect.Effect<(SearchResult | {
|
|
344
|
+
sessionId: string;
|
|
345
|
+
projectName: string;
|
|
346
|
+
title: string;
|
|
347
|
+
matchType: "title";
|
|
348
|
+
timestamp: string | undefined;
|
|
349
|
+
})[], effect_Cause.UnknownException, never>;
|
|
327
350
|
|
|
328
351
|
declare const getSessionFiles: (projectName: string, sessionId: string) => Effect.Effect<{
|
|
329
352
|
sessionId: string;
|
|
@@ -454,4 +477,4 @@ declare const getLogger: () => Logger;
|
|
|
454
477
|
*/
|
|
455
478
|
declare const createLogger: (namespace: string) => Logger;
|
|
456
479
|
|
|
457
|
-
export { AgentInfo, type ChainError, CompressSessionOptions, ConversationLine, FileChange, type Logger, Message, MessagePayload$1 as MessagePayload, MoveSessionResult, Project, ProjectTreeData, SearchResult, SessionIndexEntry, SessionSortOptions, SessionTodos, SessionsIndex, SummarizeSessionOptions, SummaryInfo, type ToolUseResultError, type ValidationResult, analyzeSession, clearSessions, compressSession, createLogger, deleteLinkedTodos, deleteMessage, deleteMessageWithChainRepair, deleteOrphanAgents, deleteOrphanTodos, deleteSession, displayPathToFolderName, extractProjectKnowledge, extractTextContent, extractTitle, findLinkedAgents, findLinkedTodos, findOrphanAgents, findOrphanTodos, findProjectByWorkspacePath, folderNameToDisplayPath, folderNameToPath, getDisplayTitle, getIndexEntryDisplayTitle, getLogger, getRealPathFromSession, getSessionFiles, getSessionSortTimestamp, getSessionsDir, getTodosDir, hasSessionsIndex, isContinuationSummary, isInvalidApiKeyMessage, listProjects, listSessions, loadAgentMessages, loadProjectTreeData, loadSessionTreeData, loadSessionsIndex, maskHomePath, moveSession, parseCommandMessage, pathToFolderName, previewCleanup, readSession, renameSession, restoreMessage, searchSessions, sessionHasTodos, setLogger, sortIndexEntriesByModified, sortProjects, splitSession, summarizeSession, updateSessionSummary, validateChain, validateToolUseResult };
|
|
480
|
+
export { AgentInfo, type ChainError, CompressSessionOptions, ConversationLine, FileChange, type Logger, Message, MessagePayload$1 as MessagePayload, MoveSessionResult, Project, ProjectTreeData, SearchResult, SessionIndexEntry, SessionSortOptions, SessionTodos, SessionsIndex, SummarizeSessionOptions, SummaryInfo, type ToolUseResultError, type ValidationResult, analyzeSession, clearSessions, compressSession, createLogger, deleteLinkedTodos, deleteMessage, deleteMessageWithChainRepair, deleteOrphanAgents, deleteOrphanTodos, deleteSession, displayPathToFolderName, extractProjectKnowledge, extractTextContent, extractTitle, findLinkedAgents, findLinkedTodos, findOrphanAgents, findOrphanTodos, findProjectByWorkspacePath, folderNameToDisplayPath, folderNameToPath, getDisplayTitle, getIndexEntryDisplayTitle, getLogger, getRealPathFromSession, getSessionFiles, getSessionSortTimestamp, getSessionsDir, getTodosDir, hasSessionsIndex, isContinuationSummary, isInvalidApiKeyMessage, listProjects, listSessions, loadAgentMessages, loadProjectTreeData, loadSessionTreeData, loadSessionsIndex, maskHomePath, moveSession, parseCommandMessage, parseJsonlLines, pathToFolderName, previewCleanup, readJsonlFile, readSession, renameSession, restoreMessage, searchSessions, sessionHasTodos, setLogger, sortIndexEntriesByModified, sortProjects, splitSession, summarizeSession, tryParseJsonLine, updateSessionSummary, validateChain, validateToolUseResult };
|