MCPcopy
hub / github.com/Narcooo/inkos / loadControlDocuments

Method loadControlDocuments

packages/core/src/state/manager.ts:73–88  ·  view source on GitHub ↗
(bookId: string)

Source from the content-addressed store, hash-verified

71 }
72
73 async loadControlDocuments(bookId: string): Promise<{
74 authorIntent: string;
75 currentFocus: string;
76 runtimeDir: string;
77 }> {
78 await this.ensureControlDocuments(bookId);
79
80 const storyDir = join(this.bookDir(bookId), "story");
81 const runtimeDir = join(storyDir, "runtime");
82 const [authorIntent, currentFocus] = await Promise.all([
83 readFile(join(storyDir, "author_intent.md"), "utf-8"),
84 readFile(join(storyDir, "current_focus.md"), "utf-8"),
85 ]);
86
87 return { authorIntent, currentFocus, runtimeDir };
88 }
89
90 private async resolveControlDocumentLanguage(bookId: string): Promise<"zh" | "en"> {
91 try {

Callers 1

Calls 2

bookDirMethod · 0.95

Tested by

no test coverage detected