narrarium-engine 0.1.8 → 0.1.10

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.
Files changed (144) hide show
  1. package/README.md +409 -27
  2. package/dist/ai/budget.d.ts +18 -2
  3. package/dist/ai/budget.d.ts.map +1 -1
  4. package/dist/ai/budget.js +9 -2
  5. package/dist/ai/budget.js.map +1 -1
  6. package/dist/ai/catalog-fetch.d.ts.map +1 -1
  7. package/dist/ai/catalog-fetch.js +2 -1
  8. package/dist/ai/catalog-fetch.js.map +1 -1
  9. package/dist/ai/fetch-client.d.ts +13 -6
  10. package/dist/ai/fetch-client.d.ts.map +1 -1
  11. package/dist/ai/fetch-client.js +26 -3
  12. package/dist/ai/fetch-client.js.map +1 -1
  13. package/dist/ai/request.d.ts +1 -1
  14. package/dist/ai/request.d.ts.map +1 -1
  15. package/dist/ai/request.js +31 -5
  16. package/dist/ai/request.js.map +1 -1
  17. package/dist/ai/routing.d.ts.map +1 -1
  18. package/dist/ai/routing.js +1 -1
  19. package/dist/ai/routing.js.map +1 -1
  20. package/dist/ai/types.d.ts +29 -2
  21. package/dist/ai/types.d.ts.map +1 -1
  22. package/dist/ai/types.js +5 -2
  23. package/dist/ai/types.js.map +1 -1
  24. package/dist/autopilot/chapter-state.d.ts +19 -0
  25. package/dist/autopilot/chapter-state.d.ts.map +1 -0
  26. package/dist/autopilot/chapter-state.js +31 -0
  27. package/dist/autopilot/chapter-state.js.map +1 -0
  28. package/dist/autopilot/errors.d.ts +2 -1
  29. package/dist/autopilot/errors.d.ts.map +1 -1
  30. package/dist/autopilot/errors.js +17 -1
  31. package/dist/autopilot/errors.js.map +1 -1
  32. package/dist/autopilot/estimate-math.d.ts +19 -0
  33. package/dist/autopilot/estimate-math.d.ts.map +1 -0
  34. package/dist/autopilot/estimate-math.js +74 -0
  35. package/dist/autopilot/estimate-math.js.map +1 -0
  36. package/dist/autopilot/estimate-texts.d.ts +40 -0
  37. package/dist/autopilot/estimate-texts.d.ts.map +1 -0
  38. package/dist/autopilot/estimate-texts.js +130 -0
  39. package/dist/autopilot/estimate-texts.js.map +1 -0
  40. package/dist/autopilot/estimate.d.ts +303 -0
  41. package/dist/autopilot/estimate.d.ts.map +1 -0
  42. package/dist/autopilot/estimate.js +887 -0
  43. package/dist/autopilot/estimate.js.map +1 -0
  44. package/dist/autopilot/frozen.d.ts +166 -0
  45. package/dist/autopilot/frozen.d.ts.map +1 -0
  46. package/dist/autopilot/frozen.js +483 -0
  47. package/dist/autopilot/frozen.js.map +1 -0
  48. package/dist/autopilot/outline-change.d.ts +69 -0
  49. package/dist/autopilot/outline-change.d.ts.map +1 -0
  50. package/dist/autopilot/outline-change.js +42 -0
  51. package/dist/autopilot/outline-change.js.map +1 -0
  52. package/dist/autopilot/outline-check.d.ts +40 -0
  53. package/dist/autopilot/outline-check.d.ts.map +1 -0
  54. package/dist/autopilot/outline-check.js +84 -0
  55. package/dist/autopilot/outline-check.js.map +1 -0
  56. package/dist/autopilot/outline-compose.d.ts +203 -0
  57. package/dist/autopilot/outline-compose.d.ts.map +1 -0
  58. package/dist/autopilot/outline-compose.js +492 -0
  59. package/dist/autopilot/outline-compose.js.map +1 -0
  60. package/dist/autopilot/planner.d.ts +29 -1
  61. package/dist/autopilot/planner.d.ts.map +1 -1
  62. package/dist/autopilot/planner.js +78 -8
  63. package/dist/autopilot/planner.js.map +1 -1
  64. package/dist/autopilot/presets.d.ts +36 -0
  65. package/dist/autopilot/presets.d.ts.map +1 -0
  66. package/dist/autopilot/presets.js +54 -0
  67. package/dist/autopilot/presets.js.map +1 -0
  68. package/dist/autopilot/profile-check.d.ts +7 -4
  69. package/dist/autopilot/profile-check.d.ts.map +1 -1
  70. package/dist/autopilot/profile-check.js +9 -6
  71. package/dist/autopilot/profile-check.js.map +1 -1
  72. package/dist/autopilot/runner.d.ts +61 -7
  73. package/dist/autopilot/runner.d.ts.map +1 -1
  74. package/dist/autopilot/runner.js +313 -32
  75. package/dist/autopilot/runner.js.map +1 -1
  76. package/dist/autopilot/session.d.ts +50 -7
  77. package/dist/autopilot/session.d.ts.map +1 -1
  78. package/dist/autopilot/session.js +225 -10
  79. package/dist/autopilot/session.js.map +1 -1
  80. package/dist/autopilot/speed.d.ts +30 -0
  81. package/dist/autopilot/speed.d.ts.map +1 -0
  82. package/dist/autopilot/speed.js +71 -0
  83. package/dist/autopilot/speed.js.map +1 -0
  84. package/dist/autopilot/state.d.ts +21 -2
  85. package/dist/autopilot/state.d.ts.map +1 -1
  86. package/dist/autopilot/state.js +215 -3
  87. package/dist/autopilot/state.js.map +1 -1
  88. package/dist/autopilot/tasks.d.ts +14 -2
  89. package/dist/autopilot/tasks.d.ts.map +1 -1
  90. package/dist/autopilot/tasks.js +478 -34
  91. package/dist/autopilot/tasks.js.map +1 -1
  92. package/dist/autopilot/types.d.ts +238 -14
  93. package/dist/autopilot/types.d.ts.map +1 -1
  94. package/dist/autopilot/types.js +18 -2
  95. package/dist/autopilot/types.js.map +1 -1
  96. package/dist/book/context.d.ts +3 -0
  97. package/dist/book/context.d.ts.map +1 -1
  98. package/dist/book/context.js +7 -1
  99. package/dist/book/context.js.map +1 -1
  100. package/dist/book/freeze.d.ts +115 -0
  101. package/dist/book/freeze.d.ts.map +1 -0
  102. package/dist/book/freeze.js +286 -0
  103. package/dist/book/freeze.js.map +1 -0
  104. package/dist/book/outline.d.ts +245 -0
  105. package/dist/book/outline.d.ts.map +1 -0
  106. package/dist/book/outline.js +488 -0
  107. package/dist/book/outline.js.map +1 -0
  108. package/dist/book/paths.d.ts +18 -0
  109. package/dist/book/paths.d.ts.map +1 -1
  110. package/dist/book/paths.js +25 -0
  111. package/dist/book/paths.js.map +1 -1
  112. package/dist/book/snapshot.d.ts +25 -1
  113. package/dist/book/snapshot.d.ts.map +1 -1
  114. package/dist/book/snapshot.js +24 -4
  115. package/dist/book/snapshot.js.map +1 -1
  116. package/dist/director/opinion.d.ts +6 -0
  117. package/dist/director/opinion.d.ts.map +1 -1
  118. package/dist/director/opinion.js +4 -1
  119. package/dist/director/opinion.js.map +1 -1
  120. package/dist/index.d.ts +10 -0
  121. package/dist/index.d.ts.map +1 -1
  122. package/dist/index.js +11 -0
  123. package/dist/index.js.map +1 -1
  124. package/dist/profiles/evaluation-style.d.ts +44 -0
  125. package/dist/profiles/evaluation-style.d.ts.map +1 -0
  126. package/dist/profiles/evaluation-style.js +152 -0
  127. package/dist/profiles/evaluation-style.js.map +1 -0
  128. package/dist/server/client.d.ts +92 -7
  129. package/dist/server/client.d.ts.map +1 -1
  130. package/dist/server/client.js +138 -11
  131. package/dist/server/client.js.map +1 -1
  132. package/dist/server/protocol.d.ts +226 -2
  133. package/dist/server/protocol.d.ts.map +1 -1
  134. package/dist/server/protocol.js +69 -0
  135. package/dist/server/protocol.js.map +1 -1
  136. package/dist/util/text.d.ts +6 -0
  137. package/dist/util/text.d.ts.map +1 -1
  138. package/dist/util/text.js +21 -0
  139. package/dist/util/text.js.map +1 -1
  140. package/dist/version.d.ts +1 -1
  141. package/dist/version.d.ts.map +1 -1
  142. package/dist/version.js +1 -1
  143. package/dist/version.js.map +1 -1
  144. package/package.json +1 -1
