@claude-sessions/core 0.3.6 → 0.3.7
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 +70 -4
- package/dist/index.js +430 -30
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/{types-C2fzbmg9.d.ts → types-Cz8chaYQ.d.ts} +110 -1
- package/package.json +1 -1
package/dist/server.d.ts
CHANGED
|
@@ -260,5 +260,114 @@ interface ResumeSessionResult {
|
|
|
260
260
|
/** Error message if failed */
|
|
261
261
|
error?: string;
|
|
262
262
|
}
|
|
263
|
+
/** Tool usage statistics */
|
|
264
|
+
interface ToolUsageStats {
|
|
265
|
+
/** Tool name */
|
|
266
|
+
name: string;
|
|
267
|
+
/** Number of times used */
|
|
268
|
+
count: number;
|
|
269
|
+
/** Number of errors */
|
|
270
|
+
errorCount: number;
|
|
271
|
+
}
|
|
272
|
+
/** Session analysis result for optimization */
|
|
273
|
+
interface SessionAnalysis {
|
|
274
|
+
sessionId: string;
|
|
275
|
+
projectName: string;
|
|
276
|
+
/** Session duration in minutes */
|
|
277
|
+
durationMinutes: number;
|
|
278
|
+
/** Message statistics */
|
|
279
|
+
stats: {
|
|
280
|
+
totalMessages: number;
|
|
281
|
+
userMessages: number;
|
|
282
|
+
assistantMessages: number;
|
|
283
|
+
summaryCount: number;
|
|
284
|
+
snapshotCount: number;
|
|
285
|
+
};
|
|
286
|
+
/** Tool usage breakdown */
|
|
287
|
+
toolUsage: ToolUsageStats[];
|
|
288
|
+
/** Files changed during session */
|
|
289
|
+
filesChanged: string[];
|
|
290
|
+
/** Detected patterns (e.g., repeated failures, common operations) */
|
|
291
|
+
patterns: {
|
|
292
|
+
type: string;
|
|
293
|
+
description: string;
|
|
294
|
+
count: number;
|
|
295
|
+
}[];
|
|
296
|
+
/** Key decisions or milestones extracted from conversation */
|
|
297
|
+
milestones: {
|
|
298
|
+
timestamp?: string;
|
|
299
|
+
description: string;
|
|
300
|
+
messageUuid?: string;
|
|
301
|
+
}[];
|
|
302
|
+
}
|
|
303
|
+
/** Options for session compression */
|
|
304
|
+
interface CompressSessionOptions {
|
|
305
|
+
/** Keep first and last snapshots only */
|
|
306
|
+
keepSnapshots?: 'first_last' | 'all' | 'none';
|
|
307
|
+
/** Summarize tool outputs longer than this (0 = no limit) */
|
|
308
|
+
maxToolOutputLength?: number;
|
|
309
|
+
}
|
|
310
|
+
/** Result of session compression */
|
|
311
|
+
interface CompressSessionResult {
|
|
312
|
+
success: boolean;
|
|
313
|
+
originalSize: number;
|
|
314
|
+
compressedSize: number;
|
|
315
|
+
removedSnapshots: number;
|
|
316
|
+
truncatedOutputs: number;
|
|
317
|
+
error?: string;
|
|
318
|
+
}
|
|
319
|
+
/** Extracted knowledge from sessions */
|
|
320
|
+
interface ProjectKnowledge {
|
|
321
|
+
projectName: string;
|
|
322
|
+
/** Common patterns across sessions */
|
|
323
|
+
patterns: {
|
|
324
|
+
type: string;
|
|
325
|
+
description: string;
|
|
326
|
+
frequency: number;
|
|
327
|
+
examples: string[];
|
|
328
|
+
}[];
|
|
329
|
+
/** Frequently modified files */
|
|
330
|
+
hotFiles: {
|
|
331
|
+
path: string;
|
|
332
|
+
modifyCount: number;
|
|
333
|
+
lastModified?: string;
|
|
334
|
+
}[];
|
|
335
|
+
/** Common tool workflows */
|
|
336
|
+
workflows: {
|
|
337
|
+
sequence: string[];
|
|
338
|
+
count: number;
|
|
339
|
+
}[];
|
|
340
|
+
/** Learned decisions */
|
|
341
|
+
decisions: {
|
|
342
|
+
context: string;
|
|
343
|
+
decision: string;
|
|
344
|
+
sessionId: string;
|
|
345
|
+
}[];
|
|
346
|
+
}
|
|
347
|
+
/** A single line in conversation summary */
|
|
348
|
+
interface ConversationLine {
|
|
349
|
+
/** Message role */
|
|
350
|
+
role: 'user' | 'assistant';
|
|
351
|
+
/** Message content (truncated) */
|
|
352
|
+
content: string;
|
|
353
|
+
/** Timestamp string (MM-DD HH:MM), only for user messages */
|
|
354
|
+
timestamp?: string;
|
|
355
|
+
}
|
|
356
|
+
/** Options for summarizing a session */
|
|
357
|
+
interface SummarizeSessionOptions {
|
|
358
|
+
/** Maximum number of messages to include */
|
|
359
|
+
limit?: number;
|
|
360
|
+
/** Maximum length for each message content */
|
|
361
|
+
maxLength?: number;
|
|
362
|
+
}
|
|
363
|
+
/** Result of session summarization */
|
|
364
|
+
interface SummarizeSessionResult {
|
|
365
|
+
sessionId: string;
|
|
366
|
+
projectName: string;
|
|
367
|
+
/** Structured conversation lines */
|
|
368
|
+
lines: ConversationLine[];
|
|
369
|
+
/** Pre-formatted output string */
|
|
370
|
+
formatted: string;
|
|
371
|
+
}
|
|
263
372
|
|
|
264
|
-
export type { AgentInfo as A,
|
|
373
|
+
export type { AgentInfo as A, CompressSessionOptions as C, DeleteSessionResult as D, FileChange as F, MessagePayload as M, Project as P, RenameSessionResult as R, SummarizeSessionOptions as S, TodoItem as T, Message as a, ConversationLine as b, MoveSessionResult as c, SearchResult as d, SummaryInfo as e, ContentItem as f, SessionMeta as g, SessionTodos as h, SessionFilesSummary as i, SplitSessionResult as j, ClearSessionsResult as k, CleanupPreview as l, SessionTreeData as m, ProjectTreeData as n, ResumeSessionOptions as o, ResumeSessionResult as p, ToolUsageStats as q, SessionAnalysis as r, CompressSessionResult as s, ProjectKnowledge as t, SummarizeSessionResult as u };
|