endfield-mcp
Version:
MCP Server for Arknights: Endfield (TypeScript / stdio + Streamable HTTP)
39 lines (38 loc) • 1.59 kB
TypeScript
/**
* Story chapter derivation and listing.
*
* There is no explicit chapter list in the upstream data. Chapters are
* derived by grouping catalog entries on the episode-prefix portion of
* the mission id:
* e1m1, e1m2 → chapter "e1"
* sm1l1m1 → chapter "sm1"
* c6m1 → chapter "c6" (character story)
* Display names come from missions.json when available; the prefix is
* used as fallback.
*
* Depends on `./storyCore.js` for the catalog loaders (`entries`,
* `missionNames`).
*/
import type { StoryChapter, StoryEntry } from "./storyTypes.js";
/** Reset the chapter grouping cache. Called by the barrel orchestrator. */
export declare function clearChapterCache(): void;
/**
* Extract the chapter prefix from a mission id.
*
* Mission ids follow patterns like:
* e1m1, e1m2 → "e1" (main story episode 1)
* e10m4 → "e10"
* sm1l1m1 → "sm1" (side mission layer 1)
* c6m1 → "c6" (character 6's story)
* gm01m1 → "gm01" (gate story)
* a1m6d2 → "a1" (activity)
* f1m1 → "f1" (facility)
*
* Strategy: take the leading non-digit run + the following digit run.
* "e1m1" → "e1", "sm1l1m1" → "sm1", "gm01m1" → "gm01".
*/
export declare function chapterPrefix(mission: string): string;
/** List all story chapters with scene counts and display names. */
export declare function listStoryChapters(): StoryChapter[];
/** List scenes within a chapter (by chapter prefix like "e1", "sm1"). */
export declare function listStories(chapterId: string): StoryEntry[];