@@ -1,14 +1,20 @@
1
1
  import type { AiTimeoutPhase, AiUsage } from "../ai/types.js";
2
+ import type { ChapterFreezeAuthor, FrozenChapterChanges } from "../book/freeze.js";
2
3
  /** Lifecycle of the autopilot of one book. */
3
4
  export type AutopilotStatus = "idle" | "running" | "paused" | "waiting-author" | "error" | "completed";
4
5
  /** Macro stage shown in the UI (Concept → Plan → Writing → Review → Completed). */
5
6
  export type AutopilotPhase = "concept" | "plan" | "write" | "review" | "final" | "completed";
6
7
  export declare const AUTOPILOT_PHASES: AutopilotPhase[];
7
- export type AutopilotTaskKind = "concept" | "summarize-imported" | "plan" | "plan-reader" | "plan-review" | "scenes" | "write" | "reader" | "readers-summary" | "specialists" | "director-review" | "repair" | "consolidate" | "impact" | "revise" | "final";
8
+ export type AutopilotTaskKind = "concept" | "summarize-imported" | "plan" | "plan-reader" | "plan-review" | "replan" | "scenes" | "write" | "reader" | "readers-summary" | "specialists" | "director-review" | "repair" | "consolidate" | "impact" | "revise" | "final"
9
+ /** Freezing, without the model: the chapters an older engine approved (once), and the changes the author marked as reviewed. */
10
+ | "freeze";
8
11
  export interface AutopilotBrief {
9
12
  /** The idea, premise or pitch. One sentence is enough. */
10
13
  idea: string;
11
- /** Optional chapter-by-chapter synopsis: binding when present. */
14
+ /**
15
+ * Optional chapter-by-chapter synopsis: binding when present. The outline (`outline/`) takes its place when the author wrote one:
16
+ * the synopsis then still applies where the outline says nothing.
17
+ */
12
18
  synopsis: string;
13
19
  targetChapters: number;
14
20
  scenesPerChapter: number;
@@ -16,6 +22,60 @@ export interface AutopilotBrief {
16
22
  genre: string;
17
23
  audience: string;
18
24
  }
25
+ /**
26
+ * What the autopilot does when the author changed a chapter that is frozen (or the outline entry of a chapter already written): `ask`
27
+ * (the default) stops and asks, every time; `auto` reviews and updates the book from the change without asking, and says so; `notify`
28
+ * only says it, once for every change.
29
+ */
30
+ export type FrozenEditsMode = "ask" | "auto" | "notify";
31
+ export declare const FROZEN_EDITS_MODES: readonly FrozenEditsMode[];
32
+ /** What changed that the author decides about: the text of a frozen chapter, or the outline entry of a chapter already written. */
33
+ export type FrozenChangeKind = "frozen" | "outline";
34
+ /**
35
+ * What can be done with a change. Of a frozen chapter: `review-and-update` (the director reviews the chapter, then the later chapters
36
+ * are checked and rewritten where the change requires it), `review-only` (only the director's review of the chapter), `mark-reviewed`
37
+ * (freeze it again as it is). Of the outline entry of a written chapter: `rewrite-to-outline` (rewrite the chapter to follow the new entry,
38
+ * then check the later chapters), `keep-text` (the plan follows the new entry, the text stays), `mark-reviewed` (the same as `keep-text`).
39
+ */
40
+ export type FrozenAction = "review-and-update" | "review-only" | "mark-reviewed" | "rewrite-to-outline" | "keep-text";
41
+ export declare const FROZEN_ACTIONS: readonly FrozenAction[];
42
+ /** The actions of each kind of change, in the order the question offers them. */
43
+ export declare const FROZEN_CHANGE_ACTIONS: Readonly<Record<FrozenChangeKind, readonly FrozenAction[]>>;
44
+ /** What the autopilot knew of a chapter: before a change (when it was frozen) and after it (its new closing). */
45
+ export interface FrozenChapterView {
46
+ title: string;
47
+ summary: string;
48
+ keyEvents: string[];
49
+ /** The story so far as it was saved when the chapter closed (the plan keeps it only for the newest chapters). */
50
+ storySoFar?: string;
51
+ }
52
+ /**
53
+ * A decision about a change that waits to be carried out, or is being carried out: the author's (an answer, `resolveFrozenChange`) or the
54
+ * autopilot's (`frozenEdits: "auto"`). The author's part of the state, like the interventions: saved at once, also while a run goes on.
55
+ */
56
+ export interface PendingFrozenReview {
57
+ id: string;
58
+ kind: FrozenChangeKind;
59
+ /** The chapter. */
60
+ number: number;
61
+ action: FrozenAction;
62
+ /** The change it is about: `FrozenChapterChange.fingerprint`, or the digest of the new outline entry. */
63
+ fingerprint: string;
64
+ /** When it was decided. */
65
+ at: string;
66
+ /** The author's own words, for the director. */
67
+ note?: string;
68
+ /** Decided by the autopilot (`frozenEdits: "auto"`): the chapters the author wrote are never rewritten for it. */
69
+ auto?: boolean;
70
+ /** The work began: since when, in which phase (`review` of the changed chapter, or its `rewrite` to follow the outline), and the chapter as it was before. */
71
+ started?: {
72
+ at: string;
73
+ phase: "review" | "rewrite";
74
+ before: FrozenChapterView;
75
+ /** For a `rewrite`: whether its revision rewrote any scene (a rewrite that changed nothing has no impact on the later chapters). */
76
+ rewritten?: boolean;
77
+ };
78
+ }
19
79
  /** Where the book is published to GitHub: after every committed step (and again when a chapter is closed), after every chapter that is closed, or never. */
20
80
  export type AutopilotPublishMode = "off" | "chapter" | "step";
21
81
  export declare const AUTOPILOT_PUBLISH_MODES: readonly AutopilotPublishMode[];
@@ -52,16 +112,52 @@ export interface AutopilotOptions {
52
112
  * says nothing publishes after every step when it is a server, and as `syncAfterChapter` says when it is a browser.
53
113
  */
54
114
  publishEvery?: AutopilotPublishMode;
115
+ /**
116
+ * After every plan (and every revision of it) the autopilot writes in the outline (`outline/`) the chapters that have no entry
117
+ * yet, and the description of the book when it has none, as its own (`origin: autopilot`), so that the author can correct them.
118
+ * It never touches an entry of the author. On unless the author turns it off; saved with the other options.
119
+ */
120
+ fillOutline?: boolean;
121
+ /**
122
+ * What to do when the author changes a frozen chapter, or the outline entry of a chapter already written (`FrozenEditsMode`): `ask`
123
+ * unless the author chose otherwise. Saved with the other options, and it can change while a run goes on.
124
+ */
125
+ frozenEdits?: FrozenEditsMode;
126
+ /**
127
+ * «Retry later»: when a step keeps failing with a transient provider failure after the quick retries, wait `everyMinutes` and try it
128
+ * again with a new group of quick retries, up to `cycles` times (see `AutopilotLongRetry`). Absent: off, the default (also for the books
129
+ * of older engines). Saved with the other options, and it can change while a run goes on, also while the run waits.
130
+ */
131
+ longRetry?: AutopilotLongRetry;
55
132
  }
56
- /** The options that can change while a run goes on: the run reads them again at the end of every step and of every chapter. */
57
- export declare const LIVE_AUTOPILOT_OPTIONS: readonly ["publishEvery", "pauseAfterEachChapter"];
58
- /** What the author can change while a run goes on. `publishEvery: null` takes the choice back, so that the host decides again. */
133
+ /** The longest wait of «Retry later», in minutes (a week), and the most cycles that are not "unlimited". */
134
+ export declare const LONG_RETRY_MAX_MINUTES = 10080;
135
+ export declare const LONG_RETRY_MAX_CYCLES = 1000;
136
+ /**
137
+ * «Retry later» (`options.longRetry`). After the quick retries of a step that failed with a transient provider failure (rate limit, overload,
138
+ * a server error, the network, an empty or broken reply) the run waits `everyMinutes` (a whole number from 1 to `LONG_RETRY_MAX_MINUTES`) and
139
+ * tries the step again, as the book is then, with all its quick retries; `cycles` is how many times (a whole number from 1 to
140
+ * `LONG_RETRY_MAX_CYCLES`), or `"unlimited"`, said in words: a policy without it is no policy. The cycles start from zero again after
141
+ * every step that works.
142
+ */
143
+ export interface AutopilotLongRetry {
144
+ everyMinutes: number;
145
+ cycles: number | "unlimited";
146
+ }
147
+ /** The options that can change while a run goes on: the run reads them again at the end of every step and of every chapter (and `longRetry` when a step has failed). */
148
+ export declare const LIVE_AUTOPILOT_OPTIONS: readonly ["publishEvery", "pauseAfterEachChapter", "frozenEdits", "longRetry"];
149
+ /**
150
+ * What the author can change while a run goes on. `publishEvery: null` takes the choice back, so that the host decides again; `longRetry: null`
151
+ * turns «Retry later» off (a run that is waiting for it stops, with the failure it was waiting to try again).
152
+ */
59
153
  export interface AutopilotLiveOptions {
60
154
  publishEvery?: AutopilotPublishMode | null;
61
155
  pauseAfterEachChapter?: boolean;
156
+ frozenEdits?: FrozenEditsMode;
157
+ longRetry?: AutopilotLongRetry | null;
62
158
  }
63
159
  /** What `AutopilotSession.updateOptions` takes: the settings above at any time, and any other option when no run is active. */
64
- export type AutopilotOptionsUpdate = Partial<Omit<AutopilotOptions, "publishEvery">> & AutopilotLiveOptions;
160
+ export type AutopilotOptionsUpdate = Partial<Omit<AutopilotOptions, "publishEvery" | "longRetry">> & AutopilotLiveOptions;
65
161
  export type SceneStatus = "planned" | "written" | "reviewed";
66
162
  export type ChapterStatus = "planned" | "writing" | "review" | "done";
67
163
  export interface PlannedScene {
@@ -107,6 +203,17 @@ export interface PlannedChapter {
107
203
  * rewritten adds the rounds of its new review; the oldest leave when there are too many. Absent for a chapter that was never reviewed.
108
204
  */
109
205
  rounds?: ChapterRound[];
206
+ /**
207
+ * The ghostwriter of the chapter, from its entry in the outline (the slug of `ghostwriters/<slug>.md`). Written in the chapter's
208
+ * `chapter.md` when the folder is made, if it is not the book's: the chain scene → chapter → book then picks it as ever. Absent:
209
+ * the book's (an outline that names one that does not exist is said, and the book's writes).
210
+ */
211
+ ghostwriter?: string;
212
+ /**
213
+ * The digest of the outline entry the chapter comes from (`outlineEntryDigest`), as it was when the plan followed it (or wrote it).
214
+ * When the entry no longer matches it, the author changed it: a chapter not written yet is planned again before its scenes.
215
+ */
216
+ outlineDigest?: string;
110
217
  }
111
218
  /**
112
219
  * One round of review that closed, as the director judged it. Every field is optional: a round whose readers did not read has no
@@ -160,6 +267,11 @@ export interface AutopilotPlan {
160
267
  skippedReaders?: string[];
161
268
  /** Approved plan waiting for the author because of `pauseAfterPlan` or the director's autonomy. */
162
269
  awaitingAuthor: boolean;
270
+ /**
271
+ * Chapters taken out of the plan, before they were written, because the author deleted their entry of the outline. The next
272
+ * chapters keep their numbers, and these count among the chapters of the book, so that it is not extended to replace them.
273
+ */
274
+ removedChapters?: number[];
163
275
  }
164
276
  export interface ReviewFinding {
165
277
  id: string;
@@ -211,6 +323,11 @@ export interface ChapterReview {
211
323
  accepted: number;
212
324
  rejected: number;
213
325
  }>;
326
+ /**
327
+ * The review of a change the author made to a frozen chapter: one round of the director (and of the specialists), whose fixes are
328
+ * advice for the author and are never applied (the author's text stays as it is); then the chapter is closed and frozen again.
329
+ */
330
+ authorEdit?: boolean;
214
331
  }
215
332
  export type InterventionScope = "next_step" | "from_now" | "rewrite";
216
333
  export interface AuthorIntervention {
@@ -224,13 +341,38 @@ export interface AuthorIntervention {
224
341
  appliedAt?: string;
225
342
  appliedBy?: string;
226
343
  }
227
- export type DirectorQuestionKind = "plan-approval" | "chapter-approval" | "round-limit" | "director";
344
+ export type DirectorQuestionKind = "plan-approval" | "chapter-approval" | "round-limit" | "director" | "frozen-change" | "outline-change";
345
+ /** One of the choices of a question: `id` is what an answer names (`QuestionAnswer.choice`, or its `answer`), `label` what the author reads. */
346
+ export interface QuestionChoice {
347
+ id: string;
348
+ label: string;
349
+ }
350
+ /** What a question about a change is about (`frozen-change`: a frozen chapter's text; `outline-change`: the outline entry of a written chapter). */
351
+ export interface FrozenQuestionContext {
352
+ kind: FrozenChangeKind;
353
+ number: number;
354
+ slug: string;
355
+ /** The change asked about: an answer is about this one. */
356
+ fingerprint: string;
357
+ title?: string;
358
+ /** For a frozen chapter: who froze it and when, and what changed since. */
359
+ by?: ChapterFreezeAuthor;
360
+ frozenAt?: string;
361
+ changed?: FrozenChapterChanges;
362
+ /** The other chapters whose change waits for the author, after this one (asked one at a time, in order). */
363
+ others?: number[];
364
+ }
228
365
  export interface DirectorQuestion {
229
366
  id: string;
230
367
  kind: DirectorQuestionKind;
231
368
  question: string;
232
369
  context: string;
370
+ /** What the author can answer, as text. For a question with `choices`, their labels in the same order. */
233
371
  options: string[];
372
+ /** Typed choices: an answer names one by its `id` (or its label). Absent from a question of free text. */
373
+ choices?: QuestionChoice[];
374
+ /** What a `frozen-change` or `outline-change` question is about. */
375
+ frozen?: FrozenQuestionContext;
234
376
  chapterNumber?: number;
235
377
  askedAt: string;
236
378
  }
@@ -247,6 +389,22 @@ export interface RevisionRequest {
247
389
  cursor: number;
248
390
  /** Chapters already rewritten by a revision this one replaced: they are reviewed again too. */
249
391
  revisedChapters?: number[];
392
+ /** Only the scenes of the chapters after this one may be rewritten: the impact of a change of this chapter on the later ones. */
393
+ afterChapter?: number;
394
+ /** Only the scenes of this chapter may be rewritten: a written chapter rewritten to follow its new outline entry. */
395
+ onlyChapter?: number;
396
+ /** What the revision comes from when it is not an instruction of the author: a change of a frozen chapter, or of the outline of a written one. */
397
+ source?: RevisionSource;
398
+ }
399
+ /** The change a revision comes from: the chapter, what the autopilot knew of it BEFORE and what it knows AFTER, and the author's words. */
400
+ export interface RevisionSource {
401
+ kind: FrozenChangeKind;
402
+ chapterNumber: number;
403
+ note?: string;
404
+ /** Decided by the autopilot (`frozenEdits: "auto"`): the chapters the author wrote are left alone. */
405
+ auto?: boolean;
406
+ before?: FrozenChapterView;
407
+ after?: FrozenChapterView;
250
408
  }
251
409
  export interface AutopilotRunnerInfo {
252
410
  host: "browser" | "server";
@@ -280,6 +438,11 @@ export interface AutopilotStats {
280
438
  * state whose count began before it was written (a book started with an engine that did not say), and the engine does not make one up.
281
439
  */
282
440
  workedMsSince?: string;
441
+ /**
442
+ * `true` when the count began on a book that had already saved steps (an engine that did not count wrote them): `workedMs` is then the time of
443
+ * the steps since `workedMsSince`, not of the whole book. Absent when the count was born with the book, and from the states of older engines.
444
+ */
445
+ workedMsPartial?: true;
283
446
  }
284
447
  /** The director's judgement of the whole book, as data: what the final step saved. */
285
448
  export interface AutopilotFinalReview {
@@ -325,7 +488,19 @@ export interface AutopilotErrorDetail {
325
488
  * timeout; `idle`: it went silent for the idle timeout while it answered; `total`: the call took longer than any call may (four hours).
326
489
  */
327
490
  timeoutPhase?: AiTimeoutPhase;
491
+ /**
492
+ * For a conflict with GitHub (kind `conflict`, code `github_conflict` of the personal server): how many files changed both on the server and on
493
+ * GitHub, so that the author has to choose a version of each (`GET …/github-conflicts` lists them). Absent for any other failure.
494
+ */
495
+ githubConflicts?: number;
328
496
  }
497
+ /**
498
+ * The codes that say, in the state, why a run ended with an error: the `code` of its `run-ended` event, when that code is one of these. «Retry later»
499
+ * stopped the run after its last cycle (`longRetryExhausted`), or was turned off while the run waited for it (`longRetryOff`). A closed list: a code
500
+ * that is not in it is dropped when a file is read.
501
+ */
502
+ export declare const LAST_ERROR_CODES: readonly ["longRetryExhausted", "longRetryOff"];
503
+ export type AutopilotLastErrorCode = (typeof LAST_ERROR_CODES)[number];
329
504
  /** A failure the run could not get past: what it said, when, in which step, and what kind it was. */
330
505
  export interface AutopilotLastError {
331
506
  message: string;
@@ -335,6 +510,11 @@ export interface AutopilotLastError {
335
510
  activityId?: string;
336
511
  errorKind?: AutopilotErrorKind;
337
512
  errorDetail?: AutopilotErrorDetail;
513
+ /**
514
+ * Why the run ended, when «Retry later» did it (see `LAST_ERROR_CODES`): what the `run-ended` event said, kept in the state so that a page opened after the
515
+ * run, or another device, can say it too. Absent for any other failure, and for an error saved by an engine that did not say it.
516
+ */
517
+ code?: AutopilotLastErrorCode;
338
518
  }
339
519
  /** The last error as the summary says it: the state's own fields, and the same kind and detail under their short names. */
340
520
  export interface AutopilotLastErrorSummary extends AutopilotLastError {
@@ -345,8 +525,17 @@ export interface AutopilotLastErrorSummary extends AutopilotLastError {
345
525
  export interface AutopilotRetryInfo {
346
526
  /** ISO time of the next attempt. */
347
527
  at: string;
528
+ /** The quick retries: the one about to happen (or, in a wait of «Retry later», the last one made) and how many there are. */
348
529
  attempt: number;
349
530
  retries: number;
531
+ /**
532
+ * Only in a wait of «Retry later» (`options.longRetry`): which cycle it is, from 1, and how many there are (`null`: no limit). When it is over
533
+ * the step is tried again with all its quick retries.
534
+ */
535
+ longTerm?: {
536
+ cycle: number;
537
+ cycles: number | null;
538
+ };
350
539
  }
351
540
  export interface AutopilotState {
352
541
  schemaVersion: 1;
@@ -354,11 +543,12 @@ export interface AutopilotState {
354
543
  phase: AutopilotPhase;
355
544
  brief: AutopilotBrief;
356
545
  options: AutopilotOptions;
357
- /** `done` once the book has a usable foundation; `generated` when the autopilot wrote it. */
546
+ /** `done` once the book has a usable foundation; `generated` when the autopilot wrote it. `logline`: the one-sentence pitch of the concept it wrote (it describes the book in the outline). */
358
547
  concept: {
359
548
  done: boolean;
360
549
  generated: boolean;
361
550
  secrets: ConceptSecret[];
551
+ logline?: string;
362
552
  };
363
553
  plan: AutopilotPlan | null;
364
554
  review: ChapterReview | null;
@@ -376,6 +566,18 @@ export interface AutopilotState {
376
566
  /** Guidance the director carries forward to the next chapters. */
377
567
  directorNotes: string[];
378
568
  question: DirectorQuestion | null;
569
+ /**
570
+ * Decisions about changes of frozen chapters (and of the outline of written ones) that wait to be carried out, or are being carried out:
571
+ * the next run does them before it goes on with the plan (a run in progress, at its next step). Absent when there is none.
572
+ */
573
+ pendingReviews?: PendingFrozenReview[];
574
+ /**
575
+ * Since when the state knows frozen chapters: a new state, from its start. A state saved by an older engine has none: its first run
576
+ * freezes the chapters the autopilot approved (never the author's), once, and sets it.
577
+ */
578
+ frozenSince?: string;
579
+ /** The changes already said with `frozenEdits: "notify"` (their fingerprints), so that each is said once. The newest are kept. */
580
+ frozenSeen?: string[];
379
581
  runner: AutopilotRunnerInfo | null;
380
582
  stats: AutopilotStats;
381
583
  /** Short human message about the current status ("Plan ready for review"). */
@@ -421,19 +623,25 @@ export interface AutopilotActivity {
421
623
  }
422
624
  export type InsightTone = "info" | "ok" | "warning" | "critical";
423
625
  /** Stable codes of the runner's own messages, so clients can show them in their language. */
424
- export type AutopilotMessageCode = "conflictRetry" | "failureRetry" | "takenOver" | "interventionQueued" | "interventionInterrupt" | "reset" | "unexpectedStop" | "syncFailed" | "publishFailed" | "finalStateFailed" | "budgetNotApplicable" | "profileProblems" | "chapterPause" | "stepLimit" | "chapterLimit";
626
+ export type AutopilotMessageCode = "conflictRetry" | "failureRetry" | "takenOver" | "interventionQueued" | "interventionInterrupt" | "reset" | "unexpectedStop" | "syncFailed" | "publishFailed" | "finalStateFailed" | "budgetNotApplicable" | "profileProblems" | "chapterPause" | "stepLimit" | "chapterLimit" | "outlineGhostwriter" | "outlineChanged" | "outlineRemoved" | "outlineWrittenChanged" | "outlineChangedWhileWriting" | "outlineRemovedWritten" | "outlineWarnings" | "outlineWrittenAuto" | "frozenMigrated" | "frozenChanged" | "frozenAuto" | "frozenInvalid" | "frozenReviewed" | "frozenCleared" | "longRetryWait" | "longRetryExhausted" | "longRetryOff" | "retrySkipped";
425
627
  /**
426
628
  * Live events: everything the autopilot does, as it happens. `run-ended` carries a `code` when the run ended for a
427
629
  * reason a client can translate (`takenOver`: another runner owns the book now, so this run stopped without saving;
428
630
  * `chapterPause`: the author asked to pause at the end of the chapter and the chapter is closed; `stepLimit` and
429
- * `chapterLimit`: the steps or the chapters the run was limited to are done).
631
+ * `chapterLimit`: the steps or the chapters the run was limited to are done; `longRetryExhausted`: the step failed again after
632
+ * every cycle of «Retry later»; `longRetryOff`: «Retry later» was turned off while the run waited for it).
430
633
  * A `failureRetry` insight carries `attempt` (the retry about to happen), `retries` (how many this kind of failure
431
634
  * allows) and `waitMs` (how long the runner waits first); while it waits, the `state` events carry the same in `summary.retry`
432
- * (with the time of the next attempt), and one more `state` event says that nothing waits any more.
635
+ * (with the time of the next attempt), and one more `state` event says that nothing waits any more. A `longRetryWait` insight (a wait of
636
+ * «Retry later») carries `cycle` (from 1), `cycles` (`null`: no limit) and `waitMs`, and `summary.retry.longTerm` says the same while it
637
+ * waits; `longRetryExhausted` carries the last `cycle` and `cycles`. A `retrySkipped` insight («Retry now» ended a wait) carries the `waitMs`
638
+ * that was left, and is followed at once by a `state` event without `retry`.
433
639
  * `task-progress` says that the model of the running step is answering. A step that writes prose says it with its text so far (`preview`,
434
640
  * the tail of it, and the `characters` so far, at most about three times a second); a step that answers with a structured value says it with
435
641
  * numbers only (`bytes` of the reply that arrived, `characters` of its text or arguments, `preview` empty), at most once a second. It is never saved
436
642
  * and never replayed to a client that connects later; `snapshot().live` carries the last one.
643
+ * The insights about the outline carry the chapter they are about (`chapterNumber`) and, for a ghostwriter the outline names that does
644
+ * not exist, its slug (`ghostwriter`), so that a client can say them in its language.
437
645
  */
438
646
  export type AutopilotEventBody = {
439
647
  type: "run-started";
@@ -467,6 +675,10 @@ export type AutopilotEventBody = {
467
675
  attempt?: number;
468
676
  retries?: number;
469
677
  waitMs?: number;
678
+ cycle?: number;
679
+ cycles?: number | null;
680
+ chapterNumber?: number;
681
+ ghostwriter?: string;
470
682
  } | {
471
683
  type: "state";
472
684
  state: AutopilotStateSummary;
@@ -534,10 +746,17 @@ export interface AutopilotStateSummary {
534
746
  limits?: AutopilotLimitsSummary | null;
535
747
  /** Derived, not saved: where the book is published now (`effectivePublish` of the options and of the host's default). */
536
748
  publish?: AutopilotPublishMode;
749
+ /**
750
+ * Not saved, and absent when no change waits (and until a live session looked): how many chapters have a change that waits for the
751
+ * author's decision (a frozen chapter whose text changed, or a written chapter whose outline entry changed), as the run found it before its
752
+ * last step, or as the last `frozenStatus()` did. A change that has a decision recorded (`state.pendingReviews`) is not counted.
753
+ */
754
+ frozenChanges?: number;
537
755
  /**
538
756
  * Not saved, and absent when nothing waits: while the run waits to try a failed step again, when the next attempt is and which retry it
539
757
  * is, so that a client can count down. Every change of it is a `state` event: it appears when the wait begins and goes when the attempt
540
- * starts (or the run ends). Absent from a summary made from the state file alone.
758
+ * starts (or the run ends, or «Retry now» ends the wait). In a wait of «Retry later» it has `longTerm` (the cycle, and how many). Absent
759
+ * from a summary made from the state file alone.
541
760
  */
542
761
  retry?: AutopilotRetryInfo;
543
762
  }
@@ -577,8 +796,10 @@ export interface InterventionInput {
577
796
  }
578
797
  export interface QuestionAnswer {
579
798
  questionId: string;
580
- /** One of the proposed options, or free text. */
799
+ /** One of the proposed options (for a question with choices, the `id` or the label of one), or free text. */
581
800
  answer: string;
801
+ /** The `id` of one of the question's `choices`: it wins over `answer`. A client of an older server sends the id as `answer`. */
802
+ choice?: string;
582
803
  /** Accept the work as it is and continue. */
583
804
  accept?: boolean;
584
805
  /** Keep the answer as a permanent rule instead of a note used once. Never the default. */
@@ -586,7 +807,10 @@ export interface QuestionAnswer {
586
807
  }
587
808
  export interface StartOptions {
588
809
  brief?: Partial<AutopilotBrief>;
589
- options?: Partial<AutopilotOptions>;
810
+ /** `longRetry: null` turns «Retry later» off, as the engine has always read it (the policy the book had is taken back: `normalizeOptions`). */
811
+ options?: Partial<Omit<AutopilotOptions, "longRetry">> & {
812
+ longRetry?: AutopilotLongRetry | null;
813
+ };
590
814
  /** Limits of this run only: they are not saved. See `AutopilotRunLimits`. */
591
815
  limits?: AutopilotRunLimits;
592
816
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/autopilot/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9D,8CAA8C;AAC9C,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,gBAAgB,GAAG,OAAO,GAAG,WAAW,CAAC;AAEvG,mFAAmF;AACnF,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAC;AAE7F,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAAiE,CAAC;AAE/G,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,oBAAoB,GACpB,MAAM,GACN,aAAa,GACb,aAAa,GACb,QAAQ,GACR,OAAO,GACP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AAE,OAAO,CAAC;IACjB,0FAA0F;IAC1F,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAChC,+IAA+I;IAC/I,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,GAAG;QAAE,SAAS,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAA;KAAE,CAAC;IACnG,6EAA6E;IAC7E,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B"}
@@ -1,6 +1,22 @@
1
1
  export const AUTOPILOT_PHASES = ["concept", "plan", "write", "review", "final", "completed"];
2
+ export const FROZEN_EDITS_MODES = ["ask", "auto", "notify"];
3
+ export const FROZEN_ACTIONS = ["review-and-update", "review-only", "mark-reviewed", "rewrite-to-outline", "keep-text"];
4
+ /** The actions of each kind of change, in the order the question offers them. */
5
+ export const FROZEN_CHANGE_ACTIONS = {
6
+ frozen: ["review-and-update", "review-only", "mark-reviewed"],
7
+ outline: ["rewrite-to-outline", "keep-text", "mark-reviewed"],
8
+ };
2
9
  export const AUTOPILOT_PUBLISH_MODES = ["off", "chapter", "step"];
3
- /** The options that can change while a run goes on: the run reads them again at the end of every step and of every chapter. */
4
- export const LIVE_AUTOPILOT_OPTIONS = ["publishEvery", "pauseAfterEachChapter"];
10
+ /** The longest wait of «Retry later», in minutes (a week), and the most cycles that are not "unlimited". */
11
+ export const LONG_RETRY_MAX_MINUTES = 10_080;
12
+ export const LONG_RETRY_MAX_CYCLES = 1000;
13
+ /** The options that can change while a run goes on: the run reads them again at the end of every step and of every chapter (and `longRetry` when a step has failed). */
14
+ export const LIVE_AUTOPILOT_OPTIONS = ["publishEvery", "pauseAfterEachChapter", "frozenEdits", "longRetry"];
5
15
  export const AUTOPILOT_ERROR_KINDS = ["network", "auth", "rate_limit", "timeout", "truncated", "refused", "conflict", "budget", "limit", "profile", "config", "provider", "unknown"];
16
+ /**
17
+ * The codes that say, in the state, why a run ended with an error: the `code` of its `run-ended` event, when that code is one of these. «Retry later»
18
+ * stopped the run after its last cycle (`longRetryExhausted`), or was turned off while the run waited for it (`longRetryOff`). A closed list: a code
19
+ * that is not in it is dropped when a file is read.
20
+ */
21
+ export const LAST_ERROR_CODES = ["longRetryExhausted", "longRetryOff"];
6
22
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/autopilot/types.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,gBAAgB,GAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AAmC/G,MAAM,CAAC,MAAM,uBAAuB,GAAoC,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAqCnG,+HAA+H;AAC/H,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,cAAc,EAAE,uBAAuB,CAAU,CAAC;AA4PzF,MAAM,CAAC,MAAM,qBAAqB,GAAkC,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/autopilot/types.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,gBAAgB,GAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AA6C/G,MAAM,CAAC,MAAM,kBAAkB,GAA+B,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAaxF,MAAM,CAAC,MAAM,cAAc,GAA4B,CAAC,mBAAmB,EAAE,aAAa,EAAE,eAAe,EAAE,oBAAoB,EAAE,WAAW,CAAC,CAAC;AAEhJ,iFAAiF;AACjF,MAAM,CAAC,MAAM,qBAAqB,GAAgE;IAChG,MAAM,EAAE,CAAC,mBAAmB,EAAE,aAAa,EAAE,eAAe,CAAC;IAC7D,OAAO,EAAE,CAAC,oBAAoB,EAAE,WAAW,EAAE,eAAe,CAAC;CAC9D,CAAC;AA0CF,MAAM,CAAC,MAAM,uBAAuB,GAAoC,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAsDnG,4GAA4G;AAC5G,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAC7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAc1C,wKAAwK;AACxK,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,cAAc,EAAE,uBAAuB,EAAE,aAAa,EAAE,WAAW,CAAU,CAAC;AAsUrH,MAAM,CAAC,MAAM,qBAAqB,GAAkC,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;AAgCpN;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,oBAAoB,EAAE,cAAc,CAAoD,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { type MarkdownDocument } from "../markdown/frontmatter.js";
2
2
  import { type DirectorProfile } from "../profiles/director.js";
3
+ import { type EvaluationStyle } from "../profiles/evaluation-style.js";
3
4
  import { type GhostwriterProfile } from "../profiles/ghostwriter.js";
4
5
  import { type ReaderPersonaProfile } from "../profiles/readers.js";
5
6
  import { type CanonKind } from "./paths.js";
@@ -17,6 +18,8 @@ export declare function readBody(store: BookStore, path: string, max?: number, k
17
18
  /** True when a scaffolded document still has only headings, placeholders and template hints. */
18
19
  export declare function isThinDocument(body: string): boolean;
19
20
  export declare function loadDirectorProfile(store: BookStore, language?: string): Promise<DirectorProfile>;
21
+ /** The evaluation style of the book (`evaluation-guidelines.md`); `null` without the file: nothing changes in how the book is judged. */
22
+ export declare function loadEvaluationStyle(store: BookStore): Promise<EvaluationStyle | null>;
20
23
  /**
21
24
  * The ghostwriter of a paragraph, else its chapter, else the book, else the default one. A slug that is not a file name
22
25
  * (`../x`, a path, a strange character) is never read: it is skipped for the next one and reported to `onInvalid`, so that
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/book/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAkC,KAAK,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/F,OAAO,EAAuC,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAC1G,OAAO,EAA2C,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE5G,OAAO,EAAmF,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7H,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE7D,wBAAsB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,gBAAgB,CAAA;CAAE,GAAG,IAAI,CAAC,CAGxI;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,SAAO,EAAE,IAAI,GAAE,OAAO,GAAG,KAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAI3H;AAED,gGAAgG;AAChG,wBAAgB,cAAc,CAAC,IAAI,E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I,EAAE,MAAM,CAAC;CACd;AAED,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAO9G;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,eAAe,EAAE,EAAE,WAAW,SAAQ,GAAG,MAAM,CAE5F;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAEtD;AA0BD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAShE;AAOD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,SAAK,EAAE,QAAQ,GAAE,MAAM,EAAO,GAAG,SAAS,EAAE,CAanH;AAED,wBAAsB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,OAAO,SAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMzG"}
@@ -1,9 +1,10 @@
1
1
  import { parseMarkdown } from "../markdown/frontmatter.js";
2
2
  import { defaultDirector, parseDirector } from "../profiles/director.js";
3
+ import { parseEvaluationStyle } from "../profiles/evaluation-style.js";
3
4
  import { ghostwriterPrompt, parseGhostwriter } from "../profiles/ghostwriter.js";
4
5
  import { mergeReaderPersonas, parseReaderPersona } from "../profiles/readers.js";
5
6
  import { clipMiddle, clipText, latinLength, tail, truncate } from "../util/text.js";
6
- import { CANON_DIRECTORIES, DIRECTOR_FILE, chapterNumberFromSlug, isValidGhostwriterSlug } from "./paths.js";
7
+ import { CANON_DIRECTORIES, DIRECTOR_FILE, EVALUATION_GUIDELINES_FILE, chapterNumberFromSlug, isValidGhostwriterSlug } from "./paths.js";
7
8
  export async function readDocument(store, path) {
8
9
  const file = await store.read(path);
9
10
  return file ? { file, document: parseMarkdown(file.content) } : null;
@@ -32,6 +33,11 @@ export async function loadDirectorProfile(store, language) {
32
33
  const file = await store.read(DIRECTOR_FILE);
33
34
  return file ? parseDirector(file.content, language) : defaultDirector(language);
34
35
  }
36
+ /** The evaluation style of the book (`evaluation-guidelines.md`); `null` without the file: nothing changes in how the book is judged. */
37
+ export async function loadEvaluationStyle(store) {
38
+ const file = await store.read(EVALUATION_GUIDELINES_FILE);
39
+ return file ? parseEvaluationStyle(file.content) : null;
40
+ }
35
41
  /**
36
42
  * The ghostwriter of a paragraph, else its chapter, else the book, else the default one. A slug that is not a file name
37
43
  * (`../x`, a path, a strange character) is never read: it is skipped for the next one and reported to `onInvalid`, so that