@dsh-agentic-roleplay/core 0.5.0 → 0.6.1

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/lib/access-EbNdZFbk.js +25 -0
  2. package/lib/{authoring-tools-Ch_3oIKC.js → authoring-tools-BGzzW6O5.js} +5 -5
  3. package/lib/authoring.js +5 -5
  4. package/lib/{access-tN5D3WI8.js → child-D5SVNk4O.js} +58 -78
  5. package/lib/client.js +819 -327
  6. package/lib/client.js.map +1 -1
  7. package/lib/compaction.js +3 -2
  8. package/lib/doctor.js +3 -3
  9. package/lib/helper.js +26 -0
  10. package/lib/{hooks-C7gt2c01.js → hooks-BLperIIB.js} +70 -7
  11. package/lib/images.js +1 -1
  12. package/lib/index.js +43 -11
  13. package/lib/{lorebook-author-tools-DII7Xt7Q.js → lorebook-author-tools-C-cFiE6E.js} +5 -5
  14. package/lib/lorebook-authoring.js +3 -3
  15. package/lib/{narration-DstnwrvX.js → narration-_dA9oIt2.js} +57 -2
  16. package/lib/orchestration.js +364 -46
  17. package/lib/{pack-jail-AzR6dCNm.js → pack-jail-BKFmbYP8.js} +8 -8
  18. package/lib/{packs-C7g534Mi.js → packs-ZTG7fWut.js} +2 -2
  19. package/lib/{presenter-agent-BsC6Vftz.js → presenter-agent-BHSbyWwZ.js} +3 -2
  20. package/lib/{preset-Drfu_K-H.js → preset-CJLW8Mp0.js} +3 -3
  21. package/lib/{preset-author-tools-CdIsFhQw.js → preset-author-tools-1RstgEZs.js} +5 -5
  22. package/lib/preset-authoring.js +4 -4
  23. package/lib/{presets-CADd77WB.js → presets-DcPCnn8O.js} +3 -3
  24. package/lib/{reflection-CUGuPAZR.js → reflection-6qfOC5OT.js} +235 -31
  25. package/package.json +4 -3
  26. package/prompts/en/roleplay/check-rule.md +3 -0
  27. package/prompts/en/roleplay/decide-reflection.md +3 -0
  28. package/prompts/en/roleplay/decide-trigger.md +3 -0
  29. package/prompts/en/roleplay/gate-agency.md +1 -0
  30. package/prompts/en/roleplay/gate-refusal.md +1 -0
  31. package/prompts/en/roleplay/gate-secret.md +3 -0
  32. package/prompts/zh/roleplay/check-rule.md +3 -0
  33. package/prompts/zh/roleplay/decide-reflection.md +3 -0
  34. package/prompts/zh/roleplay/decide-trigger.md +3 -0
  35. package/prompts/zh/roleplay/gate-agency.md +1 -0
  36. package/prompts/zh/roleplay/gate-refusal.md +1 -0
  37. package/prompts/zh/roleplay/gate-secret.md +3 -0
@@ -1,10 +1,11 @@
1
- import { _ as roleplaySessionOf, a as childTrace, m as estimateAnswer, n as childModel, o as runChild, r as childSampling, t as promptFor } from "./access-tN5D3WI8.js";
2
- import { f as sha, o as listPresets, s as loadPreset } from "./presets-CADd77WB.js";
3
- import "./narration-DstnwrvX.js";
4
- import { E as describeWhen, L as wrongLanguage, T as describeTime, X as inheritPrompts, k as answerLimits, lt as languageOf, q as PROMPTS_FOLDER, ut as translator } from "./hooks-C7gt2c01.js";
1
+ import { r as roleplaySessionOf, t as promptFor } from "./access-EbNdZFbk.js";
2
+ import { f as sha, o as listPresets, s as loadPreset } from "./presets-DcPCnn8O.js";
3
+ import "./narration-_dA9oIt2.js";
4
+ import { A as answerLimits, D as describeWhen, E as describeTime, J as PROMPTS_FOLDER, R as wrongLanguage, Z as inheritPrompts, dt as translator, ut as languageOf } from "./hooks-BLperIIB.js";
5
5
  import { t as trimCharacters } from "./text-CT1re6XT.js";
