@claude-sessions/core 0.3.7 → 0.4.1-beta.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.ts +220 -122
- package/dist/index.js +1258 -892
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/{types-Cz8chaYQ.d.ts → types-mWa378iC.d.ts} +46 -1
- package/package.json +3 -3
package/dist/server.d.ts
CHANGED
|
@@ -105,7 +105,12 @@ interface Message extends TypedObject {
|
|
|
105
105
|
interface SessionMeta {
|
|
106
106
|
id: string;
|
|
107
107
|
projectName: string;
|
|
108
|
+
/** First user message title */
|
|
108
109
|
title?: string;
|
|
110
|
+
/** User-set custom title */
|
|
111
|
+
customTitle?: string;
|
|
112
|
+
/** Current (first) summary text for display */
|
|
113
|
+
currentSummary?: string;
|
|
109
114
|
messageCount: number;
|
|
110
115
|
createdAt?: string;
|
|
111
116
|
updatedAt?: string;
|
|
@@ -201,11 +206,38 @@ interface SearchResult {
|
|
|
201
206
|
messageUuid?: string;
|
|
202
207
|
timestamp?: string;
|
|
203
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Entry in sessions-index.json file.
|
|
211
|
+
* This is the official index format used by Claude Code extension.
|
|
212
|
+
*/
|
|
213
|
+
interface SessionIndexEntry {
|
|
214
|
+
sessionId: string;
|
|
215
|
+
fullPath: string;
|
|
216
|
+
fileMtime: number;
|
|
217
|
+
firstPrompt: string;
|
|
218
|
+
customTitle?: string;
|
|
219
|
+
summary?: string;
|
|
220
|
+
messageCount: number;
|
|
221
|
+
created: string;
|
|
222
|
+
modified: string;
|
|
223
|
+
gitBranch: string;
|
|
224
|
+
projectPath: string;
|
|
225
|
+
isSidechain: boolean;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Sessions index file structure.
|
|
229
|
+
* Located at ~/.claude/projects/{project-folder}/sessions-index.json
|
|
230
|
+
*/
|
|
231
|
+
interface SessionsIndex {
|
|
232
|
+
version: number;
|
|
233
|
+
entries: SessionIndexEntry[];
|
|
234
|
+
}
|
|
204
235
|
/** Summary extracted from a session for display */
|
|
205
236
|
interface SummaryInfo {
|
|
206
237
|
summary: string;
|
|
207
238
|
leafUuid?: string;
|
|
208
239
|
timestamp?: string;
|
|
240
|
+
sourceFile?: string;
|
|
209
241
|
}
|
|
210
242
|
/** Agent information for tree display */
|
|
211
243
|
interface AgentInfo {
|
|
@@ -226,6 +258,10 @@ interface SessionTreeData {
|
|
|
226
258
|
messageCount: number;
|
|
227
259
|
createdAt?: string;
|
|
228
260
|
updatedAt?: string;
|
|
261
|
+
/** File modification time (Unix timestamp ms) */
|
|
262
|
+
fileMtime?: number;
|
|
263
|
+
/** Pre-calculated sort timestamp (Unix timestamp ms) for 'summary' field */
|
|
264
|
+
sortTimestamp: number;
|
|
229
265
|
/** All summaries in reverse order (newest first) */
|
|
230
266
|
summaries: SummaryInfo[];
|
|
231
267
|
agents: AgentInfo[];
|
|
@@ -241,6 +277,15 @@ interface ProjectTreeData {
|
|
|
241
277
|
sessionCount: number;
|
|
242
278
|
sessions: SessionTreeData[];
|
|
243
279
|
}
|
|
280
|
+
/**
|
|
281
|
+
* Sort options for session list
|
|
282
|
+
*/
|
|
283
|
+
type SessionSortField = 'summary' | 'modified' | 'created' | 'updated' | 'messageCount' | 'title';
|
|
284
|
+
type SessionSortOrder = 'asc' | 'desc';
|
|
285
|
+
interface SessionSortOptions {
|
|
286
|
+
field: SessionSortField;
|
|
287
|
+
order: SessionSortOrder;
|
|
288
|
+
}
|
|
244
289
|
/** Options for resuming a session */
|
|
245
290
|
interface ResumeSessionOptions {
|
|
246
291
|
/** Session ID to resume */
|
|
@@ -370,4 +415,4 @@ interface SummarizeSessionResult {
|
|
|
370
415
|
formatted: string;
|
|
371
416
|
}
|
|
372
417
|
|
|
373
|
-
export type { AgentInfo as A, CompressSessionOptions as C, DeleteSessionResult as D, FileChange as F, MessagePayload as M, Project as P, RenameSessionResult as R,
|
|
418
|
+
export type { AgentInfo as A, CompressSessionOptions as C, DeleteSessionResult as D, FileChange as F, MessagePayload as M, Project as P, RenameSessionResult as R, SummaryInfo as S, TodoItem as T, Message as a, SessionTodos as b, MoveSessionResult as c, SessionSortOptions as d, ProjectTreeData as e, SummarizeSessionOptions as f, ConversationLine as g, SearchResult as h, SessionsIndex as i, SessionIndexEntry as j, ContentItem as k, SessionMeta as l, SessionFilesSummary as m, SplitSessionResult as n, ClearSessionsResult as o, CleanupPreview as p, SessionTreeData as q, ResumeSessionOptions as r, ResumeSessionResult as s, ToolUsageStats as t, SessionAnalysis as u, CompressSessionResult as v, ProjectKnowledge as w, SummarizeSessionResult as x, SessionSortField as y, SessionSortOrder as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-sessions/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1-beta.0",
|
|
4
4
|
"description": "Core library for Claude Code session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"effect": "^3.19.14"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@types/node": "^25.0.
|
|
30
|
+
"@types/node": "^25.0.9",
|
|
31
31
|
"tsup": "^8.3.0",
|
|
32
32
|
"typescript": "^5.7.0",
|
|
33
|
-
"vitest": "^4.0.
|
|
33
|
+
"vitest": "^4.0.17"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsup",
|