@changw98ic/core 1.0.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.
@@ -0,0 +1,786 @@
1
+ /**
2
+ * State Types - 项目状态定义
3
+ *
4
+ * 与 Python 版本的 state.json 格式保持兼容
5
+ */
6
+ import { z } from 'zod';
7
+ export declare const ProjectInfoSchema: z.ZodObject<{
8
+ title: z.ZodString;
9
+ genre: z.ZodString;
10
+ target_words: z.ZodDefault<z.ZodNumber>;
11
+ target_chapters: z.ZodDefault<z.ZodNumber>;
12
+ one_liner: z.ZodOptional<z.ZodString>;
13
+ core_conflict: z.ZodOptional<z.ZodString>;
14
+ target_reader: z.ZodOptional<z.ZodString>;
15
+ platform: z.ZodOptional<z.ZodString>;
16
+ created_at: z.ZodOptional<z.ZodString>;
17
+ updated_at: z.ZodOptional<z.ZodString>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ title: string;
20
+ genre: string;
21
+ target_words: number;
22
+ target_chapters: number;
23
+ one_liner?: string | undefined;
24
+ core_conflict?: string | undefined;
25
+ target_reader?: string | undefined;
26
+ platform?: string | undefined;
27
+ created_at?: string | undefined;
28
+ updated_at?: string | undefined;
29
+ }, {
30
+ title: string;
31
+ genre: string;
32
+ target_words?: number | undefined;
33
+ target_chapters?: number | undefined;
34
+ one_liner?: string | undefined;
35
+ core_conflict?: string | undefined;
36
+ target_reader?: string | undefined;
37
+ platform?: string | undefined;
38
+ created_at?: string | undefined;
39
+ updated_at?: string | undefined;
40
+ }>;
41
+ export type ProjectInfo = z.infer<typeof ProjectInfoSchema>;
42
+ export declare const ProgressSchema: z.ZodObject<{
43
+ current_chapter: z.ZodDefault<z.ZodNumber>;
44
+ total_words: z.ZodDefault<z.ZodNumber>;
45
+ completed_chapters: z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>;
46
+ planned_chapters: z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>;
47
+ reviewed_chapters: z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ current_chapter: number;
50
+ total_words: number;
51
+ completed_chapters: number[];
52
+ planned_chapters: number[];
53
+ reviewed_chapters: number[];
54
+ }, {
55
+ current_chapter?: number | undefined;
56
+ total_words?: number | undefined;
57
+ completed_chapters?: number[] | undefined;
58
+ planned_chapters?: number[] | undefined;
59
+ reviewed_chapters?: number[] | undefined;
60
+ }>;
61
+ export type Progress = z.infer<typeof ProgressSchema>;
62
+ export declare const ProtagonistStateSchema: z.ZodObject<{
63
+ name: z.ZodString;
64
+ realm: z.ZodOptional<z.ZodString>;
65
+ location: z.ZodOptional<z.ZodString>;
66
+ items: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
67
+ relationships: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
68
+ goals: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
69
+ status: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ status: Record<string, unknown>;
72
+ name: string;
73
+ items: string[];
74
+ relationships: Record<string, unknown>;
75
+ goals: string[];
76
+ realm?: string | undefined;
77
+ location?: string | undefined;
78
+ }, {
79
+ name: string;
80
+ status?: Record<string, unknown> | undefined;
81
+ realm?: string | undefined;
82
+ location?: string | undefined;
83
+ items?: string[] | undefined;
84
+ relationships?: Record<string, unknown> | undefined;
85
+ goals?: string[] | undefined;
86
+ }>;
87
+ export type ProtagonistState = z.infer<typeof ProtagonistStateSchema>;
88
+ export declare const HookSchema: z.ZodObject<{
89
+ type: z.ZodString;
90
+ content: z.ZodString;
91
+ strength: z.ZodDefault<z.ZodEnum<["strong", "medium", "weak"]>>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ type: string;
94
+ content: string;
95
+ strength: "strong" | "medium" | "weak";
96
+ }, {
97
+ type: string;
98
+ content: string;
99
+ strength?: "strong" | "medium" | "weak" | undefined;
100
+ }>;
101
+ export type Hook = z.infer<typeof HookSchema>;
102
+ export declare const PatternSchema: z.ZodObject<{
103
+ opening: z.ZodOptional<z.ZodString>;
104
+ hook: z.ZodOptional<z.ZodString>;
105
+ emotion_rhythm: z.ZodOptional<z.ZodString>;
106
+ info_density: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
107
+ }, "strip", z.ZodTypeAny, {
108
+ opening?: string | undefined;
109
+ hook?: string | undefined;
110
+ emotion_rhythm?: string | undefined;
111
+ info_density?: "medium" | "high" | "low" | undefined;
112
+ }, {
113
+ opening?: string | undefined;
114
+ hook?: string | undefined;
115
+ emotion_rhythm?: string | undefined;
116
+ info_density?: "medium" | "high" | "low" | undefined;
117
+ }>;
118
+ export type Pattern = z.infer<typeof PatternSchema>;
119
+ export declare const EndingSchema: z.ZodObject<{
120
+ time: z.ZodOptional<z.ZodString>;
121
+ location: z.ZodOptional<z.ZodString>;
122
+ emotion: z.ZodOptional<z.ZodString>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ location?: string | undefined;
125
+ time?: string | undefined;
126
+ emotion?: string | undefined;
127
+ }, {
128
+ location?: string | undefined;
129
+ time?: string | undefined;
130
+ emotion?: string | undefined;
131
+ }>;
132
+ export type Ending = z.infer<typeof EndingSchema>;
133
+ export declare const ChapterMetaSchema: z.ZodObject<{
134
+ chapter: z.ZodNumber;
135
+ title: z.ZodOptional<z.ZodString>;
136
+ hook: z.ZodOptional<z.ZodObject<{
137
+ type: z.ZodString;
138
+ content: z.ZodString;
139
+ strength: z.ZodDefault<z.ZodEnum<["strong", "medium", "weak"]>>;
140
+ }, "strip", z.ZodTypeAny, {
141
+ type: string;
142
+ content: string;
143
+ strength: "strong" | "medium" | "weak";
144
+ }, {
145
+ type: string;
146
+ content: string;
147
+ strength?: "strong" | "medium" | "weak" | undefined;
148
+ }>>;
149
+ pattern: z.ZodOptional<z.ZodObject<{
150
+ opening: z.ZodOptional<z.ZodString>;
151
+ hook: z.ZodOptional<z.ZodString>;
152
+ emotion_rhythm: z.ZodOptional<z.ZodString>;
153
+ info_density: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
154
+ }, "strip", z.ZodTypeAny, {
155
+ opening?: string | undefined;
156
+ hook?: string | undefined;
157
+ emotion_rhythm?: string | undefined;
158
+ info_density?: "medium" | "high" | "low" | undefined;
159
+ }, {
160
+ opening?: string | undefined;
161
+ hook?: string | undefined;
162
+ emotion_rhythm?: string | undefined;
163
+ info_density?: "medium" | "high" | "low" | undefined;
164
+ }>>;
165
+ ending: z.ZodOptional<z.ZodObject<{
166
+ time: z.ZodOptional<z.ZodString>;
167
+ location: z.ZodOptional<z.ZodString>;
168
+ emotion: z.ZodOptional<z.ZodString>;
169
+ }, "strip", z.ZodTypeAny, {
170
+ location?: string | undefined;
171
+ time?: string | undefined;
172
+ emotion?: string | undefined;
173
+ }, {
174
+ location?: string | undefined;
175
+ time?: string | undefined;
176
+ emotion?: string | undefined;
177
+ }>>;
178
+ word_count: z.ZodOptional<z.ZodNumber>;
179
+ summary: z.ZodOptional<z.ZodString>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ chapter: number;
182
+ title?: string | undefined;
183
+ hook?: {
184
+ type: string;
185
+ content: string;
186
+ strength: "strong" | "medium" | "weak";
187
+ } | undefined;
188
+ pattern?: {
189
+ opening?: string | undefined;
190
+ hook?: string | undefined;
191
+ emotion_rhythm?: string | undefined;
192
+ info_density?: "medium" | "high" | "low" | undefined;
193
+ } | undefined;
194
+ ending?: {
195
+ location?: string | undefined;
196
+ time?: string | undefined;
197
+ emotion?: string | undefined;
198
+ } | undefined;
199
+ word_count?: number | undefined;
200
+ summary?: string | undefined;
201
+ }, {
202
+ chapter: number;
203
+ title?: string | undefined;
204
+ hook?: {
205
+ type: string;
206
+ content: string;
207
+ strength?: "strong" | "medium" | "weak" | undefined;
208
+ } | undefined;
209
+ pattern?: {
210
+ opening?: string | undefined;
211
+ hook?: string | undefined;
212
+ emotion_rhythm?: string | undefined;
213
+ info_density?: "medium" | "high" | "low" | undefined;
214
+ } | undefined;
215
+ ending?: {
216
+ location?: string | undefined;
217
+ time?: string | undefined;
218
+ emotion?: string | undefined;
219
+ } | undefined;
220
+ word_count?: number | undefined;
221
+ summary?: string | undefined;
222
+ }>;
223
+ export type ChapterMeta = z.infer<typeof ChapterMetaSchema>;
224
+ export declare const ForeshadowingSchema: z.ZodObject<{
225
+ id: z.ZodString;
226
+ content: z.ZodString;
227
+ planted_chapter: z.ZodNumber;
228
+ target_chapter: z.ZodOptional<z.ZodNumber>;
229
+ resolved_chapter: z.ZodOptional<z.ZodNumber>;
230
+ status: z.ZodDefault<z.ZodEnum<["active", "resolved", "abandoned"]>>;
231
+ type: z.ZodOptional<z.ZodString>;
232
+ }, "strip", z.ZodTypeAny, {
233
+ status: "active" | "resolved" | "abandoned";
234
+ content: string;
235
+ id: string;
236
+ planted_chapter: number;
237
+ type?: string | undefined;
238
+ target_chapter?: number | undefined;
239
+ resolved_chapter?: number | undefined;
240
+ }, {
241
+ content: string;
242
+ id: string;
243
+ planted_chapter: number;
244
+ type?: string | undefined;
245
+ status?: "active" | "resolved" | "abandoned" | undefined;
246
+ target_chapter?: number | undefined;
247
+ resolved_chapter?: number | undefined;
248
+ }>;
249
+ export type Foreshadowing = z.infer<typeof ForeshadowingSchema>;
250
+ export declare const PlotThreadsSchema: z.ZodObject<{
251
+ foreshadowing: z.ZodDefault<z.ZodArray<z.ZodObject<{
252
+ id: z.ZodString;
253
+ content: z.ZodString;
254
+ planted_chapter: z.ZodNumber;
255
+ target_chapter: z.ZodOptional<z.ZodNumber>;
256
+ resolved_chapter: z.ZodOptional<z.ZodNumber>;
257
+ status: z.ZodDefault<z.ZodEnum<["active", "resolved", "abandoned"]>>;
258
+ type: z.ZodOptional<z.ZodString>;
259
+ }, "strip", z.ZodTypeAny, {
260
+ status: "active" | "resolved" | "abandoned";
261
+ content: string;
262
+ id: string;
263
+ planted_chapter: number;
264
+ type?: string | undefined;
265
+ target_chapter?: number | undefined;
266
+ resolved_chapter?: number | undefined;
267
+ }, {
268
+ content: string;
269
+ id: string;
270
+ planted_chapter: number;
271
+ type?: string | undefined;
272
+ status?: "active" | "resolved" | "abandoned" | undefined;
273
+ target_chapter?: number | undefined;
274
+ resolved_chapter?: number | undefined;
275
+ }>, "many">>;
276
+ active_conflicts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
277
+ unresolved_questions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
278
+ }, "strip", z.ZodTypeAny, {
279
+ foreshadowing: {
280
+ status: "active" | "resolved" | "abandoned";
281
+ content: string;
282
+ id: string;
283
+ planted_chapter: number;
284
+ type?: string | undefined;
285
+ target_chapter?: number | undefined;
286
+ resolved_chapter?: number | undefined;
287
+ }[];
288
+ active_conflicts: string[];
289
+ unresolved_questions: string[];
290
+ }, {
291
+ foreshadowing?: {
292
+ content: string;
293
+ id: string;
294
+ planted_chapter: number;
295
+ type?: string | undefined;
296
+ status?: "active" | "resolved" | "abandoned" | undefined;
297
+ target_chapter?: number | undefined;
298
+ resolved_chapter?: number | undefined;
299
+ }[] | undefined;
300
+ active_conflicts?: string[] | undefined;
301
+ unresolved_questions?: string[] | undefined;
302
+ }>;
303
+ export type PlotThreads = z.infer<typeof PlotThreadsSchema>;
304
+ export declare const StrandTypeSchema: z.ZodEnum<["Quest", "Fire", "Constellation"]>;
305
+ export type StrandType = z.infer<typeof StrandTypeSchema>;
306
+ export declare const StrandEntrySchema: z.ZodObject<{
307
+ chapter: z.ZodNumber;
308
+ type: z.ZodEnum<["Quest", "Fire", "Constellation"]>;
309
+ content: z.ZodOptional<z.ZodString>;
310
+ }, "strip", z.ZodTypeAny, {
311
+ type: "Quest" | "Fire" | "Constellation";
312
+ chapter: number;
313
+ content?: string | undefined;
314
+ }, {
315
+ type: "Quest" | "Fire" | "Constellation";
316
+ chapter: number;
317
+ content?: string | undefined;
318
+ }>;
319
+ export type StrandEntry = z.infer<typeof StrandEntrySchema>;
320
+ export declare const StrandTrackerSchema: z.ZodObject<{
321
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
322
+ chapter: z.ZodNumber;
323
+ type: z.ZodEnum<["Quest", "Fire", "Constellation"]>;
324
+ content: z.ZodOptional<z.ZodString>;
325
+ }, "strip", z.ZodTypeAny, {
326
+ type: "Quest" | "Fire" | "Constellation";
327
+ chapter: number;
328
+ content?: string | undefined;
329
+ }, {
330
+ type: "Quest" | "Fire" | "Constellation";
331
+ chapter: number;
332
+ content?: string | undefined;
333
+ }>, "many">>;
334
+ quest_consecutive: z.ZodDefault<z.ZodNumber>;
335
+ fire_gap: z.ZodDefault<z.ZodNumber>;
336
+ constellation_gap: z.ZodDefault<z.ZodNumber>;
337
+ }, "strip", z.ZodTypeAny, {
338
+ entries: {
339
+ type: "Quest" | "Fire" | "Constellation";
340
+ chapter: number;
341
+ content?: string | undefined;
342
+ }[];
343
+ quest_consecutive: number;
344
+ fire_gap: number;
345
+ constellation_gap: number;
346
+ }, {
347
+ entries?: {
348
+ type: "Quest" | "Fire" | "Constellation";
349
+ chapter: number;
350
+ content?: string | undefined;
351
+ }[] | undefined;
352
+ quest_consecutive?: number | undefined;
353
+ fire_gap?: number | undefined;
354
+ constellation_gap?: number | undefined;
355
+ }>;
356
+ export type StrandTracker = z.infer<typeof StrandTrackerSchema>;
357
+ export declare const ProjectStateSchema: z.ZodObject<{
358
+ project_info: z.ZodObject<{
359
+ title: z.ZodString;
360
+ genre: z.ZodString;
361
+ target_words: z.ZodDefault<z.ZodNumber>;
362
+ target_chapters: z.ZodDefault<z.ZodNumber>;
363
+ one_liner: z.ZodOptional<z.ZodString>;
364
+ core_conflict: z.ZodOptional<z.ZodString>;
365
+ target_reader: z.ZodOptional<z.ZodString>;
366
+ platform: z.ZodOptional<z.ZodString>;
367
+ created_at: z.ZodOptional<z.ZodString>;
368
+ updated_at: z.ZodOptional<z.ZodString>;
369
+ }, "strip", z.ZodTypeAny, {
370
+ title: string;
371
+ genre: string;
372
+ target_words: number;
373
+ target_chapters: number;
374
+ one_liner?: string | undefined;
375
+ core_conflict?: string | undefined;
376
+ target_reader?: string | undefined;
377
+ platform?: string | undefined;
378
+ created_at?: string | undefined;
379
+ updated_at?: string | undefined;
380
+ }, {
381
+ title: string;
382
+ genre: string;
383
+ target_words?: number | undefined;
384
+ target_chapters?: number | undefined;
385
+ one_liner?: string | undefined;
386
+ core_conflict?: string | undefined;
387
+ target_reader?: string | undefined;
388
+ platform?: string | undefined;
389
+ created_at?: string | undefined;
390
+ updated_at?: string | undefined;
391
+ }>;
392
+ progress: z.ZodDefault<z.ZodObject<{
393
+ current_chapter: z.ZodDefault<z.ZodNumber>;
394
+ total_words: z.ZodDefault<z.ZodNumber>;
395
+ completed_chapters: z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>;
396
+ planned_chapters: z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>;
397
+ reviewed_chapters: z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>;
398
+ }, "strip", z.ZodTypeAny, {
399
+ current_chapter: number;
400
+ total_words: number;
401
+ completed_chapters: number[];
402
+ planned_chapters: number[];
403
+ reviewed_chapters: number[];
404
+ }, {
405
+ current_chapter?: number | undefined;
406
+ total_words?: number | undefined;
407
+ completed_chapters?: number[] | undefined;
408
+ planned_chapters?: number[] | undefined;
409
+ reviewed_chapters?: number[] | undefined;
410
+ }>>;
411
+ protagonist_state: z.ZodOptional<z.ZodObject<{
412
+ name: z.ZodString;
413
+ realm: z.ZodOptional<z.ZodString>;
414
+ location: z.ZodOptional<z.ZodString>;
415
+ items: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
416
+ relationships: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
417
+ goals: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
418
+ status: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
419
+ }, "strip", z.ZodTypeAny, {
420
+ status: Record<string, unknown>;
421
+ name: string;
422
+ items: string[];
423
+ relationships: Record<string, unknown>;
424
+ goals: string[];
425
+ realm?: string | undefined;
426
+ location?: string | undefined;
427
+ }, {
428
+ name: string;
429
+ status?: Record<string, unknown> | undefined;
430
+ realm?: string | undefined;
431
+ location?: string | undefined;
432
+ items?: string[] | undefined;
433
+ relationships?: Record<string, unknown> | undefined;
434
+ goals?: string[] | undefined;
435
+ }>>;
436
+ chapter_meta: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
437
+ chapter: z.ZodNumber;
438
+ title: z.ZodOptional<z.ZodString>;
439
+ hook: z.ZodOptional<z.ZodObject<{
440
+ type: z.ZodString;
441
+ content: z.ZodString;
442
+ strength: z.ZodDefault<z.ZodEnum<["strong", "medium", "weak"]>>;
443
+ }, "strip", z.ZodTypeAny, {
444
+ type: string;
445
+ content: string;
446
+ strength: "strong" | "medium" | "weak";
447
+ }, {
448
+ type: string;
449
+ content: string;
450
+ strength?: "strong" | "medium" | "weak" | undefined;
451
+ }>>;
452
+ pattern: z.ZodOptional<z.ZodObject<{
453
+ opening: z.ZodOptional<z.ZodString>;
454
+ hook: z.ZodOptional<z.ZodString>;
455
+ emotion_rhythm: z.ZodOptional<z.ZodString>;
456
+ info_density: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
457
+ }, "strip", z.ZodTypeAny, {
458
+ opening?: string | undefined;
459
+ hook?: string | undefined;
460
+ emotion_rhythm?: string | undefined;
461
+ info_density?: "medium" | "high" | "low" | undefined;
462
+ }, {
463
+ opening?: string | undefined;
464
+ hook?: string | undefined;
465
+ emotion_rhythm?: string | undefined;
466
+ info_density?: "medium" | "high" | "low" | undefined;
467
+ }>>;
468
+ ending: z.ZodOptional<z.ZodObject<{
469
+ time: z.ZodOptional<z.ZodString>;
470
+ location: z.ZodOptional<z.ZodString>;
471
+ emotion: z.ZodOptional<z.ZodString>;
472
+ }, "strip", z.ZodTypeAny, {
473
+ location?: string | undefined;
474
+ time?: string | undefined;
475
+ emotion?: string | undefined;
476
+ }, {
477
+ location?: string | undefined;
478
+ time?: string | undefined;
479
+ emotion?: string | undefined;
480
+ }>>;
481
+ word_count: z.ZodOptional<z.ZodNumber>;
482
+ summary: z.ZodOptional<z.ZodString>;
483
+ }, "strip", z.ZodTypeAny, {
484
+ chapter: number;
485
+ title?: string | undefined;
486
+ hook?: {
487
+ type: string;
488
+ content: string;
489
+ strength: "strong" | "medium" | "weak";
490
+ } | undefined;
491
+ pattern?: {
492
+ opening?: string | undefined;
493
+ hook?: string | undefined;
494
+ emotion_rhythm?: string | undefined;
495
+ info_density?: "medium" | "high" | "low" | undefined;
496
+ } | undefined;
497
+ ending?: {
498
+ location?: string | undefined;
499
+ time?: string | undefined;
500
+ emotion?: string | undefined;
501
+ } | undefined;
502
+ word_count?: number | undefined;
503
+ summary?: string | undefined;
504
+ }, {
505
+ chapter: number;
506
+ title?: string | undefined;
507
+ hook?: {
508
+ type: string;
509
+ content: string;
510
+ strength?: "strong" | "medium" | "weak" | undefined;
511
+ } | undefined;
512
+ pattern?: {
513
+ opening?: string | undefined;
514
+ hook?: string | undefined;
515
+ emotion_rhythm?: string | undefined;
516
+ info_density?: "medium" | "high" | "low" | undefined;
517
+ } | undefined;
518
+ ending?: {
519
+ location?: string | undefined;
520
+ time?: string | undefined;
521
+ emotion?: string | undefined;
522
+ } | undefined;
523
+ word_count?: number | undefined;
524
+ summary?: string | undefined;
525
+ }>>>;
526
+ plot_threads: z.ZodDefault<z.ZodObject<{
527
+ foreshadowing: z.ZodDefault<z.ZodArray<z.ZodObject<{
528
+ id: z.ZodString;
529
+ content: z.ZodString;
530
+ planted_chapter: z.ZodNumber;
531
+ target_chapter: z.ZodOptional<z.ZodNumber>;
532
+ resolved_chapter: z.ZodOptional<z.ZodNumber>;
533
+ status: z.ZodDefault<z.ZodEnum<["active", "resolved", "abandoned"]>>;
534
+ type: z.ZodOptional<z.ZodString>;
535
+ }, "strip", z.ZodTypeAny, {
536
+ status: "active" | "resolved" | "abandoned";
537
+ content: string;
538
+ id: string;
539
+ planted_chapter: number;
540
+ type?: string | undefined;
541
+ target_chapter?: number | undefined;
542
+ resolved_chapter?: number | undefined;
543
+ }, {
544
+ content: string;
545
+ id: string;
546
+ planted_chapter: number;
547
+ type?: string | undefined;
548
+ status?: "active" | "resolved" | "abandoned" | undefined;
549
+ target_chapter?: number | undefined;
550
+ resolved_chapter?: number | undefined;
551
+ }>, "many">>;
552
+ active_conflicts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
553
+ unresolved_questions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
554
+ }, "strip", z.ZodTypeAny, {
555
+ foreshadowing: {
556
+ status: "active" | "resolved" | "abandoned";
557
+ content: string;
558
+ id: string;
559
+ planted_chapter: number;
560
+ type?: string | undefined;
561
+ target_chapter?: number | undefined;
562
+ resolved_chapter?: number | undefined;
563
+ }[];
564
+ active_conflicts: string[];
565
+ unresolved_questions: string[];
566
+ }, {
567
+ foreshadowing?: {
568
+ content: string;
569
+ id: string;
570
+ planted_chapter: number;
571
+ type?: string | undefined;
572
+ status?: "active" | "resolved" | "abandoned" | undefined;
573
+ target_chapter?: number | undefined;
574
+ resolved_chapter?: number | undefined;
575
+ }[] | undefined;
576
+ active_conflicts?: string[] | undefined;
577
+ unresolved_questions?: string[] | undefined;
578
+ }>>;
579
+ strand_tracker: z.ZodDefault<z.ZodObject<{
580
+ entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
581
+ chapter: z.ZodNumber;
582
+ type: z.ZodEnum<["Quest", "Fire", "Constellation"]>;
583
+ content: z.ZodOptional<z.ZodString>;
584
+ }, "strip", z.ZodTypeAny, {
585
+ type: "Quest" | "Fire" | "Constellation";
586
+ chapter: number;
587
+ content?: string | undefined;
588
+ }, {
589
+ type: "Quest" | "Fire" | "Constellation";
590
+ chapter: number;
591
+ content?: string | undefined;
592
+ }>, "many">>;
593
+ quest_consecutive: z.ZodDefault<z.ZodNumber>;
594
+ fire_gap: z.ZodDefault<z.ZodNumber>;
595
+ constellation_gap: z.ZodDefault<z.ZodNumber>;
596
+ }, "strip", z.ZodTypeAny, {
597
+ entries: {
598
+ type: "Quest" | "Fire" | "Constellation";
599
+ chapter: number;
600
+ content?: string | undefined;
601
+ }[];
602
+ quest_consecutive: number;
603
+ fire_gap: number;
604
+ constellation_gap: number;
605
+ }, {
606
+ entries?: {
607
+ type: "Quest" | "Fire" | "Constellation";
608
+ chapter: number;
609
+ content?: string | undefined;
610
+ }[] | undefined;
611
+ quest_consecutive?: number | undefined;
612
+ fire_gap?: number | undefined;
613
+ constellation_gap?: number | undefined;
614
+ }>>;
615
+ disambiguation_warnings: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
616
+ disambiguation_pending: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
617
+ review_history: z.ZodDefault<z.ZodArray<z.ZodUnknown, "many">>;
618
+ entities_v3: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
619
+ alias_index: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
620
+ state_changes: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
621
+ }, "strip", z.ZodTypeAny, {
622
+ project_info: {
623
+ title: string;
624
+ genre: string;
625
+ target_words: number;
626
+ target_chapters: number;
627
+ one_liner?: string | undefined;
628
+ core_conflict?: string | undefined;
629
+ target_reader?: string | undefined;
630
+ platform?: string | undefined;
631
+ created_at?: string | undefined;
632
+ updated_at?: string | undefined;
633
+ };
634
+ progress: {
635
+ current_chapter: number;
636
+ total_words: number;
637
+ completed_chapters: number[];
638
+ planned_chapters: number[];
639
+ reviewed_chapters: number[];
640
+ };
641
+ chapter_meta: Record<string, {
642
+ chapter: number;
643
+ title?: string | undefined;
644
+ hook?: {
645
+ type: string;
646
+ content: string;
647
+ strength: "strong" | "medium" | "weak";
648
+ } | undefined;
649
+ pattern?: {
650
+ opening?: string | undefined;
651
+ hook?: string | undefined;
652
+ emotion_rhythm?: string | undefined;
653
+ info_density?: "medium" | "high" | "low" | undefined;
654
+ } | undefined;
655
+ ending?: {
656
+ location?: string | undefined;
657
+ time?: string | undefined;
658
+ emotion?: string | undefined;
659
+ } | undefined;
660
+ word_count?: number | undefined;
661
+ summary?: string | undefined;
662
+ }>;
663
+ plot_threads: {
664
+ foreshadowing: {
665
+ status: "active" | "resolved" | "abandoned";
666
+ content: string;
667
+ id: string;
668
+ planted_chapter: number;
669
+ type?: string | undefined;
670
+ target_chapter?: number | undefined;
671
+ resolved_chapter?: number | undefined;
672
+ }[];
673
+ active_conflicts: string[];
674
+ unresolved_questions: string[];
675
+ };
676
+ strand_tracker: {
677
+ entries: {
678
+ type: "Quest" | "Fire" | "Constellation";
679
+ chapter: number;
680
+ content?: string | undefined;
681
+ }[];
682
+ quest_consecutive: number;
683
+ fire_gap: number;
684
+ constellation_gap: number;
685
+ };
686
+ disambiguation_warnings: unknown[];
687
+ disambiguation_pending: unknown[];
688
+ review_history: unknown[];
689
+ state_changes?: unknown[] | undefined;
690
+ protagonist_state?: {
691
+ status: Record<string, unknown>;
692
+ name: string;
693
+ items: string[];
694
+ relationships: Record<string, unknown>;
695
+ goals: string[];
696
+ realm?: string | undefined;
697
+ location?: string | undefined;
698
+ } | undefined;
699
+ entities_v3?: Record<string, unknown> | undefined;
700
+ alias_index?: Record<string, string> | undefined;
701
+ }, {
702
+ project_info: {
703
+ title: string;
704
+ genre: string;
705
+ target_words?: number | undefined;
706
+ target_chapters?: number | undefined;
707
+ one_liner?: string | undefined;
708
+ core_conflict?: string | undefined;
709
+ target_reader?: string | undefined;
710
+ platform?: string | undefined;
711
+ created_at?: string | undefined;
712
+ updated_at?: string | undefined;
713
+ };
714
+ state_changes?: unknown[] | undefined;
715
+ progress?: {
716
+ current_chapter?: number | undefined;
717
+ total_words?: number | undefined;
718
+ completed_chapters?: number[] | undefined;
719
+ planned_chapters?: number[] | undefined;
720
+ reviewed_chapters?: number[] | undefined;
721
+ } | undefined;
722
+ protagonist_state?: {
723
+ name: string;
724
+ status?: Record<string, unknown> | undefined;
725
+ realm?: string | undefined;
726
+ location?: string | undefined;
727
+ items?: string[] | undefined;
728
+ relationships?: Record<string, unknown> | undefined;
729
+ goals?: string[] | undefined;
730
+ } | undefined;
731
+ chapter_meta?: Record<string, {
732
+ chapter: number;
733
+ title?: string | undefined;
734
+ hook?: {
735
+ type: string;
736
+ content: string;
737
+ strength?: "strong" | "medium" | "weak" | undefined;
738
+ } | undefined;
739
+ pattern?: {
740
+ opening?: string | undefined;
741
+ hook?: string | undefined;
742
+ emotion_rhythm?: string | undefined;
743
+ info_density?: "medium" | "high" | "low" | undefined;
744
+ } | undefined;
745
+ ending?: {
746
+ location?: string | undefined;
747
+ time?: string | undefined;
748
+ emotion?: string | undefined;
749
+ } | undefined;
750
+ word_count?: number | undefined;
751
+ summary?: string | undefined;
752
+ }> | undefined;
753
+ plot_threads?: {
754
+ foreshadowing?: {
755
+ content: string;
756
+ id: string;
757
+ planted_chapter: number;
758
+ type?: string | undefined;
759
+ status?: "active" | "resolved" | "abandoned" | undefined;
760
+ target_chapter?: number | undefined;
761
+ resolved_chapter?: number | undefined;
762
+ }[] | undefined;
763
+ active_conflicts?: string[] | undefined;
764
+ unresolved_questions?: string[] | undefined;
765
+ } | undefined;
766
+ strand_tracker?: {
767
+ entries?: {
768
+ type: "Quest" | "Fire" | "Constellation";
769
+ chapter: number;
770
+ content?: string | undefined;
771
+ }[] | undefined;
772
+ quest_consecutive?: number | undefined;
773
+ fire_gap?: number | undefined;
774
+ constellation_gap?: number | undefined;
775
+ } | undefined;
776
+ disambiguation_warnings?: unknown[] | undefined;
777
+ disambiguation_pending?: unknown[] | undefined;
778
+ review_history?: unknown[] | undefined;
779
+ entities_v3?: Record<string, unknown> | undefined;
780
+ alias_index?: Record<string, string> | undefined;
781
+ }>;
782
+ export type ProjectState = z.infer<typeof ProjectStateSchema>;
783
+ export declare function validateProjectState(data: unknown): ProjectState;
784
+ export declare function loadProjectState(jsonString: string): ProjectState;
785
+ export declare function saveProjectState(state: ProjectState): string;
786
+ //# sourceMappingURL=state.d.ts.map