6
+ import { i as childTrace, m as estimateAnswer, n as childSampling, o as runChild, t as childModel } from "./child-D5SVNk4O.js";
6
7
  import { a as inheritImages } from "./library-DsDc6fQa.js";
7
- import { i as inheritPacks } from "./packs-C7g534Mi.js";
8
+ import { i as inheritPacks } from "./packs-ZTG7fWut.js";
8
9
  import { dirname, join } from "node:path";
9
10
  import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
10
11
  import { createUserMessage } from "@deepseek-ai/dsh-llm";
@@ -566,6 +567,10 @@ const declinesToAuthor = {
566
567
  const factionsStayPut = { strategize: () => Promise.resolve({ acted: [] }) };
567
568
  /** Reflects on nothing: without a reflector what characters believe changes only through what the story records. */
568
569
  const reflectsOnNothing = { reflect: () => Promise.resolve({ characters: [] }) };
570
+ /** Finds no fault: without a gate the output is delivered as the game master wrote it. */
571
+ const passesEverything = { check: () => Promise.resolve([]) };
572
+ /** Finds no broken rule: without a check the game master's judgement of an action stands as it is. */
573
+ const breaksNoRule = { check: () => Promise.resolve([]) };
569
574
  /** Judges nothing: without a judge a trigger that waits on a statement never sees it hold. */
570
575
  const judgesNothing = { judge: () => Promise.resolve({ judged: 0 }) };
571
576
  /** Offers nothing: without a suggester the player writes their own move. */
@@ -584,6 +589,8 @@ function defaultBoundaries() {
584
589
  strategist: factionsStayPut,
585
590
  reflector: reflectsOnNothing,
586
591
  judge: judgesNothing,
592
+ outputGate: passesEverything,
593
+ ruleCheck: breaksNoRule,
587
594
  suggester: offersNothing,
588
595
  recaller: recordsRecall,
589
596
  sceneContext: castSummary
@@ -1122,6 +1129,166 @@ var Timelines = class {
1122
1129
  }
1123
1130
  };
1124
1131
  //#endregion
1132
+ //#region src/host/decisions/route.ts
1133
+ /** The probability from which a yes is taken as a yes, for the confidence a chat asks. */
1134
+ const yesAt = (confidence) => (1 + confidence) / 2;
1135
+ /** The probability up to which a no is taken as a no. */
1136
+ const noAt = (confidence) => (1 - confidence) / 2;
1137
+ const clip = (text) => text.length > 120 ? `${text.slice(0, 119)}…` : text;
1138
+ const reportOf = (mode, items) => ({
1139
+ mode,
1140
+ items,
1141
+ decided: 0,
1142
+ escalated: 0,
1143
+ fallbacks: 0,
1144
+ agreed: 0,
1145
+ disagreed: 0,
1146
+ decisionMs: 0,
1147
+ llmMs: 0,
1148
+ samples: []
1149
+ });
1150
+ async function timed(run) {
1151
+ const started = performance.now();
1152
+ return {
1153
+ value: await run(),
1154
+ ms: Math.round(performance.now() - started)
1155
+ };
1156
+ }
1157
+ /**
1158
+ * Gives each key a verdict the way its site is set to: from the language model, from the decision model, from the decision model where it
1159
+ * is confident and the language model elsewhere, or from the language model while comparing it with the decision model. A decision model
1160
+ * that cannot be used never stops a story: its keys go to the language model and the report says why.
1161
+ */
1162
+ async function routeVerdicts(route, signal) {
1163
+ const { mode, keys } = route;
1164
+ const report = reportOf(mode, keys.length);
1165
+ const verdicts = /* @__PURE__ */ new Map();
1166
+ if (keys.length === 0) return {
1167
+ verdicts,
1168
+ report
1169
+ };
1170
+ const viaLlm = async (subset) => {
1171
+ const { value, ms } = await timed(() => route.llm(subset));
1172
+ report.llmMs += ms;
1173
+ for (const [key, verdict] of value) verdicts.set(key, verdict);
1174
+ };
1175
+ const viaDecision = async () => {
1176
+ try {
1177
+ const { value, ms } = await timed(() => route.probabilities(keys));
1178
+ report.decisionMs += ms;
1179
+ return value;
1180
+ } catch (error) {
1181
+ if (signal.aborted) throw error;
1182
+ report.problem = error instanceof Error ? error.message : String(error);
1183
+ return;
1184
+ }
1185
+ };
1186
+ if (mode === "llm") {
1187
+ await viaLlm(keys);
1188
+ return {
1189
+ verdicts,
1190
+ report
1191
+ };
1192
+ }
1193
+ if (mode === "shadow") {
1194
+ const [decided] = await Promise.all([viaDecision(), viaLlm(keys)]);
1195
+ if (decided === void 0) return {
1196
+ verdicts,
1197
+ report
1198
+ };
1199
+ for (const key of keys) {
1200
+ const probability = decided.get(key);
1201
+ const llm = verdicts.get(key);
1202
+ if (probability === void 0 || llm === void 0) continue;
1203
+ const decision = probability >= route.yesAt;
1204
+ if (decision === llm) report.agreed += 1;
1205
+ else {
1206
+ report.disagreed += 1;
1207
+ if (report.samples.length < 20) report.samples.push({
1208
+ turn: route.turn,
1209
+ what: clip(route.what(key)),
1210
+ probability: Math.round(probability * 1e3) / 1e3,
1211
+ decision,
1212
+ llm
1213
+ });
1214
+ }
1215
+ }
1216
+ return {
1217
+ verdicts,
1218
+ report
1219
+ };
1220
+ }
1221
+ const decided = await viaDecision();
1222
+ if (decided === void 0) {
1223
+ report.fallbacks = keys.length;
1224
+ await viaLlm(keys);
1225
+ return {
1226
+ verdicts,
1227
+ report
1228
+ };
1229
+ }
1230
+ const unsure = [];
1231
+ for (const key of keys) {
1232
+ const probability = decided.get(key);
1233
+ if (probability === void 0) {
1234
+ unsure.push(key);
1235
+ continue;
1236
+ }
1237
+ if (mode === "hybrid" && probability > route.noAt && probability < route.yesAt) unsure.push(key);
1238
+ else verdicts.set(key, probability >= route.yesAt);
1239
+ }
1240
+ report.decided = keys.length - unsure.length;
1241
+ report.escalated = unsure.length;
1242
+ if (unsure.length > 0) await viaLlm(unsure);
1243
+ return {
1244
+ verdicts,
1245
+ report
1246
+ };
1247
+ }
1248
+ /** Asks the decision model one yes-or-no question for each key about one state, in a single request; the answers are probabilities of yes. */
1249
+ async function askYesNo(service, state, asks, signal) {
1250
+ const questions = Object.fromEntries(asks.map(({ key, instructions }) => [key, {
1251
+ type: "noul",
1252
+ instructions
1253
+ }]));
1254
+ const { answers } = await service.decide(state, questions, {
1255
+ priority: "background",
1256
+ signal
1257
+ });
1258
+ return new Map(asks.map(({ key }) => [key, answers[key].probability]));
1259
+ }
1260
+ /**
1261
+ * Says once, through `say`, why a site's decision model could not be used, and again only when the reason changes, so that a story
1262
+ * played on without the service does not fill the log.
1263
+ */
1264
+ function announceProblem(seen, key, report, say) {
1265
+ if (report.problem === void 0) {
1266
+ seen.delete(key);
1267
+ return;
1268
+ }
1269
+ if (seen.get(key) === report.problem) return;
1270
+ seen.set(key, report.problem);
1271
+ say?.(`the decision model could not be used for ${key}, the language model judged instead: ${report.problem}`);
1272
+ }
1273
+ /** The reports of several routed runs of one site as one: counts and times added, the disagreements kept up to the limit, the latest problem. */
1274
+ function mergeReports(mode, reports) {
1275
+ const merged = reportOf(mode, 0);
1276
+ for (const report of reports) {
1277
+ merged.items += report.items;
1278
+ merged.decided += report.decided;
1279
+ merged.escalated += report.escalated;
1280
+ merged.fallbacks += report.fallbacks;
1281
+ merged.agreed += report.agreed;
1282
+ merged.disagreed += report.disagreed;
1283
+ merged.decisionMs += report.decisionMs;
1284
+ merged.llmMs += report.llmMs;
1285
+ merged.samples.push(...report.samples);
1286
+ if (report.problem !== void 0) merged.problem = report.problem;
1287
+ }
1288
+ merged.samples = merged.samples.slice(-20);
1289
+ return merged;
1290
+ }
1291
+ //#endregion
1125
1292
  //#region src/host/orchestration/whereabouts.ts
1126
1293
  const within = (inner, outer, places) => {
1127
1294
  const byId = new Map(places.map((place) => [place.id, place]));
@@ -1872,6 +2039,7 @@ function brief(session, material, doubted, now, zone, time, tr) {
1872
2039
  * and leaves the characters not yet done as they were.
1873
2040
  */
1874
2041
  function memoryReflector(deps) {
2042
+ const seen = /* @__PURE__ */ new Map();
1875
2043
  return { async reflect(job, signal) {
1876
2044
  const parent = deps.agentOf(job.chat);
1877
2045
  if (parent === void 0) throw new Error(`no agent for chat ${job.chat}`);
@@ -1892,37 +2060,73 @@ function memoryReflector(deps) {
1892
2060
  const shown = shownOf(session, material);
1893
2061
  const found = [];
1894
2062
  let checked = 0;
2063
+ const reports = [];
1895
2064
  for (const belief of material.beliefs) {
1896
2065
  const near = bearingOn(belief, material.fresh);
1897
2066
  if (near.length === 0 || checked >= MAX_CHECKS) continue;
1898
2067
  checked += 1;
1899
- const things = near.flatMap((id) => shown.perceptions.get(id) ?? []);
1900
- let verdict;
1901
- try {
1902
- verdict = await runChild({
1903
- parent,
1904
- signal,
1905
- reasoningEffort: settings.reasoning.children,
1906
- sampling: childSampling(settings, "records", estimateAnswer([MAX_TEXT * 2, 100], settings.prompts.language)),
1907
- ...childModel(settings, "records"),
1908
- trace: childTrace(store, "records", `reflection check ${material.character.name} b${belief.id}`),
1909
- persona: promptFor(parent, "roleplay/reflection-check", settings.prompts.language),
1910
- prompt: checkBrief(material.character, belief, things, now, zone, (turn, round) => session.clock.at(turn, round), tr),
1911
- result: CHECK_RESULT,
1912
- beforeSubmit: (value) => {
1913
- const problem = checkProblem(value, belief, shown, new Set(near), tr);
1914
- return problem === void 0 ? void 0 : tr("not acceptable: {problems}", { problems: problem });
1915
- },
1916
- maxCalls: 2
1917
- });
1918
- } catch (error) {
1919
- if (signal.aborted) throw error;
1920
- }
1921
- if (verdict?.verdict === "contradicted") found.push({
2068
+ const askLanguageModel = async (ids) => {
2069
+ const things = ids.flatMap((id) => shown.perceptions.get(id) ?? []);
2070
+ let verdict;
2071
+ try {
2072
+ verdict = await runChild({
2073
+ parent,
2074
+ signal,
2075
+ reasoningEffort: settings.reasoning.children,
2076
+ sampling: childSampling(settings, "records", estimateAnswer([MAX_TEXT * 2, 100], settings.prompts.language)),
2077
+ ...childModel(settings, "records"),
2078
+ trace: childTrace(store, "records", `reflection check ${material.character.name} b${belief.id}`),
2079
+ persona: promptFor(parent, "roleplay/reflection-check", settings.prompts.language),
2080
+ prompt: checkBrief(material.character, belief, things, now, zone, (turn, round) => session.clock.at(turn, round), tr),
2081
+ result: CHECK_RESULT,
2082
+ beforeSubmit: (value) => {
2083
+ const problem = checkProblem(value, belief, shown, new Set(ids), tr);
2084
+ return problem === void 0 ? void 0 : tr("not acceptable: {problems}", { problems: problem });
2085
+ },
2086
+ maxCalls: 2
2087
+ });
2088
+ } catch (error) {
2089
+ if (signal.aborted) throw error;
2090
+ }
2091
+ const named = new Set(verdict?.verdict === "contradicted" ? verdict.things : []);
2092
+ return new Map(ids.map((id) => [id, named.has(id)]));
2093
+ };
2094
+ const askDecisionModel = async (ids) => {
2095
+ const service = deps.decisions?.();
2096
+ if (service === void 0) throw new Error("no decision service is selected, or the selected one is not loaded");
2097
+ const askable = ids.filter((id) => (shown.perceptions.get(id)?.event.turn ?? -1) >= belief.turn);
2098
+ const answers = askable.length === 0 ? /* @__PURE__ */ new Map() : await askYesNo(service, {
2099
+ held_by: referent(material.character),
2100
+ belief: belief.text,
2101
+ things: Object.fromEntries(askable.map((id) => [`p${id}`, shown.perceptions.get(id).perception.content]))
2102
+ }, askable.map((id) => ({
2103
+ key: `p${id}`,
2104
+ instructions: store.text("roleplay/decide-reflection", { thing: `p${id}` })
2105
+ })), signal);
2106
+ return new Map(ids.map((id) => [id, answers.get(`p${id}`) ?? 0]));
2107
+ };
2108
+ const routed = await routeVerdicts({
2109
+ mode: settings.decisions.reflection,
2110
+ yesAt: yesAt(settings.decisions.confidence),
2111
+ noAt: noAt(settings.decisions.confidence),
2112
+ turn: job.turn,
2113
+ keys: near,
2114
+ what: (id) => `${belief.text} / ${shown.perceptions.get(id)?.perception.content ?? ""}`,
2115
+ probabilities: askDecisionModel,
2116
+ llm: askLanguageModel
2117
+ }, signal);
2118
+ reports.push(routed.report);
2119
+ const contradicted = [...routed.verdicts].filter(([, yes]) => yes).map(([id]) => id);
2120
+ if (contradicted.length > 0) found.push({
1922
2121
  belief: belief.id,
1923
- things: verdict.things
2122
+ things: contradicted
1924
2123
  });
1925
2124
  }
2125
+ if (reports.length > 0) {
2126
+ const merged = mergeReports(settings.decisions.reflection, reports);
2127
+ announceProblem(seen, `${job.chat}:reflection`, merged, deps.problem);
2128
+ store.recordDecisions?.("reflection", merged);
2129
+ }
1926
2130
  const doubted = new Set(found.map((entry) => entry.belief));
1927
2131
  const proposal = withDoubts(settleProposal(await runChild({
1928
2132
  parent,
@@ -1994,6 +2198,6 @@ function memoryReflector(deps) {
1994
2198
  } };
1995
2199
  }
1996
2200
  //#endregion
1997
- export { whereabouts as a, copyPreset as c, switchPreset as d, readTimeline as f, referent as g, sameWords as h, reflectionStatus as i, presetStatus as l, defaultBoundaries as m, memoryReflector as n, TimelineError as o, pathTo as p, recordFailure as r, Timelines as s, dueReflection as t, recordPreset as u };
2201
+ export { readTimeline as _, whereabouts as a, sameWords as b, noAt as c, TimelineError as d, Timelines as f, switchPreset as g, recordPreset as h, reflectionStatus as i, routeVerdicts as l, presetStatus as m, memoryReflector as n, announceProblem as o, copyPreset as p, recordFailure as r, askYesNo as s, dueReflection as t, yesAt as u, pathTo as v, referent as x, defaultBoundaries as y };
1998
2202
 
1999
- //# sourceMappingURL=reflection-CUGuPAZR.js.map
2203
+ //# sourceMappingURL=reflection-6qfOC5OT.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-agentic-roleplay/core",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
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",
@@ -16,6 +16,7 @@
16
16
  "./lorebook-authoring": "./lib/lorebook-authoring.js",
17
17
  "./doctor": "./lib/doctor.js",
18
18
  "./compaction": "./lib/compaction.js",
19
+ "./helper": "./lib/helper.js",
19
20
  "./images": "./lib/images.js",
20
21
  "./client": "./lib/client.js",
21
22
  "./package.json": "./package.json"
@@ -75,8 +76,8 @@
75
76
  "@deepseek-ai/schemastery": "^3.18.5"
76
77
  },
77
78
  "dependencies": {
78
- "@dsh-agentic-roleplay/state": "0.5.0",
79
- "@dsh-ai-providers/core": "^0.3.0"
79
+ "@dsh-agentic-roleplay/state": "0.6.1",
80
+ "@dsh-ai-providers/core": "^0.5.0"
80
81
  },
81
82
  "devDependencies": {
82
83
  "@deepseek-ai/cordis": "^4.0.5",
@@ -0,0 +1,3 @@
1
+ You check one action of an interactive story against one rule of the world. The rule is: ${rule}
2
+
3
+ The action is what the player's character tries to do, as the player wrote it. You work only from the action and the rule: never add a fact that is not in them. The action breaks the rule when carrying it out would need what the rule excludes, or would do what the rule forbids. It does not break the rule when it only comes near it, or is about something else. Read the rule literally. When in doubt, it does not break the rule.
@@ -0,0 +1,3 @@
1
+ You compare one belief of a character in an interactive story with one thing the character took in after they formed it. You work only from what you are shown: never add a fact that is not in it. The belief is what the character holds to be true; it may be wrong. The thing contradicts the belief when, if the thing is true, the belief cannot be: the two cannot both be true, even when it was not meant as a contradiction (a boat that was never untied cannot have been taken). A thing that adds to the belief, repeats it, is about something else, shows a different side of the same people, or is merely surprising or in tension with the belief does not contradict it. Example of a contradiction: the belief "the mayor never visits the observatory" and "the mayor admits she visits it every night". Examples of no contradiction: the belief "she trusts him with the watch" and "she goes up to the observatory at night" (both can be true); the belief "he is honest" and "he kept a secret" (a secret is not a lie). When in doubt, the belief and the thing agree.
2
+
3
+ The thing to compare with the belief is the one numbered ${thing}.
@@ -0,0 +1,3 @@
1
+ You judge one statement about an interactive story: does the statement hold in the story right now? You work only from the recorded events and from where each character is and what they are doing, which you are shown: never add a fact that is not in it. A statement holds only when what you are shown establishes it. When it is not established, or only hinted at, it does not hold; when it was established and has since stopped being true, it does not hold either. Do not guess what may happen next, and do not judge what the characters ought to do.
2
+
3
+ The statement: ${statement}
@@ -0,0 +1 @@
1
+ You check one passage of narration from an interactive story for one fault: it speaks, acts, thinks or feels for the player's character beyond what the player wrote. You work only from the player's message and the passage you are shown: never add a fact that is not in it. The player decides what their own character does, says, thinks and feels. The passage is at fault when it gives the player's character new words, actions, decisions, thoughts or feelings that the player's message does not state. It is not at fault when it describes the world, the other characters and what they do and say, the results of what the player's character did, what the player's character sees or hears, or a bodily sensation that follows directly from what happened, or when it only restates what the player's message already says. When in doubt, it is not at fault.
@@ -0,0 +1 @@
1
+ You check one passage of an interactive story for one fault: it steps out of the story. You work only from the passage you are shown: never add a fact that is not in it. The passage is at fault when it refuses to continue, apologises for what comes next, adds a content warning, a disclaimer or a moral comment, speaks as an AI model or an assistant, mentions its instructions, or addresses the player outside the story. It is not at fault when a character inside the story refuses, warns or objects, or when violent, dark or uncomfortable events are simply told as part of the story. When in doubt, it is not at fault.
@@ -0,0 +1,3 @@
1
+ You check one passage of an interactive story for one fault: it gives away a hidden fact that the player's character does not know yet. The hidden fact is: ${secret}
2
+
3
+ You work only from the passage you are shown: never add a fact that is not in it. The passage is at fault when it states this fact, or something that plainly amounts to it, as true or as certain, in the narration or in what a character says. It is not at fault when it only touches the same people or places, hints, raises a suspicion or a rumour, or has a character guess without being sure. When in doubt, it is not at fault.
@@ -0,0 +1,3 @@
1
+ 你要把互动故事中的一个行动与世界的一条规则对照检查。这条规则是:${rule}
2
+
3
+ 这个行动是玩家的角色想要做的事,按玩家所写。你只依据这个行动和这条规则:绝不添加其中没有的事实。如果要做成这个行动就需要规则所排除的东西,或者会做出规则所禁止的事,这个行动就违反了规则。如果它只是接近规则,或者说的是别的事,就没有违反。按字面理解规则。拿不准时,视为没有违反。
@@ -0,0 +1,3 @@
1
+ 你要把互动故事中一个角色的一个信念,与角色在形成这个信念之后了解到的一件事进行比较。你只依据所给的内容:绝不添加其中没有的事实。信念是角色认为真实的事,它可能是错的。如果这件事为真,信念就不可能为真,那么这件事就与信念矛盾:两者不可能同时成立,即使并非有意为之也一样(一条从未解开缆绳的船不可能被开走)。如果这件事是对信念的补充、重复,讲的是别的事,展示了同一些人的另一面,或者只是令人意外、与信念有些冲突,那就不算矛盾。矛盾的例子:信念“市长从不去天文台”与“市长承认她每天晚上都去那里”。不矛盾的例子:信念“她信任他,让他值夜班”与“她夜里上了天文台”(两者可以同时为真);信念“他是个诚实的人”与“他隐瞒了一个秘密”(保守秘密不等于撒谎)。拿不准时,视为信念与这件事一致。
2
+
3
+ 要与信念比较的事,是编号为 ${thing} 的那一件。
@@ -0,0 +1,3 @@
1
+ 你要判断关于一个互动故事的一条陈述:这条陈述现在在故事中成立吗?你只依据所给的已记录事件,以及每个角色在哪里、正在做什么:绝不添加其中没有的事实。只有所给内容明确确立了陈述,它才成立。如果没有被确立、或者只是被暗示,它就不成立;如果它曾被确立、但之后不再为真,它同样不成立。不要猜测接下来可能发生什么,也不要评判角色应该做什么。
2
+
3
+ 要判断的陈述:${statement}
@@ -0,0 +1 @@
1
+ 你要检查互动故事中的一段叙述有没有一个毛病:它超出了玩家所写的内容,替玩家的角色说话、行动、思考或感受。你只依据玩家的消息和所给的这段叙述:绝不添加其中没有的事实。玩家的角色做什么、说什么、想什么、感受什么,由玩家决定。如果这段叙述给了玩家的角色玩家消息中没有写到的新话语、新动作、新决定、新想法或新感受,就是有毛病。如果它描写的是世界、其他角色及其言行、玩家角色所做之事的结果、玩家角色看到或听到的东西,或由所发生的事直接引起的身体感觉,或者只是复述玩家消息已经写到的内容,就没有毛病。拿不准时,视为没有毛病。
@@ -0,0 +1 @@
1
+ 你要检查互动故事中的一段文字有没有一个毛病:它跳出了故事。你只依据所给的这段文字:绝不添加其中没有的事实。如果这段文字拒绝继续、为接下来的内容道歉、加上内容警告、免责声明或道德评论、以 AI 模型或助手的身份说话、提到自己的指令,或在故事之外对玩家说话,就是有毛病。如果只是故事里的角色拒绝、警告或反对,或者暴力、阴暗、令人不适的情节只是作为故事的一部分被讲述,就没有毛病。拿不准时,视为没有毛病。
@@ -0,0 +1,3 @@
1
+ 你要检查互动故事中的一段文字有没有一个毛病:它泄露了玩家的角色目前还不知道的一个隐藏事实。这个隐藏事实是:${secret}
2
+
3
+ 你只依据所给的这段文字:绝不添加其中没有的事实。如果这段文字在叙述中或角色的话里,把这个事实或明显等同于它的内容当作真实或确定的事情说了出来,就是有毛病。如果它只是涉及同样的人或地点、只是暗示、只是引起怀疑或传闻,或者让角色在没有把握时猜测,就没有毛病。拿不准时,视为没有毛病。