@dsh-agentic-roleplay/core 0.10.0 → 0.10.2

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 (37) hide show
  1. package/README.md +1 -1
  2. package/icon.svg +13 -0
  3. package/lib/{authoring-tools-B4mEdKp_.js → authoring-tools-C9cmcUbD.js} +1820 -1243
  4. package/lib/authoring.js +18 -7
  5. package/lib/{child-Dtv76jNx.js → child-C9nPIy9j.js} +40 -5
  6. package/lib/client.js +4668 -2249
  7. package/lib/client.js.map +1 -1
  8. package/lib/compaction.js +2 -2
  9. package/lib/doctor.js +3 -3
  10. package/lib/{gallery-BZJleAeH.js → gallery-CtG-bDzz.js} +2 -2
  11. package/lib/{generator-Cg6CQc5S.js → generator-nLoPM5MF.js} +2 -2
  12. package/lib/helper.js +8 -1
  13. package/lib/{hooks-DTjHWTfx.js → hooks-BpLN_hhT.js} +282 -211
  14. package/lib/images.js +4 -4
  15. package/lib/index.js +1399 -146
  16. package/lib/{library-GIlrkOim.js → library-CH-ahlm0.js} +2 -2
  17. package/lib/{lorebook-author-tools-BCFFJSle.js → lorebook-author-tools-Cg7QQemi.js} +6 -6
  18. package/lib/lorebook-authoring.js +4 -4
  19. package/lib/{narration-BVzew4-K.js → narration-B0hConSw.js} +5 -2
  20. package/lib/orchestration.js +108 -21
  21. package/lib/{pack-jail-hsNQNTOf.js → pack-jail-D5j5mIq6.js} +16 -12
  22. package/lib/{packs-UpK_cvI4.js → packs-Cc05FrId.js} +2 -2
  23. package/lib/{presenter-agent-DZOgBOR9.js → presenter-agent-UKbKYXMO.js} +6 -6
  24. package/lib/{preset-Cyoj1ZWa.js → preset-Be4lz6vB.js} +4 -4
  25. package/lib/{preset-author-tools-RSta6pHK.js → preset-author-tools-C3s0iSfv.js} +6 -6
  26. package/lib/preset-authoring.js +5 -5
  27. package/lib/{presets-CvpsW_10.js → presets-Cl9sU3Qs.js} +152 -14
  28. package/lib/{reflection-0qTvw2It.js → reflection-I9z-PvFK.js} +135 -93
  29. package/lib/{text-CbGQhK1-.js → text-CzqhC8sT.js} +11 -1
  30. package/lib/{turn-guard-BzNeGNnc.js → turn-guard-B9pGCeir.js} +3 -3
  31. package/package.json +4 -2
  32. package/prompts/en/checks/decide-opening.md +7 -1
  33. package/prompts/en/checks/decide-stated.md +1 -0
  34. package/prompts/en/roleplay/record-keeper.md +2 -1
  35. package/prompts/zh/checks/decide-opening.md +7 -1
  36. package/prompts/zh/checks/decide-stated.md +1 -0
  37. package/prompts/zh/roleplay/record-keeper.md +2 -1
@@ -1,13 +1,14 @@
1
1
  import { a as VARIABLE_KINDS, n as atomicWrite, o as VARIABLE_SUBJECTS, s as VARIABLE_VISIBILITIES } from "./access-CXtaZNbx.js";
2
- import "./narration-BVzew4-K.js";
3
- import { J as Reader, Q as PROMPTS_FOLDER, X as errorMessage, Y as formatIssue, Z as LANGUAGE_FOLDER, at as shippedLanguages, it as promptProblem, nt as languageOf, ot as shippedPromptsDirectory, q as readDocument, rt as listFiles } from "./hooks-DTjHWTfx.js";
4
- import { u as parseSampling } from "./child-Dtv76jNx.js";
5
- import { C as slug, S as norm, T as uniqueKey, w as trOf, x as mapLimit } from "./library-GIlrkOim.js";
2
+ import "./narration-B0hConSw.js";
3
+ import { $ as listFiles, G as formatIssue, J as PROMPTS_FOLDER, K as errorMessage, Q as languageOf, U as readDocument, W as Reader, et as promptProblem, nt as shippedPromptsDirectory, q as LANGUAGE_FOLDER, tt as shippedLanguages } from "./hooks-BpLN_hhT.js";
4
+ import { i as translator, r as languageOf$1 } from "./text-CzqhC8sT.js";
5
+ import { d as parseSampling } from "./child-C9nPIy9j.js";
6
+ import { C as slug, S as norm, T as uniqueKey, w as trOf, x as mapLimit } from "./library-CH-ahlm0.js";
6
7
  import { dirname, join } from "node:path";
8
+ import { MAX_ROUTINE_WINDOWS, createSessionStore, dayTokenProblems, valueIssue } from "@dsh-agentic-roleplay/state";
7
9
  import { existsSync, readFileSync, readdirSync } from "node:fs";
8
10
  import { createHash, randomUUID } from "node:crypto";
9
11
  import { cp, mkdir, readFile, readdir, rename, rm, stat, writeFile } from "node:fs/promises";
10
- import { MAX_ROUTINE_WINDOWS, createSessionStore, dayTokenProblems, valueIssue } from "@dsh-agentic-roleplay/state";
11
12
  // ../dsh-roleplay-model/src/character.ts
12
13
  const CHARACTER_ROLES = ["playable", "npc"];
13
14
  const CHARACTER_TIERS = [
@@ -1541,6 +1542,100 @@ function parseImportCommand(text) {
1541
1542
  request: command.rest.slice(boundary).trim()
1542
1543
  };
1543
1544
  }
