feat: ship v1.0.0 with character graph and writing analytics

Add P7 Cytoscape relationship graph with setting CRUD, P9 cockpit analytics driven by writing_sessions, chapter POV selection, and full test coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-08 10:48:31 +08:00
parent 2c9b034a29
commit 4adafa1936
44 changed files with 2062 additions and 602 deletions
+24 -1
View File
@@ -49,7 +49,10 @@ import type {
GoalNotificationPayload,
KnowledgeInjectionLog,
WritingAchievement,
PomodoroDuration
PomodoroDuration,
CharacterGraphData,
CharacterRelationship,
WritingAnalyticsSummary
} from './types'
export interface ElectronAPI {
@@ -387,6 +390,26 @@ export interface ElectronAPI {
markSeen: (bookId: string) => Promise<IpcResult<void>>
shouldShowOnOpen: (bookId: string) => Promise<IpcResult<boolean>>
}
graph: {
getData: (bookId: string, filter?: 'all' | 'connected') => Promise<IpcResult<CharacterGraphData>>
upsertRelationship: (
bookId: string,
sourceId: string,
relationship: Partial<CharacterRelationship> & {
targetId: string
label: string
intimacy: number
}
) => Promise<IpcResult<CharacterRelationship>>
deleteRelationship: (
bookId: string,
sourceId: string,
relationshipId: string
) => Promise<IpcResult<void>>
}
analytics: {
getSummary: (bookId: string) => Promise<IpcResult<WritingAnalyticsSummary>>
}
bridge: {
get: (
bookId: string,