1545
+ // src/host/import/dialect.ts
1546
+ const MAX_NAMES = 8;
1547
+ const PLAIN_MACROS = /* @__PURE__ */ new Set([
1548
+ "user",
1549
+ "char",
1550
+ "bot"
1551
+ ]);
1552
+ const MARKUP = /* @__PURE__ */ new Set([
1553
+ "a",
1554
+ "b",
1555
+ "i",
1556
+ "u",
1557
+ "s",
1558
+ "p",
1559
+ "br",
1560
+ "hr",
1561
+ "em",
1562
+ "strong",
1563
+ "span",
1564
+ "div",
1565
+ "code",
1566
+ "pre",
1567
+ "center",
1568
+ "small",
1569
+ "img",
1570
+ "ul",
1571
+ "ol",
1572
+ "li",
1573
+ "blockquote",
1574
+ "details",
1575
+ "summary",
1576
+ "font",
1577
+ "sub",
1578
+ "sup",
1579
+ "h1",
1580
+ "h2",
1581
+ "h3",
1582
+ "table",
1583
+ "tr",
1584
+ "td",
1585
+ "th"
1586
+ ]);
1587
+ const MACRO = /\{\{\s*([\p{L}_][\p{L}\p{N}_]*)/gu;
1588
+ const BLOCK = /<([\p{L}][\p{L}\p{N}_-]{1,30})(?:\s[^>]*)?>[\s\S]*?<\/\1\s*>/gu;
1589
+ function textsOf(card) {
1590
+ return [
1591
+ card.description,
1592
+ card.personality,
1593
+ card.scenario,
1594
+ card.firstMessage,
1595
+ ...card.alternateGreetings,
1596
+ card.messageExample,
1597
+ card.systemPrompt,
1598
+ card.postHistoryInstructions,
1599
+ ...(card.book?.entries ?? []).map((entry) => entry.content)
1600
+ ];
1601
+ }
1602
+ /** The distinct values of a pattern's first group over some texts, in the order met, lowercased and cut to a few. */
1603
+ function namesIn(texts, pattern, skip) {
1604
+ const found = /* @__PURE__ */ new Set();
1605
+ for (const text of texts) for (const match of text.matchAll(pattern)) {
1606
+ const name = match[1].toLowerCase();
1607
+ if (!skip(name)) found.add(name);
1608
+ }
1609
+ return [...found].slice(0, MAX_NAMES);
1610
+ }
1611
+ /** Reads the machinery of the source tool out of a card: macros, tag blocks and the scripts the reader counted. */
1612
+ function dialectOf(card) {
1613
+ const texts = textsOf(card);
1614
+ return {
1615
+ macros: namesIn(texts, MACRO, (name) => PLAIN_MACROS.has(name)),
1616
+ tags: namesIn(texts, BLOCK, (name) => MARKUP.has(name)),
1617
+ regexScripts: card.ignored.regexScripts ?? 0,
1618
+ helperScripts: card.ignored.helperScripts ?? card.ignored.scripts - (card.ignored.regexScripts ?? 0)
1619
+ };
1620
+ }
1621
+ /** What the person is told about a card before the import starts: what it is, and which of its machinery is left out. */
1622
+ function sourceSummary(card, language) {
1623
+ const tr = translator(languageOf$1(language));
1624
+ const dialect = dialectOf(card);
1625
+ const lines = [tr("The source is a {format} card with {entries} lorebook entries and {greetings} alternate openings.", {
1626
+ format: card.sourceSpec === "chara_card_v2" ? "V2" : "V3",
1627
+ entries: String(card.book?.entries.length ?? 0),
1628
+ greetings: String(card.alternateGreetings.length)
1629
+ })];
1630
+ const left = [
1631
+ ...dialect.regexScripts > 0 ? [tr("{count} regular expressions", { count: String(dialect.regexScripts) })] : [],
1632
+ ...dialect.helperScripts > 0 ? [tr("{count} helper scripts", { count: String(dialect.helperScripts) })] : [],
1633
+ ...dialect.macros.length > 0 ? [tr("macros ({names})", { names: dialect.macros.join(", ") })] : [],
1634
+ ...dialect.tags.length > 0 ? [tr("tag blocks ({names})", { names: dialect.tags.join(", ") })] : []
1635
+ ];
1636
+ if (left.length > 0) lines.push(tr("Nothing runs them, so they are not carried: {parts}. Their effect is kept only where the card also says it in words.", { parts: left.join("; ") }));
1637
+ return lines.join(" ");
1638
+ }
1544
1639
  // src/host/import/store.ts
1545
1640
  const IMPORT_FOLDER = ".import";
1546
1641
  const CARD_FILE = "card.json";
@@ -1655,7 +1750,8 @@ var ImportStore = class {
1655
1750
  id,
1656
1751
  card,
1657
1752
  choices,
1658
- hasAvatar: hasPicture
1753
+ hasAvatar: hasPicture,
1754
+ dialect: dialectOf(card)
1659
1755
  };
1660
1756
  } catch (error) {
1661
1757
  if (error.code === "ENOENT") throw new ImportNotFoundError(`there is no import "${id}"`);
@@ -2481,8 +2577,19 @@ const emptyExtracted = () => ({
2481
2577
  casting: [],
2482
2578
  commands: [],
2483
2579
  triggers: [],
2484
- notes: []
2580
+ notes: [],
2581
+ derived: []
2485
2582
  });
2583
+ const baseOf = (id) => id.replace(/#\d+$/, "");
2584
+ /** The ids of the card pieces whose text is among these texts (one of them may have been cut short to fit a request). */
2585
+ function piecesOfTexts(card, items, texts) {
2586
+ const known = [
2587
+ ...items.map((item) => [item.text, baseOf(item.id)]),
2588
+ [cleanText(card.systemPrompt, card.name), "field:system-prompt"],
2589
+ [cleanText(card.postHistoryInstructions, card.name), "field:post-history"]
2590
+ ];
2591
+ return [...new Set(known.filter(([body]) => body !== "" && texts.some((text) => text !== "" && (body.startsWith(text) || text.startsWith(body)))).map(([, id]) => id))];
2592
+ }
2486
2593
  const SOURCE_BUDGET_CHARS = 14e3;
2487
2594
  const MAX_TAGGED = 8;
2488
2595
  const MAX_MENTIONS = 6;
@@ -3408,6 +3515,16 @@ async function extractEntities(ctx, card, items, classified, roster) {
3408
3515
  if (failure !== void 0) result.notes.push(failure);
3409
3516
  const name = item.title === "" ? item.label : item.title;
3410
3517
  result.casting.push(...casting);
3518
+ if (casting.length > 0) result.derived.push({
3519
+ kind: "command",
3520
+ name: "",
3521
+ pieces: [baseOf(item.id)]
3522
+ });
3523
+ if (rules.length > 0) result.derived.push({
3524
+ kind: "rules",
3525
+ name,
3526
+ pieces: [baseOf(item.id)]
3527
+ });
3411
3528
  if (casting.length > 0) addLore(result.lore, {
3412
3529
  id: uniqueKey(slug(item.label, "guidance"), taken),
3413
3530
  ...guidanceEntry(casting, tr("{label}: how people are made up", { label: name }))
@@ -3476,7 +3593,17 @@ function styleProblem(id, value, personas = []) {
3476
3593
  }
3477
3594
  /** Turns the instructions of a card into the prose prompts of the world. Only prose and behaviour are kept: the rules of the game stay the program's. */
3478
3595
  async function extractStyle(ctx, card, items, classified) {
3479
- return await extractStyleFrom(ctx, card.name, instructionPieces(card, items, classified));
3596
+ const texts = instructionPieces(card, items, classified);
3597
+ const made = await extractStyleFrom(ctx, card.name, texts);
3598
+ const pieces = piecesOfTexts(card, items, texts);
3599
+ return {
3600
+ ...made,
3601
+ derived: made.prompts.map((prompt) => ({
3602
+ kind: "prompt",
3603
+ name: prompt.id,
3604
+ pieces
3605
+ }))
3606
+ };
3480
3607
  }
3481
3608
  /** The prose prompts that instruction texts become, and what was left out of them. */
3482
3609
  async function extractStyleFrom(ctx, name, pieces) {
@@ -3703,7 +3830,8 @@ async function extractVariables(ctx, card, items, classified, roster) {
3703
3830
  const groups = trackingGroups(trackingPieces(card, items, classified));
3704
3831
  if (groups.length === 0) return {
3705
3832
  variables: [],
3706
- notes: []
3833
+ notes: [],
3834
+ derived: []
3707
3835
  };
3708
3836
  const perRequest = ctx.variablesPerRequest ?? DEFAULT_VARIABLES_PER_REQUEST;
3709
3837
  const names = (kind) => roster.filter((entity) => entity.kind === kind).map((entity) => entity.name).join(", ");
@@ -3742,14 +3870,24 @@ async function extractVariables(ctx, card, items, classified, roster) {
3742
3870
  }
3743
3871
  return {
3744
3872
  documents,
3745
- notes
3873
+ notes,
3874
+ pieces: piecesOfTexts(card, items, pieces)
3746
3875
  };
3747
3876
  });
3748
3877
  const variables = [];
3749
- for (const document of found.flatMap((entry) => entry.documents)) if (!variables.some((kept) => kept["key"] === document["key"])) variables.push(document);
3878
+ const derived = [];
3879
+ for (const entry of found) for (const document of entry.documents) if (!variables.some((kept) => kept["key"] === document["key"])) {
3880
+ variables.push(document);
3881
+ derived.push({
3882
+ kind: "variable",
3883
+ name: text(document["name"]) || text(document["key"]),
3884
+ pieces: entry.pieces
3885
+ });
3886
+ }
3750
3887
  return {
3751
3888
  variables,
3752
- notes: found.flatMap((entry) => entry.notes)
3889
+ notes: found.flatMap((entry) => entry.notes),
3890
+ derived
3753
3891
  };
3754
3892
  }
3755
3893
  // src/host/presets/presets.ts
@@ -4007,6 +4145,6 @@ async function createPresetFromGuidance(root, request, guidance, shipped = shipp
4007
4145
  });
4008
4146
  }
4009
4147
  }
4010
- export { ImportNotFoundError as $, sourcesFor as A, parseLoreEdit as At, noAt as B, inert as C, CHARACTER_FILE_NAME as Ct, pruneLoreSubjects as D, InvalidEditProblems as Dt, pruneLinks as E, readIdentifier as Et, isLeftOut as F, LORE_SCOPES as Ft, listWorldPrompts as G, yesAt as H, announceProblem as I, WEEKDAY_NAMES as It, cleanText as J, readWorldPrompt as K, askYesNo as L, DEFAULT_SLOTS as Lt, classifyItems as M, parseRelationEdit as Mt, findEntity as N, parseThingEdit as Nt, pruneMembers as O, parseCharacterEdit as Ot, ROLES as P, LORE_KINDS as Pt, IMPORT_FOLDER as Q, mergeReports as R, INTENT_STATUSES as Rt, extractVariables as S, parseFactionFile as St, pruneKnowledge as T, readVariableValues as Tt, PROSE_PROMPTS as U, routeVerdicts as V, deleteWorldPrompt as W, partsOf as X, itemise as Y, withPlayer as Z, characterDocument as _, ITEM_FILE_NAME as _t, isPresetName as a, writeChoices as at, extractStyle as b, parseSlotsFile as bt, presetDirectory as c, parseAuthoringCommand as ct, savePresetFromWorld as d, parseVariablesFile as dt, ImportStore as et, sha as f, variableProblems as ft, asWritten as g, parseLocationFile as gt, addLore as h, LOCATION_FILE_NAME as ht, deletePreset as i, readImportFolder as it, buildRoster as j, parsePlaceEdit as jt, pruneRelationships as k, parseFactionEdit as kt, readPreset as l, VARIABLES_FILE_NAME as lt, STANDING_PROMPT as m, parseLoreFile as mt, createPresetFromGuidance as n, openingText as nt, listPresets as o, IMPORT_COMMAND as ot, updatePresetInfo as p, LORE_FILE_NAME as pt, writeWorldPrompt as q, createPresetFromShipped as r, parseChoices as rt, loadPreset as s, parseImportCommand as st, PRESET_FILE as t, PICTURE_FILE as tt, reservePreset as u, loadVariables as ut, emptyExtracted as v, SLOTS_FILE_NAME as vt, loreDocuments as w, parseCharacterFile as wt, extractStyleFrom as x, FACTION_FILE_NAME as xt, extractEntities as y, parseItemFile as yt, modeFor as z };
4148
+ export { IMPORT_FOLDER as $, sourcesFor as A, InvalidEditProblems as At, modeFor as B, DEFAULT_SLOTS as Bt, inert as C, parseSlotsFile as Ct, pruneLoreSubjects as D, parseCharacterFile as Dt, pruneLinks as E, CHARACTER_FILE_NAME as Et, ROLE_TABLE as F, parseRelationEdit as Ft, deleteWorldPrompt as G, routeVerdicts as H, isLeftOut as I, parseThingEdit as It, writeWorldPrompt as J, listWorldPrompts as K, announceProblem as L, LORE_KINDS as Lt, classifyItems as M, parseFactionEdit as Mt, findEntity as N, parseLoreEdit as Nt, pruneMembers as O, readVariableValues as Ot, ROLES as P, parsePlaceEdit as Pt, withPlayer as Q, askYesNo as R, LORE_SCOPES as Rt, extractVariables as S, parseItemFile as St, pruneKnowledge as T, parseFactionFile as Tt, yesAt as U, noAt as V, INTENT_STATUSES as Vt, PROSE_PROMPTS as W, itemise as X, cleanText as Y, partsOf as Z, characterDocument as _, parseLoreFile as _t, isPresetName as a, readImportFolder as at, extractStyle as b, ITEM_FILE_NAME as bt, presetDirectory as c, sourceSummary as ct, savePresetFromWorld as d, parseAuthoringCommand as dt, ImportNotFoundError as et, sha as f, VARIABLES_FILE_NAME as ft, asWritten as g, LORE_FILE_NAME as gt, addLore as h, variableProblems as ht, deletePreset as i, parseChoices as it, buildRoster as j, parseCharacterEdit as jt, pruneRelationships as k, readIdentifier as kt, readPreset as l, IMPORT_COMMAND as lt, STANDING_PROMPT as m, parseVariablesFile as mt, createPresetFromGuidance as n, PICTURE_FILE as nt, listPresets as o, writeChoices as ot, updatePresetInfo as p, loadVariables as pt, readWorldPrompt as q, createPresetFromShipped as r, openingText as rt, loadPreset as s, dialectOf as st, PRESET_FILE as t, ImportStore as tt, reservePreset as u, parseImportCommand as ut, emptyExtracted as v, LOCATION_FILE_NAME as vt, loreDocuments as w, FACTION_FILE_NAME as wt, extractStyleFrom as x, SLOTS_FILE_NAME as xt, extractEntities as y, parseLocationFile as yt, mergeReports as z, WEEKDAY_NAMES as zt };
4011
4149
 
4012
- //# sourceMappingURL=presets-CvpsW_10.js.map
4150
+ //# sourceMappingURL=presets-Cl9sU3Qs.js.map
@@ -1,14 +1,14 @@
1
1
  import { l as roleplaySessionOf, t as promptFor } from "./access-CXtaZNbx.js";
2
- import { B as noAt, H as yesAt, I as announceProblem, L as askYesNo, R as mergeReports, V as routeVerdicts, f as sha, o as listPresets, s as loadPreset } from "./presets-CvpsW_10.js";
3
- import { D as describeTime, O as describeWhen, Q as PROMPTS_FOLDER, j as answerLimits, tt as inheritPrompts, z as wrongLanguage } from "./hooks-DTjHWTfx.js";
4
- import { i as translator, r as languageOf, t as trimCharacters } from "./text-CbGQhK1-.js";
5
- import { a as childTrace, c as runChild, n as childModel, r as childSampling, x as estimateAnswer } from "./child-Dtv76jNx.js";
6
- import { s as inheritImages } from "./library-GIlrkOim.js";
7
- import { i as inheritPacks } from "./packs-UpK_cvI4.js";
2
+ import { H as routeVerdicts, L as announceProblem, R as askYesNo, U as yesAt, V as noAt, f as sha, o as listPresets, s as loadPreset, z as mergeReports } from "./presets-Cl9sU3Qs.js";
3
+ import { E as answerLimits, J as PROMPTS_FOLDER, P as wrongLanguage, Z as inheritPrompts, ft as describeTime, pt as describeWhen } from "./hooks-BpLN_hhT.js";
4
+ import { i as translator, r as languageOf, t as trimCharacters } from "./text-CzqhC8sT.js";
5
+ import { T as estimateAnswer, a as childTrace, l as runChild, n as childModel, r as childSampling } from "./child-C9nPIy9j.js";
6
+ import { s as inheritImages } from "./library-CH-ahlm0.js";
7
+ import { i as inheritPacks } from "./packs-Cc05FrId.js";
8
8
  import { dirname, join } from "node:path";
9
+ import { MINUTE, characterKey, describeDuration, locationKey, mentioned, overlap, sessionDatabase, sessionFolder, tokens } from "@dsh-agentic-roleplay/state";
9
10
  import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
10
11
  import { createUserMessage } from "@deepseek-ai/dsh-llm";
11
- import { MINUTE, characterKey, describeDuration, locationKey, mentioned, overlap, sessionDatabase, sessionFolder, tokens } from "@dsh-agentic-roleplay/state";
12
12
  // ../dsh-roleplay-model/src/memory.ts
13
13
  const MEMORY_KINDS = [
14
14
  "belief",
@@ -21,6 +21,89 @@ const MEMORY_CONFIDENCES = [
21
21
  "likely",
22
22
  "sure"
23
23
  ];
24
+ // src/shared/timeline.ts
25
+ const emptyTimeline = () => ({
26
+ version: 1,
27
+ head: null,
28
+ next: 1,
29
+ nodes: []
30
+ });
31
+ /** The turns from the first to `id`, in order; none for the start. */
32
+ function pathTo(timeline, id) {
33
+ const byId = new Map(timeline.nodes.map((node) => [node.id, node]));
34
+ const path = [];
35
+ for (let at = id === null ? void 0 : byId.get(id); at !== void 0; at = at.parent === null ? void 0 : byId.get(at.parent)) path.unshift(at);
36
+ return path;
37
+ }
38
+ /** The turns that follow `parent`, in the order they were played. */
39
+ const childrenOf = (timeline, parent) => timeline.nodes.filter((node) => node.parent === parent);
40
+ /** The snapshot that holds the state before any turn. */
41
+ const START_SNAPSHOT = "start";
42
+ /** The snapshot that holds the state after a turn. */
43
+ const snapshotOf = (id) => `after-${id}`;
44
+ /** Builds what the client shows from the timeline. */
45
+ function viewOf(timeline) {
46
+ const turn = (node) => ({
47
+ id: node.id,
48
+ turn: node.turn,
49
+ player: node.player,
50
+ ...node.label === void 0 ? {} : { label: node.label },
51
+ ...node.note === void 0 ? {} : { note: node.note },
52
+ ...node.endSeq === void 0 ? {} : { endSeq: node.endSeq },
53
+ ...node.output === void 0 ? {} : { output: node.output },
54
+ restorable: node.snapshot !== void 0,
55
+ alternatives: childrenOf(timeline, node.parent).map((sibling) => sibling.id)
56
+ });
57
+ const on = new Set(pathTo(timeline, timeline.head).map((node) => node.id));
58
+ const withdrawn = timeline.nodes.filter((node) => !on.has(node.id) && node.userSeq >= 0).map((node) => ({
59
+ from: Math.min(node.startSeq ?? node.userSeq, node.userSeq),
60
+ to: node.endSeq ?? Number.MAX_SAFE_INTEGER
61
+ }));
62
+ return {
63
+ head: timeline.head,
64
+ path: pathTo(timeline, timeline.head).map(turn),
65
+ forward: childrenOf(timeline, timeline.head).map(turn),
66
+ canStart: true,
67
+ withdrawn
68
+ };
69
+ }
70
+ /** Where a notice stands for a turn that is not told by its own events: the player's words and what was delivered, as plain text. */
71
+ function noticeText(node) {
72
+ const told = node.output === void 0 ? "(nothing was delivered)" : node.output.segments.map((segment) => segment.type === "utterance" ? `${segment.name}: "${segment.text}"` : segment.text).join("\n");
73
+ const ooc = node.output?.ooc;
74
+ const ruling = ooc === void 0 ? "" : ooc.question === true ? `\nThe question was answered out of character: ${ooc.note}` : `\nThe command was ruled ${ooc.legal ? "legal" : "illegal and refused"}: ${ooc.note}`;
75
+ return `The story, as it went earlier (restored):\nThe player said: ${node.player}${ruling}\nIt was told to the player:\n${told}`;
76
+ }
77
+ // src/host/timeline/file.ts
78
+ const TIMELINE_FILE = "timeline.json";
79
+ function isNode(value) {
80
+ if (typeof value !== "object" || value === null) return false;
81
+ const node = value;
82
+ return typeof node["id"] === "string" && (node["parent"] === null || typeof node["parent"] === "string") && typeof node["turn"] === "number" && typeof node["userSeq"] === "number" && typeof node["player"] === "string" && typeof node["createdAt"] === "string";
83
+ }
84
+ /**
85
+ * The timeline of a session, or an empty one when it has none yet.
86
+ * @throws {Error} when the file is there and is not a timeline: it holds what lets the story be taken back, so it is not replaced silently.
87
+ */
88
+ function readTimeline(folder) {
89
+ let text;
90
+ try {
91
+ text = readFileSync(join(folder, TIMELINE_FILE), "utf8");
92
+ } catch (error) {
93
+ if (error.code === "ENOENT") return emptyTimeline();
94
+ throw error;
95
+ }
96
+ const value = JSON.parse(text);
97
+ if (value.version !== 1 || !Array.isArray(value.nodes) || !value.nodes.every(isNode) || typeof value.next !== "number" || value.head !== null && typeof value.head !== "string") throw new Error(`${join(folder, TIMELINE_FILE)} is not a timeline`);
98
+ return value;
99
+ }
100
+ /** Writes it aside and renames it, so a crash leaves the timeline as it was. */
101
+ function writeTimeline(folder, timeline) {
102
+ const target = join(folder, TIMELINE_FILE);
103
+ const aside = `${target}.writing`;
104
+ writeFileSync(aside, JSON.stringify(timeline, null, 2));
105
+ renameSync(aside, target);
106
+ }
24
107
  // src/host/orchestration/referent.ts
25
108
  /**
26
109
  * How a person is named wherever the text may go on to say what they do: the name with the pronouns the world gave them, or the gender when only that is given.
@@ -738,87 +821,6 @@ function inheritPreset(from, to) {
738
821
  const file = join(from, PRESET_RECORD);
739
822
  if (existsSync(file)) copyFileSync(file, join(to, PRESET_RECORD));
740
823
  }
741
- // src/shared/timeline.ts
742
- const emptyTimeline = () => ({
743
- version: 1,
744
- head: null,
745
- next: 1,
746
- nodes: []
747
- });
748
- /** The turns from the first to `id`, in order; none for the start. */
749
- function pathTo(timeline, id) {
750
- const byId = new Map(timeline.nodes.map((node) => [node.id, node]));
751
- const path = [];
752
- for (let at = id === null ? void 0 : byId.get(id); at !== void 0; at = at.parent === null ? void 0 : byId.get(at.parent)) path.unshift(at);
753
- return path;
754
- }
755
- /** The turns that follow `parent`, in the order they were played. */
756
- const childrenOf = (timeline, parent) => timeline.nodes.filter((node) => node.parent === parent);
757
- /** The snapshot that holds the state before any turn. */
758
- const START_SNAPSHOT = "start";
759
- /** The snapshot that holds the state after a turn. */
760
- const snapshotOf = (id) => `after-${id}`;
761
- /** Builds what the client shows from the timeline. */
762
- function viewOf(timeline) {
763
- const turn = (node) => ({
764
- id: node.id,
765
- turn: node.turn,
766
- player: node.player,
767
- ...node.endSeq === void 0 ? {} : { endSeq: node.endSeq },
768
- ...node.output === void 0 ? {} : { output: node.output },
769
- restorable: node.snapshot !== void 0,
770
- alternatives: childrenOf(timeline, node.parent).map((sibling) => sibling.id)
771
- });
772
- const on = new Set(pathTo(timeline, timeline.head).map((node) => node.id));
773
- const withdrawn = timeline.nodes.filter((node) => !on.has(node.id) && node.userSeq >= 0).map((node) => ({
774
- from: Math.min(node.startSeq ?? node.userSeq, node.userSeq),
775
- to: node.endSeq ?? Number.MAX_SAFE_INTEGER
776
- }));
777
- return {
778
- head: timeline.head,
779
- path: pathTo(timeline, timeline.head).map(turn),
780
- forward: childrenOf(timeline, timeline.head).map(turn),
781
- canStart: true,
782
- withdrawn
783
- };
784
- }
785
- /** Where a notice stands for a turn that is not told by its own events: the player's words and what was delivered, as plain text. */
786
- function noticeText(node) {
787
- const told = node.output === void 0 ? "(nothing was delivered)" : node.output.segments.map((segment) => segment.type === "utterance" ? `${segment.name}: "${segment.text}"` : segment.text).join("\n");
788
- const ooc = node.output?.ooc;
789
- const ruling = ooc === void 0 ? "" : ooc.question === true ? `\nThe question was answered out of character: ${ooc.note}` : `\nThe command was ruled ${ooc.legal ? "legal" : "illegal and refused"}: ${ooc.note}`;
790
- return `The story, as it went earlier (restored):\nThe player said: ${node.player}${ruling}\nIt was told to the player:\n${told}`;
791
- }
792
- // src/host/timeline/file.ts
793
- const TIMELINE_FILE = "timeline.json";
794
- function isNode(value) {
795
- if (typeof value !== "object" || value === null) return false;
796
- const node = value;
797
- return typeof node["id"] === "string" && (node["parent"] === null || typeof node["parent"] === "string") && typeof node["turn"] === "number" && typeof node["userSeq"] === "number" && typeof node["player"] === "string" && typeof node["createdAt"] === "string";
798
- }
799
- /**
800
- * The timeline of a session, or an empty one when it has none yet.
801
- * @throws {Error} when the file is there and is not a timeline: it holds what lets the story be taken back, so it is not replaced silently.
802
- */
803
- function readTimeline(folder) {
804
- let text;
805
- try {
806
- text = readFileSync(join(folder, TIMELINE_FILE), "utf8");
807
- } catch (error) {
808
- if (error.code === "ENOENT") return emptyTimeline();
809
- throw error;
810
- }
811
- const value = JSON.parse(text);
812
- if (value.version !== 1 || !Array.isArray(value.nodes) || !value.nodes.every(isNode) || typeof value.next !== "number" || value.head !== null && typeof value.head !== "string") throw new Error(`${join(folder, TIMELINE_FILE)} is not a timeline`);
813
- return value;
814
- }
815
- /** Writes it aside and renames it, so a crash leaves the timeline as it was. */
816
- function writeTimeline(folder, timeline) {
817
- const target = join(folder, TIMELINE_FILE);
818
- const aside = `${target}.writing`;
819
- writeFileSync(aside, JSON.stringify(timeline, null, 2));
820
- renameSync(aside, target);
821
- }
822
824
  // src/host/timeline/branch.ts
823
825
  var BranchError = class extends Error {};
824
826
  /**
@@ -1022,8 +1024,8 @@ var Timelines = class {
1022
1024
  writeTimeline(this.folder(id), timeline);
1023
1025
  }
1024
1026
  /** Keeps the state as it is under the name of the turn it follows from, when that is not done yet. */
1025
- keep(id, timeline, at) {
1026
- if (this.deps.keepSnapshots(id) === 0) return;
1027
+ keep(id, timeline, at, force = false) {
1028
+ if (!force && this.deps.keepSnapshots(id) === 0) return;
1027
1029
  const node = at === null ? void 0 : timeline.nodes.find((candidate) => candidate.id === at);
1028
1030
  const name = node === void 0 ? START_SNAPSHOT : snapshotOf(node.id);
1029
1031
  if (node !== void 0 && node.snapshot !== void 0) return;
@@ -1034,10 +1036,48 @@ var Timelines = class {
1034
1036
  writeTimeline(this.folder(id), timeline);
1035
1037
  }
1036
1038
  }
1039
+ /**
1040
+ * Names a turn as a checkpoint, with a note: its state is kept (taken now when the story stands there and has not kept it) and no longer pruned.
1041
+ * @throws {TimelineError} when there is no such turn, the name is empty or too long, or the turn's state is gone.
1042
+ */
1043
+ mark(chat, target, label, note) {
1044
+ return this.serial(chat, async () => {
1045
+ const id = this.idOf(chat);
1046
+ const name = label.trim();
1047
+ if (name === "" || name.length > 80) throw new TimelineError(`a checkpoint's name is 1 to 80 characters`);
1048
+ if (note !== void 0 && note.length > 500) throw new TimelineError(`a checkpoint's note is at most 500 characters`);
1049
+ const timeline = this.read(id);
1050
+ const node = timeline.nodes.find((candidate) => candidate.id === target);
1051
+ if (node === void 0) throw new TimelineError(`there is no turn "${target}"`);
1052
+ if (node.snapshot === void 0 && timeline.head === node.id) {
1053
+ await this.deps.engine.quiesce(chat);
1054
+ this.keep(id, timeline, node.id, true);
1055
+ }
1056
+ if (node.snapshot === void 0) throw new TimelineError("the state of the story at that turn was not kept, so it cannot be a checkpoint");
1057
+ node.label = name;
1058
+ if (note === void 0 || note.trim() === "") delete node.note;
1059
+ else node.note = note.trim();
1060
+ writeTimeline(this.folder(id), timeline);
1061
+ });
1062
+ }
1063
+ /** Takes the name off a turn; its state is kept or let go like any other turn's. */
1064
+ unmark(chat, target) {
1065
+ return this.serial(chat, () => {
1066
+ const id = this.idOf(chat);
1067
+ const timeline = this.read(id);
1068
+ const node = timeline.nodes.find((candidate) => candidate.id === target);
1069
+ if (node === void 0) throw new TimelineError(`there is no turn "${target}"`);
1070
+ delete node.label;
1071
+ delete node.note;
1072
+ writeTimeline(this.folder(id), timeline);
1073
+ this.prune(id, timeline);
1074
+ return Promise.resolve();
1075
+ });
1076
+ }
1037
1077
  /** Lets the oldest snapshots go: only the turns most recently played keep theirs, and the one that holds the start stays. */
1038
1078
  prune(id, timeline) {
1039
1079
  const keep = this.deps.keepSnapshots(id);
1040
- const kept = timeline.nodes.filter((node) => node.snapshot !== void 0);
1080
+ const kept = timeline.nodes.filter((node) => node.snapshot !== void 0 && node.label === void 0);
1041
1081
  const dropped = kept.slice(0, Math.max(0, kept.length - keep));
1042
1082
  if (dropped.length === 0) return;
1043
1083
  for (const node of dropped) {
@@ -1928,6 +1968,7 @@ function memoryReflector(deps) {
1928
1968
  verdict = await runChild({
1929
1969
  parent,
1930
1970
  signal,
1971
+ turn: job.turn,
1931
1972
  reasoningEffort: settings.reasoning.children,
1932
1973
  sampling: childSampling(settings, "records", estimateAnswer([MAX_TEXT * 2, 100], settings.prompts.language)),
1933
1974
  ...childModel(settings, "records"),
@@ -1987,6 +2028,7 @@ function memoryReflector(deps) {
1987
2028
  const proposal = withDoubts(settleProposal(await runChild({
1988
2029
  parent,
1989
2030
  signal,
2031
+ turn: job.turn,
1990
2032
  reasoningEffort: settings.reasoning.children,
1991
2033
  sampling: childSampling(settings, "records", estimateAnswer(Array.from({ length: 14 }, () => MAX_TEXT), settings.prompts.language)),
1992
2034
  ...childModel(settings, "records"),
@@ -2053,6 +2095,6 @@ function memoryReflector(deps) {
2053
2095
  return { characters };
2054
2096
  } };
2055
2097
  }
2056
- export { referent as _, whereabouts as a, readTimeline as c, copyPreset as d, presetStatus as f, sameWords as g, defaultBoundaries as h, reflectionStatus as i, writeTimeline as l, switchPreset as m, memoryReflector as n, TimelineError as o, recordPreset as p, recordFailure as r, Timelines as s, dueReflection as t, pathTo as u };
2098
+ export { START_SNAPSHOT as _, whereabouts as a, snapshotOf as b, copyPreset as c, switchPreset as d, defaultBoundaries as f, writeTimeline as g, readTimeline as h, reflectionStatus as i, presetStatus as l, referent as m, memoryReflector as n, TimelineError as o, sameWords as p, recordFailure as r, Timelines as s, dueReflection as t, recordPreset as u, childrenOf as v, pathTo as y };
2057
2099
 
2058
- //# sourceMappingURL=reflection-0qTvw2It.js.map
2100
+ //# sourceMappingURL=reflection-I9z-PvFK.js.map
@@ -215,6 +215,16 @@ const ZH = {
215
215
  "## MCP resource servers\n\nUse {tools} with the server argument naming an MCP server.": "## MCP 资源服务器\n\n使用 {tools},server 参数填 MCP 服务器的名称。",
216
216
  "## MCP resource servers\n\nUse {tools} with one of these names as the server argument: {servers}.": "## MCP 资源服务器\n\n使用 {tools},server 参数填下列名称之一:{servers}。",
217
217
  "{where}: the text is longer than {max} characters. A belief is not rewritten to hold what speaks against it: leave the text out and list the belief under doubt with the numbers of what speaks against it, and put what was learned as a new belief of its own": "{where}:文字超过 {max} 个字符。不要通过改写信念来容纳与之相悖的事:不要写文字,把这条信念列入 doubt 并给出与之相悖的编号;新了解到的内容另写成一条新信念",
218
+ "The source is a {format} card with {entries} lorebook entries and {greetings} alternate openings.": "来源是一张 {format} 角色卡,含 {entries} 条世界书条目和 {greetings} 个备选开场。",
219
+ "{count} regular expressions": "{count} 条正则表达式",
220
+ "{count} helper scripts": "{count} 个辅助脚本",
221
+ "macros ({names})": "宏({names})",
222
+ "tag blocks ({names})": "标签块({names})",
223
+ "Nothing runs them, so they are not carried: {parts}. Their effect is kept only where the card also says it in words.": "这些内容不会被执行,所以不会带入:{parts}。只有卡片同时用文字写明的效果才会保留。",
224
+ "this chat follows the clock on the wall, so time cannot be skipped": "这个对话跟随墙上的时钟,所以不能跳过时间",
225
+ "say how long, for example /wait 2 hours or /wait 30 minutes until the ferry": "请说明要等多久,例如 /wait 2 hours,或 /wait 30 minutes until the ferry",
226
+ "that is more than the {days} days this chat allows in one skip": "这超过了本对话一次最多可跳过的 {days} 天",
227
+ "The player lets {minutes} minutes pass{reason}. Move the story's time on by that much with advance_time, and let the world move meanwhile as it would: characters keep to their days, and you ask only those the time reaches. Stop sooner, at the moment it happens, if something comes up that the player must decide or could not sleep through, say what, and let the player act. Then narrate what the player perceived in the time that passed. You may play at most {rounds} rounds for this.": "玩家让 {minutes} 分钟过去{reason}。用 advance_time 把故事时间推进这么久,期间让世界照常运转:角色按各自的日程行事,你只询问时间涉及到的那些人。如果出现了玩家必须决定、或睡不过去的事,就在它发生的那一刻提前停下,说明是什么,让玩家行动。然后叙述玩家在这段时间里感知到的内容。为此你最多可以进行 {rounds} 轮。",
218
228
  "Import this card into this newly created world.": "把这张卡片导入这个新建的世界。",
219
229
  "The character card this world was made from has a newer version, kept in this world's .import/update folder. Bring the world up to date with it. First call card_diff: it lists what changed between the two versions, which characters, places and things were made from each changed piece, and which files of the world have been edited since the import. Read the pieces you need with card_read (version current is the old card, version new is the new one). Then change only what the new card changed, with your editing tools, and keep what the person has edited since the import. What the card says about the world itself (its description, tags and opening) is changed with edit_world_info. Remove what only a dropped piece made unless the person edited it. Do not add what neither version of the card says. When the world matches the new card, call check_card with version new: it lists what the new card changed that the world does not say yet; deal with each finding or say why you left it. Then call card_update_finish, and tell me briefly what you changed, what you left alone and why.": "这个世界所依据的角色卡有了新版本,放在这个世界的 .import/update 文件夹里。请让世界与它保持一致。先调用 card_diff:它会列出两个版本之间的变化、每个变化的片段生成了哪些角色、地点和物品,以及导入之后世界里哪些文件被修改过。需要时用 card_read 读取片段(version 为 current 是旧卡,为 new 是新卡)。然后用你的编辑工具只改新卡改动的部分,并保留用户在导入之后做的修改。卡片对世界本身的描述(简介、标签和开场)用 edit_world_info 修改。只由已被删除的片段生成、且用户没有改过的内容,要移除。两个版本的卡都没有写的内容,一概不要添加。世界与新卡一致后,调用 check_card 并设 version 为 new:它会列出新卡改动了、而世界里还没有写到的内容;逐条处理,或说明为什么不处理。然后调用 card_update_finish,再简要告诉我:你改了什么、哪些没动以及原因。",
220
230
  "The update from the newer card is not finished. Apply the changes that remain and call card_update_finish. A change you cannot make with your tools, or one you need the person to decide, goes in your report instead; then say what is left.": "按新卡更新还没有完成。请应用剩下的改动,然后调用 card_update_finish。你的工具做不了的改动,或需要用户决定的改动,写进报告里;然后说明还剩什么。",
@@ -301,4 +311,4 @@ function withoutExtension(value) {
301
311
  }
302
312
  export { translator as i, withoutExtension as n, languageOf as r, trimCharacters as t };
303
313
 
304
- //# sourceMappingURL=text-CbGQhK1-.js.map
314
+ //# sourceMappingURL=text-CzqhC8sT.js.map
@@ -1,5 +1,5 @@
1
- import { b as finishOf, y as cutOff } from "./child-Dtv76jNx.js";
2
- import { d as guardRepeatedCalls } from "./hooks-DTjHWTfx.js";
1
+ import { C as cutOff, w as finishOf } from "./child-C9nPIy9j.js";
2
+ import { d as guardRepeatedCalls } from "./hooks-BpLN_hhT.js";
3
3
  import { ReasoningEffortId, createUserMessage } from "@deepseek-ai/dsh-llm";
4
4
  // src/host/authoring/turn-guard.ts
5
5
  /**
@@ -49,4 +49,4 @@ function guardAuthoringTurns(ctx, prompts, languageOf, reasoning = () => "") {
49
49
  }
50
50
  export { guardAuthoringTurns as t };
51
51
 
52
- //# sourceMappingURL=turn-guard-BzNeGNnc.js.map
52
+ //# sourceMappingURL=turn-guard-B9pGCeir.js.map
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@dsh-agentic-roleplay/core",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "Core plugin of the agentic roleplay bundle for DeepSeek Harness: roleplay UI, orchestration and storage.",
5
5
  "author": {
6
6
  "name": "Firefox2100",
7
7
  "url": "https://github.com/Firefox2100"
8
8
  },
9
9
  "type": "module",
10
+ "icon": "./icon.svg",
10
11
  "main": "lib/index.js",
11
12
  "exports": {
12
13
  ".": "./lib/index.js",
@@ -60,6 +61,7 @@
60
61
  "registry": "https://registry.npmjs.org/"
61
62
  },
62
63
  "files": [
64
+ "icon.svg",
63
65
  "lib/*.js",
64
66
  "packs",
65
67
  "prompts",
@@ -76,7 +78,7 @@
76
78
  "@deepseek-ai/schemastery": "^3.18.5"
77
79
  },
78
80
  "dependencies": {
79
- "@dsh-agentic-roleplay/state": "0.10.0",
81
+ "@dsh-agentic-roleplay/state": "0.10.2",
80
82
  "@dsh-ai-providers/core": "^0.5.0"
81
83
  },
82
84
  "devDependencies": {
@@ -1 +1,7 @@
1
- A person is about to start a story as the character described below. Read the opening and the first scene: where the character is, who and what is there, what the character is doing or wants. Is it enough for the person to know where they are and to have something to do, a person to talk to, a problem to face or a want to follow, for the first move? It is not enough when the opening is missing or only sets a mood, when nothing in the place invites action, or when it is unclear who the player is. Being able to walk somewhere else (a way out) is not something to do. Answer yes when it is enough, and give the reason in a sentence.
1
+ A person is about to start a story as the character described below. Read the opening and the first scene: where the character is, who and what is there, what the character is doing or wants. Is it enough for the person to know where they are and to have something to do, a person to talk to, a problem to face or a want to follow, for the first move?
2
+
3
+ It is not enough when the opening is missing, a single word, or only sets a mood; when the character has no want and is doing nothing; when nobody is in the place and nothing in it invites a look or a use; or when it is unclear who the player is. A way out is not something to do: being able to go elsewhere is only a road, not a reason to act, so do not answer yes because exits are listed. If nothing but the exits gives the person something to do, answer no.
4
+
5
+ It is enough when there is at least a person to talk to, a problem to face or something the character clearly wants, and the person knows where they are.
6
+
7
+ Answer yes when it is enough and no when it is not, and give the reason in a sentence.
@@ -0,0 +1 @@
1
+ A fact and a text are given, and sometimes the subject the text is about. Does the text state the fact, in any wording or language? Judge the fact as it is given: a fact that holds a cause, a number or a name that the text leaves out is not stated, even when the rest of it is. A text that only mentions the same person or place without stating the fact does not either. When a subject is given and the fact is about someone or something else, it is not the text's to state: answer yes. Answer yes when the text says it, and give the reason in a sentence.
@@ -24,4 +24,5 @@ What to write:
24
24
  - beliefs: only when a character clearly learns, suspects or concludes something beyond the single event; written from that character's point of view; kind is belief, relationship or knowledge.
25
25
  - entity knowledge: the graph is closed-world. A relationship profile means its from-character knows the to-character. For a place, item or directed exit newly learned by being told, reading, or inference, add knowledge (character, kind; subject for a place/item, from+to for an exit). Ordinary sight and movement are recorded automatically. Knowledge means only that the entity exists, never where it is now or its current state. Do not retract it merely because information became stale.
26
26
  - factions: faction_states changes an organisation's durable public or private institutional condition; faction_memberships records joining, leaving, role, rank, visibility and commitment; faction_relationships records a character's or faction's directional view of a faction or character and is also the awareness edge. Apply the same concrete-cause and directional rules as character relationships: a member's act does not automatically change the faction's view, nor the reverse. faction_intents_added records a durable strategic goal adopted by an organisation. A faction goal pressures members but never means every member knows it or must act on it.
27
- - threads_opened: only a promise, mystery or goal that the rounds clearly leave unsettled and that is not already open. threads_resolved: ids of open threads that the rounds settle.
27
+ - threads_opened: only a promise, mystery or goal that the rounds clearly leave unsettled and that is not already open; a thread that only restates an open one is refused, and one that looks similar but is a separate matter goes in threads_distinct. threads_resolved: ids of open threads that the rounds settle.
28
+ - thread knowledge: a thread is the story's own note and stays secret until the player's character has been told of it, has seen it, or has taken it on. A thread the player's character already knows of when you open it goes in threads_opened_known instead of threads_opened; the ids of open threads the character has just learned of go in threads_known (read_records shows player_knows for each). Never mark a thread because the story only hints at it, because other characters know it, or because the narration implies it: a secret stays in threads_opened and unmarked.
@@ -1 +1,7 @@
1
- 有人即将以下面描述的角色开始一个故事。请读开场白和第一个场景:角色在哪里,那里有谁、有什么,角色正在做什么或想要什么。对这个人来说,这些够不够让他知道自己身在何处,并为第一步找到事做——一个可以交谈的人、一个要面对的问题,或一个可以追随的愿望?不够,是指开场白缺失或只渲染气氛、地点里没有任何东西引人行动,或者看不出玩家是谁。能走去别处(有出口)不算有事可做。足够就回答是,并用一句话说明理由。
1
+ 有人即将以下面描述的角色开始一个故事。请读开场白和第一个场景:角色在哪里,那里有谁、有什么,角色正在做什么或想要什么。对这个人来说,这些够不够让他知道自己身在何处,并为第一步找到事做——一个可以交谈的人、一个要面对的问题,或一个可以追随的愿望?
2
+
3
+ 不够的情形:开场白缺失,或只有一个词、只渲染气氛;角色没有写出任何想要的东西,也没有在做什么;地点里没有人,也没有任何可以查看、使用的东西;看不出玩家是谁。出口和去处不算有事可做:“可以去别处”只是路,不是行动的理由,不要因为列出了出路就回答够。如果除了出路之外找不到任何可做的事,就回答否。
4
+
5
+ 足够的情形:至少有一个人可以交谈,或一个要面对的问题,或角色明确想做的事,并且知道自己在哪里。
6
+
7
+ 足够就回答是,否则回答否,并用一句话说明理由。
@@ -0,0 +1 @@
1
+ 下面给出一个事实和一段文字,有时还给出这段文字所写的对象。这段文字说出了这个事实吗?不论措辞或语言。按给出的事实原样判断:事实里含有原因、数字或名字,而文字没有写,即使其余部分写了,也不算说出。文字只是提到同一个人或地点、却没有陈述这个事实,同样不算。给出了对象、而事实说的是别的人或事物时,那不是这段文字要写的内容:回答是。文字说了就回答是,并用一句话说明理由。