@dsh-agentic-roleplay/core 0.8.2 → 0.9.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.
- package/lib/{authoring-tools-BgmC2oqU.js → authoring-tools-C_l07RYn.js} +2568 -53
- package/lib/authoring.js +145 -38
- package/lib/client.js +327 -327
- package/lib/doctor.js +1 -1
- package/lib/{gallery-D1V4h8vh.js → gallery-q7niLtWn.js} +2 -2
- package/lib/{generator-CLPosooC.js → generator-BpjPrvHe.js} +2 -2
- package/lib/{hooks-rQTTeOC4.js → hooks-DNaDzMjW.js} +38 -5
- package/lib/images.js +4 -4
- package/lib/index.js +14 -14
- package/lib/{library-Dfu0dgRj.js → library-CIkxhf_R.js} +5 -3
- package/lib/{lorebook-author-tools-BAaAqZZm.js → lorebook-author-tools-BiMDmdFi.js} +6 -6
- package/lib/lorebook-authoring.js +4 -4
- package/lib/orchestration.js +8 -8
- package/lib/{pack-jail-CN-314ln.js → pack-jail-B35Vx3hT.js} +36 -728
- package/lib/{packs-DIj5BEfq.js → packs-BajKw7S9.js} +2 -2
- package/lib/{presenter-agent-DR0KvLE0.js → presenter-agent-jgtuTwZr.js} +4 -4
- package/lib/{preset-CscHj1-Y.js → preset-DWgkcPau.js} +3 -3
- package/lib/{preset-author-tools-CxluF8qc.js → preset-author-tools-BhuYIKms.js} +6 -6
- package/lib/preset-authoring.js +5 -5
- package/lib/{presets-HB8kJTaE.js → presets-9GzaSELc.js} +32 -12
- package/lib/{reflection-Dg1xtOTW.js → reflection-4L0Plvct.js} +6 -6
- package/lib/{text-DyRN4nDP.js → text-CbGQhK1-.js} +4 -3
- package/lib/{turn-guard-g_hDn0jR.js → turn-guard-sCUXmp-5.js} +2 -2
- package/package.json +2 -2
- package/prompts/en/checks/conflict.md +1 -0
- package/prompts/en/checks/decide-conflict.md +1 -0
- package/prompts/en/checks/decide-covered.md +1 -0
- package/prompts/en/checks/decide-opening.md +1 -0
- package/prompts/en/checks/decide-same-thing.md +1 -0
- package/prompts/en/checks/decide-same-value.md +1 -0
- package/prompts/en/checks/decide-sheet.md +1 -0
- package/prompts/en/checks/fidelity.md +7 -0
- package/prompts/en/checks/gaps.md +4 -0
- package/prompts/en/checks/notice.md +3 -0
- package/prompts/en/import/finish-draft.md +1 -1
- package/prompts/en/import/finish-ok.md +3 -1
- package/prompts/en/import/notice-repair.md +2 -2
- package/prompts/en/import/repair-again.md +2 -2
- package/prompts/zh/checks/conflict.md +1 -0
- package/prompts/zh/checks/decide-conflict.md +1 -0
- package/prompts/zh/checks/decide-covered.md +1 -0
- package/prompts/zh/checks/decide-opening.md +1 -0
- package/prompts/zh/checks/decide-same-thing.md +1 -0
- package/prompts/zh/checks/decide-same-value.md +1 -0
- package/prompts/zh/checks/decide-sheet.md +1 -0
- package/prompts/zh/checks/fidelity.md +7 -0
- package/prompts/zh/checks/gaps.md +4 -0
- package/prompts/zh/checks/notice.md +3 -0
- package/prompts/zh/import/finish-draft.md +1 -1
- package/prompts/zh/import/finish-ok.md +3 -1
- package/prompts/zh/import/notice-repair.md +2 -2
- package/prompts/zh/import/repair-again.md +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as Reader } from "./hooks-
|
|
1
|
+
import { q as Reader } from "./hooks-DNaDzMjW.js";
|
|
2
2
|
import { dirname, extname, join, posix, sep } from "node:path";
|
|
3
3
|
import { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, renameSync } from "node:fs";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
@@ -836,4 +836,4 @@ function anyTab(bases) {
|
|
|
836
836
|
}
|
|
837
837
|
export { API_PREFIX as _, packIds as a, describePack as c, packPath as d, readPack as f, SURFACE_NAMES as g, PACK_MEDIA_TYPES as h, inheritPacks as i, isPackId as l, PACK_LIMITS as m, anyTab as n, syncWorldPacks as o, PACK_ACTIONS as p, copyWorldPacks as r, worldPackStates as s, activePack as t, packFile as u };
|
|
838
838
|
|
|
839
|
-
//# sourceMappingURL=packs-
|
|
839
|
+
//# sourceMappingURL=packs-BajKw7S9.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as promptFor } from "./access-CfQWbNZP.js";
|
|
2
2
|
import { c as runChild } from "./child-lYYeOwl2.js";
|
|
3
|
-
import { n as generateTransientImage, t as generateReferenceImage } from "./generator-
|
|
4
|
-
import { i as updateImage, n as galleryFile, r as listGallery } from "./gallery-
|
|
5
|
-
import { c as nextSceneSerial, u as referenceImagePath } from "./library-
|
|
3
|
+
import { n as generateTransientImage, t as generateReferenceImage } from "./generator-BpjPrvHe.js";
|
|
4
|
+
import { i as updateImage, n as galleryFile, r as listGallery } from "./gallery-q7niLtWn.js";
|
|
5
|
+
import { c as nextSceneSerial, u as referenceImagePath } from "./library-CIkxhf_R.js";
|
|
6
6
|
import { dirname, join, relative } from "node:path";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
8
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -846,4 +846,4 @@ async function runImagePresenter(job) {
|
|
|
846
846
|
}
|
|
847
847
|
export { tokensOf as a, searchImages as i, interpretImage as n, present as o, imageTools as r, presentedFor as s, runImagePresenter as t };
|
|
848
848
|
|
|
849
|
-
//# sourceMappingURL=presenter-agent-
|
|
849
|
+
//# sourceMappingURL=presenter-agent-jgtuTwZr.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Zt as ImportCardError, r as MAX_PREVIEW_TEXT } from "./authoring-tools-C_l07RYn.js";
|
|
2
2
|
import { l as SAMPLING_RANGES } from "./child-lYYeOwl2.js";
|
|
3
|
-
import { J as cleanText } from "./presets-
|
|
3
|
+
import { J as cleanText } from "./presets-9GzaSELc.js";
|
|
4
4
|
// src/host/import/preset.ts
|
|
5
5
|
/** The older preset layout keeps its texts under fixed keys. */
|
|
6
6
|
const LEGACY_KEYS = [
|
|
@@ -239,4 +239,4 @@ function selectPrompts(file, enabled, keepSampling) {
|
|
|
239
239
|
}
|
|
240
240
|
export { readPreset as n, selectPrompts as r, previewPreset as t };
|
|
241
241
|
|
|
242
|
-
//# sourceMappingURL=preset-
|
|
242
|
+
//# sourceMappingURL=preset-DWgkcPau.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./access-CfQWbNZP.js";
|
|
2
|
-
import { G as listWorldPrompts, K as readWorldPrompt, Q as IMPORT_FOLDER, U as PROSE_PROMPTS, W as deleteWorldPrompt, Z as withPlayer, c as presetDirectory, l as readPreset, p as updatePresetInfo, q as writeWorldPrompt, t as PRESET_FILE, x as extractStyleFrom } from "./presets-
|
|
3
|
-
import { n as readPreset$1 } from "./preset-
|
|
4
|
-
import { i as contextOf } from "./authoring-tools-
|
|
5
|
-
import { i as translator, r as languageOf } from "./text-
|
|
6
|
-
import { at as shippedPromptsDirectory, it as shippedLanguages, tt as languageOf$1 } from "./hooks-
|
|
2
|
+
import { G as listWorldPrompts, K as readWorldPrompt, Q as IMPORT_FOLDER, U as PROSE_PROMPTS, W as deleteWorldPrompt, Z as withPlayer, c as presetDirectory, l as readPreset, p as updatePresetInfo, q as writeWorldPrompt, t as PRESET_FILE, x as extractStyleFrom } from "./presets-9GzaSELc.js";
|
|
3
|
+
import { n as readPreset$1 } from "./preset-DWgkcPau.js";
|
|
4
|
+
import { i as contextOf } from "./authoring-tools-C_l07RYn.js";
|
|
5
|
+
import { i as translator, r as languageOf } from "./text-CbGQhK1-.js";
|
|
6
|
+
import { at as shippedPromptsDirectory, it as shippedLanguages, tt as languageOf$1 } from "./hooks-DNaDzMjW.js";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
9
9
|
import { readFile, rm } from "node:fs/promises";
|
|
@@ -278,4 +278,4 @@ async function presetApproval(exec, next, carries) {
|
|
|
278
278
|
}
|
|
279
279
|
export { presetChatSessionId as a, presetAuthorTools as i, narrationImportMessage as n, presetOfChat as o, presetApproval as r, PresetReader as t };
|
|
280
280
|
|
|
281
|
-
//# sourceMappingURL=preset-author-tools-
|
|
281
|
+
//# sourceMappingURL=preset-author-tools-BhuYIKms.js.map
|
package/lib/preset-authoring.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as limitAuthoringAgents } from "./authoring-tools-
|
|
2
|
-
import { t as guardAuthoringTurns } from "./turn-guard-
|
|
3
|
-
import { i as presetAuthorTools, o as presetOfChat, r as presetApproval, t as PresetReader } from "./preset-author-tools-
|
|
4
|
-
import "./hooks-
|
|
5
|
-
import { c as presetDirectory } from "./presets-
|
|
1
|
+
import { n as limitAuthoringAgents } from "./authoring-tools-C_l07RYn.js";
|
|
2
|
+
import { t as guardAuthoringTurns } from "./turn-guard-sCUXmp-5.js";
|
|
3
|
+
import { i as presetAuthorTools, o as presetOfChat, r as presetApproval, t as PresetReader } from "./preset-author-tools-BhuYIKms.js";
|
|
4
|
+
import "./hooks-DNaDzMjW.js";
|
|
5
|
+
import { c as presetDirectory } from "./presets-9GzaSELc.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
8
|
// src/preset-authoring.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as VARIABLE_VISIBILITIES, n as VARIABLE_KINDS, r as VARIABLE_SUBJECTS } from "./access-CfQWbNZP.js";
|
|
2
2
|
import "./narration-CjB_KwwY.js";
|
|
3
|
-
import { J as formatIssue, K as readDocument, X as LANGUAGE_FOLDER, Y as errorMessage, Z as PROMPTS_FOLDER, at as shippedPromptsDirectory, it as shippedLanguages, nt as listFiles, q as Reader, rt as promptProblem, tt as languageOf } from "./hooks-
|
|
3
|
+
import { J as formatIssue, K as readDocument, X as LANGUAGE_FOLDER, Y as errorMessage, Z as PROMPTS_FOLDER, at as shippedPromptsDirectory, it as shippedLanguages, nt as listFiles, q as Reader, rt as promptProblem, tt as languageOf } from "./hooks-DNaDzMjW.js";
|
|
4
4
|
import { u as parseSampling } from "./child-lYYeOwl2.js";
|
|
5
|
-
import { C as
|
|
5
|
+
import { C as slug, S as norm, T as uniqueKey, w as trOf, x as mapLimit } from "./library-CIkxhf_R.js";
|
|
6
6
|
import { dirname, join } from "node:path";
|
|
7
7
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
8
8
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -1513,21 +1513,32 @@ function variableProblems(world) {
|
|
|
1513
1513
|
}
|
|
1514
1514
|
return problems;
|
|
1515
1515
|
}
|
|
1516
|
+
// src/shared/authoring-commands.ts
|
|
1517
|
+
/** The command a message starts with, when its name is one of `names` (not a longer word that starts with it). */
|
|
1518
|
+
function parseAuthoringCommand(text, names) {
|
|
1519
|
+
const value = text.trimStart();
|
|
1520
|
+
if (!value.startsWith("/")) return void 0;
|
|
1521
|
+
const end = value.search(/\s/u);
|
|
1522
|
+
const word = (end < 0 ? value : value.slice(0, end)).slice(1).toLowerCase();
|
|
1523
|
+
return names.includes(word) ? {
|
|
1524
|
+
name: word,
|
|
1525
|
+
rest: end < 0 ? "" : value.slice(end).trim()
|
|
1526
|
+
} : void 0;
|
|
1527
|
+
}
|
|
1516
1528
|
// src/shared/import-card.ts
|
|
1517
1529
|
/** The message the plugin sends on the player's behalf to start the import in the new world's authoring chat. */
|
|
1518
1530
|
const IMPORT_COMMAND = "/import-st";
|
|
1519
1531
|
/** The command in a message, with the card it names, or nothing when the message is not the command. */
|
|
1520
1532
|
function parseImportCommand(text) {
|
|
1521
|
-
const
|
|
1522
|
-
if (
|
|
1523
|
-
const
|
|
1524
|
-
const boundary = body.search(/\s/u);
|
|
1533
|
+
const command = parseAuthoringCommand(text, [IMPORT_COMMAND.slice(1)]);
|
|
1534
|
+
if (command === void 0) return void 0;
|
|
1535
|
+
const boundary = command.rest.search(/\s/u);
|
|
1525
1536
|
return boundary < 0 ? {
|
|
1526
|
-
card:
|
|
1537
|
+
card: command.rest,
|
|
1527
1538
|
request: ""
|
|
1528
1539
|
} : {
|
|
1529
|
-
card:
|
|
1530
|
-
request:
|
|
1540
|
+
card: command.rest.slice(0, boundary),
|
|
1541
|
+
request: command.rest.slice(boundary).trim()
|
|
1531
1542
|
};
|
|
1532
1543
|
}
|
|
1533
1544
|
// src/host/import/store.ts
|
|
@@ -2483,6 +2494,15 @@ const objects = (value) => Array.isArray(value) ? value.filter((entry) => typeof
|
|
|
2483
2494
|
const put = (document, key, value) => {
|
|
2484
2495
|
if (value !== void 0 && value !== "" && !(Array.isArray(value) && value.length === 0)) document[key] = value;
|
|
2485
2496
|
};
|
|
2497
|
+
const normalisedText = /* @__PURE__ */ new WeakMap();
|
|
2498
|
+
const normalised = (item) => {
|
|
2499
|
+
let folded = normalisedText.get(item);
|
|
2500
|
+
if (folded === void 0) {
|
|
2501
|
+
folded = norm(item.text);
|
|
2502
|
+
normalisedText.set(item, folded);
|
|
2503
|
+
}
|
|
2504
|
+
return folded;
|
|
2505
|
+
};
|
|
2486
2506
|
/** The pieces an entity is made from: the ones about it, then others that name it, within a budget of text. */
|
|
2487
2507
|
function sourcesFor(entity, items, classified) {
|
|
2488
2508
|
const names = [entity.name, ...entity.aliases].map(norm).filter((name) => name.length >= MIN_MENTION_CHARS);
|
|
@@ -2495,7 +2515,7 @@ function sourcesFor(entity, items, classified) {
|
|
|
2495
2515
|
const mentions = items.filter((item) => !taken.has(item.id) && !isLeftOut(classified[item.id] ?? {
|
|
2496
2516
|
roles: ["world"],
|
|
2497
2517
|
targets: []
|
|
2498
|
-
}) && names.some((name) =>
|
|
2518
|
+
}) && names.some((name) => normalised(item).includes(name))).slice(0, MAX_MENTIONS);
|
|
2499
2519
|
const chosen = [];
|
|
2500
2520
|
let used = 0;
|
|
2501
2521
|
for (const item of [...tagged, ...mentions]) {
|
|
@@ -3988,6 +4008,6 @@ async function createPresetFromGuidance(root, request, guidance, shipped = shipp
|
|
|
3988
4008
|
});
|
|
3989
4009
|
}
|
|
3990
4010
|
}
|
|
3991
|
-
export { ImportNotFoundError as $, sourcesFor as A,
|
|
4011
|
+
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 };
|
|
3992
4012
|
|
|
3993
|
-
//# sourceMappingURL=presets-
|
|
4013
|
+
//# sourceMappingURL=presets-9GzaSELc.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as roleplaySessionOf, t as promptFor } from "./access-CfQWbNZP.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-
|
|
3
|
-
import { A as answerLimits, D as describeWhen, E as describeTime, R as wrongLanguage, Z as PROMPTS_FOLDER, et as inheritPrompts } from "./hooks-
|
|
4
|
-
import { i as translator, r as languageOf, t as trimCharacters } from "./text-
|
|
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-9GzaSELc.js";
|
|
3
|
+
import { A as answerLimits, D as describeWhen, E as describeTime, R as wrongLanguage, Z as PROMPTS_FOLDER, et as inheritPrompts } from "./hooks-DNaDzMjW.js";
|
|
4
|
+
import { i as translator, r as languageOf, t as trimCharacters } from "./text-CbGQhK1-.js";
|
|
5
5
|
import { a as childTrace, c as runChild, n as childModel, r as childSampling, v as estimateAnswer } from "./child-lYYeOwl2.js";
|
|
6
|
-
import { s as inheritImages } from "./library-
|
|
7
|
-
import { i as inheritPacks } from "./packs-
|
|
6
|
+
import { s as inheritImages } from "./library-CIkxhf_R.js";
|
|
7
|
+
import { i as inheritPacks } from "./packs-BajKw7S9.js";
|
|
8
8
|
import { dirname, join } from "node:path";
|
|
9
9
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
10
10
|
import { createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
@@ -2028,4 +2028,4 @@ function memoryReflector(deps) {
|
|
|
2028
2028
|
}
|
|
2029
2029
|
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 };
|
|
2030
2030
|
|
|
2031
|
-
//# sourceMappingURL=reflection-
|
|
2031
|
+
//# sourceMappingURL=reflection-4L0Plvct.js.map
|
|
@@ -216,7 +216,7 @@ const ZH = {
|
|
|
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
218
|
"Import this card into this newly created world.": "把这张卡片导入这个新建的世界。",
|
|
219
|
-
"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 card_update_finish,
|
|
219
|
+
"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
220
|
"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。你的工具做不了的改动,或需要用户决定的改动,写进报告里;然后说明还剩什么。",
|
|
221
221
|
"Turn the SillyTavern lorebook I uploaded into this lorebook: call {tool} with file {file}.": "把我上传的 SillyTavern 世界书转成这本世界书:调用 {tool},文件为 {file}。",
|
|
222
222
|
"Turn the SillyTavern preset I uploaded into this preset's prompts: call {tool} with file {file}.": "把我上传的 SillyTavern 预设转成这个预设的提示词:调用 {tool},文件为 {file}。",
|
|
@@ -267,7 +267,8 @@ const ZH = {
|
|
|
267
267
|
"Scenario:": "场景:",
|
|
268
268
|
"Opening:": "开场:",
|
|
269
269
|
"Description:": "描述:",
|
|
270
|
-
"Creator's notes:": "作者备注:"
|
|
270
|
+
"Creator's notes:": "作者备注:",
|
|
271
|
+
"Document ({where}), about {subject}:": "文档({where}),关于 {subject}:"
|
|
271
272
|
};
|
|
272
273
|
// ../dsh-roleplay-model/src/messages.ts
|
|
273
274
|
/** The language a setting such as `zh-CN` or `en` stands for; English when it is none that is known. */
|
|
@@ -300,4 +301,4 @@ function withoutExtension(value) {
|
|
|
300
301
|
}
|
|
301
302
|
export { translator as i, withoutExtension as n, languageOf as r, trimCharacters as t };
|
|
302
303
|
|
|
303
|
-
//# sourceMappingURL=text-
|
|
304
|
+
//# sourceMappingURL=text-CbGQhK1-.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as finishOf, g as cutOff } from "./child-lYYeOwl2.js";
|
|
2
|
-
import { d as guardRepeatedCalls } from "./hooks-
|
|
2
|
+
import { d as guardRepeatedCalls } from "./hooks-DNaDzMjW.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-
|
|
52
|
+
//# sourceMappingURL=turn-guard-sCUXmp-5.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-agentic-roleplay/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.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",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@deepseek-ai/schemastery": "^3.18.5"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@dsh-agentic-roleplay/state": "0.
|
|
79
|
+
"@dsh-agentic-roleplay/state": "0.9.1",
|
|
80
80
|
"@dsh-ai-providers/core": "^0.5.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Two background entries of a story world are given. Find whether they say things that cannot both be true at the same time (different dates for one event, different causes, a person alive in one and dead in the other, a place in two incompatible spots). Details that only add to each other, statements about different times, and the differing beliefs of different people are not conflicts. If they conflict, answer conflict true and quote, exactly as written, the passage of the first entry and the passage of the second that rule each other out, and say in a sentence why. If not, answer conflict false with empty quotes. Never conclude a conflict you cannot quote. A title or heading is not a statement, and two entries with similar titles are not in conflict for that reason; quote the clauses that disagree.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Two background entries of a story world are given below. Do they say things that cannot both be true at the same time: two different dates for one event, two different causes, a person alive in one and dead in the other, a place in two incompatible spots? They do not conflict when one only adds detail to the other, when they speak of different times, or when they are two people's differing beliefs. Answer yes only when you can point to a statement in each that rules out the other, and give the reason in a sentence.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
A passage of a source card and a document of a story world are given. Does the document say what the passage says: the same facts, in any wording or language? A document that only mentions the same person or place without stating the passage's facts does not. A document that states most of the passage's facts, in other words, does. Answer yes when the document says it, and give the reason in a sentence.
|
|
@@ -0,0 +1 @@
|
|
|
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. Answer yes when it is enough, and give the reason in a sentence.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Two entries of a story world are described below, of the same kind (character, place, organisation or thing). Are they the same one, written twice under different names or wordings, so that the world has a copy of something it already has? They are when the sheets describe the same person, place, group or object, even if the names differ or one is shorter. They are not when they are two different ones that merely resemble each other: siblings, rivals, two guards, two rooms of one building, a place and a part of it. A place inside a larger place (a station in a region, a district of a city, a room of a building) is not the same as the larger one. The entries are labelled A and B: say in the reason what A is and what B is. Answer yes when they are one, and give the reason in a sentence.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Two values a story keeps track of are described below, each with its name, key and what it means. Do they measure the same thing, so that keeping both would record one fact twice and let the two drift apart? They do when one is another name, abbreviation or translation of the other (health and hit points, gold and coins). They do not when they are related but different (health and stamina, trust and affection, hunger and thirst), or measure the same thing for different subjects. Answer yes when they are the same value, and give the reason in a sentence.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Is this character sheet enough to play the character convincingly? It is enough when it tells who the character is, how they talk or carry themselves, and what they want, fear or care about, so that someone who has read nothing else could answer in their voice and decide what they do. It is not enough when it is only a name and a line, or only a list of looks. Answer yes when it is enough, and give the reason in a sentence.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
You compare one document of a role-playing world with the pieces of the character card it was made from, and report what was lost or made up. You are given the source pieces and the document.
|
|
2
|
+
- The document is about one subject, named above it. Compare only what the source says about that subject; the source pieces may be about other people or places too, and what they say about those belongs to other documents.
|
|
3
|
+
- dropped: a fact the source states about this subject (a name, a date, a number, a cause, a habit, a relationship, a rule) that the document does not state or contradicts. Quote the passage of the source that states it, exactly as it is written there.
|
|
4
|
+
- invented: a fact the document states that the source does not give and that does not follow from it. Quote the passage of the document, exactly as it is written there.
|
|
5
|
+
- Judge by meaning, not by wording: a fact said in other words, or in another language, is kept. Style, order and length are not facts. Do not report what the document leaves out on purpose (instructions to the narrator, text addressed to the player).
|
|
6
|
+
- Report only what you are sure of, at most six of each. Report nothing when the document keeps the facts and adds none.
|
|
7
|
+
- Do not report what follows plainly from the source (a pronoun from a title, a role label, an entry's kind or layout), and give each passage once, with all the facts it holds in one entry.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
You review a role-playing world the way an editor reads a draft before it is played, and name what is missing for it to play well. You are given a digest of the world: what it says about itself, its characters, places, organisations, background entries and tracked values.
|
|
2
|
+
- Report only gaps you can see in the digest: a place that is described but has nobody and nothing in it to do, a conflict the background mentions that no character or organisation carries, a character who is named but has no reason to act, something the opening promises that the world never sets up, a rule or secret that nothing can ever reveal.
|
|
3
|
+
- Do not invent facts about the source of the world, and do not judge taste or style. Do not repeat what a file check would find (dangling references, unreachable places, duplicate names).
|
|
4
|
+
- For each gap, about is the key of the character, place, organisation or entry it concerns, or "world"; say what is missing, and what would fill it in one sentence. Name at most eight, the ones that matter most for play. Report nothing when you see no gap.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
The person ran ${command} (what they added: ${request}). Run the checks of this world with ${tools} now, even if you ran them earlier in this chat (the world may have changed, and what you remember of a result is not a result), and read every finding it returns.
|
|
2
|
+
Then act on them as a careful editor: every finding gets a fix, a question to the person, or a stated reason to leave it; none is skipped. Fix what is plainly wrong with your editing tools, one fix at a time; each edit asks the person as usual. Where a finding needs a choice (which of two duplicates to keep, what a missing thing should be), ask before changing anything. Leave what is acceptable as it is and say why. Do not invent facts to fill a gap; if the world's card is kept, read it (card_read, card_search) first. If a tool says the world has no card, skip it and say so instead of guessing what the card held. A finding that compares with the card is a pointer, not a verdict: read the piece with card_read before you change anything. Start with the quick checks. Call a tool with deep true when the request says deep or thorough, when the quick findings suggest the world is thin, or to confirm an import: that is where a model compares and judges, so it takes longer.
|
|
3
|
+
After your fixes run the same tool again and check that what you fixed is gone and nothing new appeared. Then tell the person in a few short sentences how many findings there were by severity, what you changed, and what is left and why. Then stop.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
The world was written, but as a draft: it would not start yet, and the problems are listed above. Repair them now with your editing tools (they run without asking during this turn), reading the original card with card_overview, card_read and card_search to restore what a dangling reference was meant to point at instead of cutting it. Call
|
|
1
|
+
The world was written, but as a draft: it would not start yet, and the problems are listed above. Repair them now with your editing tools (they run without asking during this turn), reading the original card with card_overview, card_read and card_search to restore what a dangling reference was meant to point at instead of cutting it. Call check_world after each round of fixes: it names the problems of the first part of the world that has any, so fixing one part can show the next, until it reports ok. Change only what is wrong, as little as needed, and never add what the card does not say. Then review the world as a careful editor (places and their ways, starting places, duplicates) and tell the person briefly what was imported, what was repaired and what is left.
|
|
@@ -2,8 +2,10 @@ The import is done and written into the world. Before you report, review it as a
|
|
|
2
2
|
- get_world_overview, then the places with their exits (list_relationships with exits, get_world_element_source): every way between places should lead somewhere the card implies; an exit to an unrelated place, a place nobody can reach, or a place that is in another by mistake is fixed or removed.
|
|
3
3
|
- Each character's starting place makes sense for the card, and the playable character (if any) starts somewhere the story can begin.
|
|
4
4
|
- Names, aliases and summaries read as the card meant them; duplicates (the same person twice) are merged by deleting the weaker one.
|
|
5
|
-
The card has no player character unless the import says so: notes about a relationship with [PLAYER] are expected, so leave them, and never make a character for the player. Change only what is wrong, as little as needed, and never add what the card does not say. Then tell the person briefly what was imported, what was left out and why, whether there is a playable character (if not, say that none was found and offer to add one), what you corrected, and any notes that matter. End by
|
|
5
|
+
The card has no player character unless the import says so: notes about a relationship with [PLAYER] are expected, so leave them, and never make a character for the player. Change only what is wrong, as little as needed, and never add what the card does not say. Then tell the person briefly what was imported, what was left out and why, whether there is a playable character (if not, say that none was found and offer to add one), what you corrected, and any notes that matter. End by saying that the person can check the world again whenever they like with /check (everything), /check-card (against the card) or /check-quality, and that adding deep to the request makes a model compare and judge. If the report shows pictures fetched from the card's web addresses, say how many; they are in the world's image library, so every session started from it has them in its gallery.
|
|
6
6
|
|
|
7
7
|
The import already turned the card's instructions about narration and behaviour into the world's prose prompts (the report lists them). You may adjust those, or write the other prose prompts (roleplay/persona, roleplay/style, roleplay/character-style) with write_world_prompt after reading the original with read_world_prompt, keeping the placeholders it has. Every other prompt holds the rules of the game and is refused to you. Add nothing the card does not ask for.
|
|
8
8
|
|
|
9
9
|
The report also says how many variables the card's panels and meters became (variables.json), how many of the card's other greetings the world offers as openings to choose from when a session starts, and whether the card's picture became the portrait of its character. Mention them briefly.
|
|
10
|
+
|
|
11
|
+
The report comes with `checks`: the checks the program runs on every import, already run and stored with the world (consistency of the world, comparison with the card, authoring quality). Read the findings. An error is for you to fix. A warning is a pointer: read the piece of the card with card_read, then fix what is wrong or say why you left it. An info is only worth a mention. The checks a model judges are not run yet. Run check_card with deep true when the card was long or many of its pieces were rewritten into lore, or when the quick findings show facts lost or made up; run check_quality with deep true when the cast has bare sheets or the world looks thin. After fixing, run the tool again to see that the finding is gone. Do not run them just to run them, and do not fill a gap with something the card does not say.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
The import of this card was written into the world as a draft, because the world would not start yet. This turn is its repair, started by the person. You may edit the world with your tools (they run without asking during this turn).
|
|
2
|
-
1. Call
|
|
2
|
+
1. Call check_world. It names the problems of the first part of the world that has any: where each is and what is wrong. Fixing them can show the problems of the next part, so call it again after each round of fixes, until it reports ok.
|
|
3
3
|
2. Read the original card (card_overview, card_read, card_search) to restore what a dangling reference was meant to point at, instead of cutting it: a character, place or organisation the card does have is created with create_world_element; a reference to something the card does not have is removed with the editing tools. Change only what is wrong, as little as needed, and never add what the card does not say.
|
|
4
|
-
3. When
|
|
4
|
+
3. When check_world reports ok, or when you cannot fix what is left, stop and tell the person in a few short sentences what you fixed and what is left, in the person's language. Do not run the import tools again.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
The world still would not start after your changes, so the turn cannot end yet. These are the problems
|
|
1
|
+
The world still would not start after your changes, so the turn cannot end yet. These are the problems check_world reports now:
|
|
2
2
|
${problems}
|
|
3
|
-
Fix them with your editing tools, reading the original card (card_read, card_search) where something it described is missing, then call
|
|
3
|
+
Fix them with your editing tools, reading the original card (card_read, card_search) where something it described is missing, then call check_world again. Cut a reference only when the card has nothing it could point at. If you cannot fix what is left, say exactly what is left and why, and stop.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
下面给出故事世界的两条背景条目。判断它们说的事情能否同时成立(同一件事的不同日期、不同起因,一个人在一条里活着而在另一条里已死,一个地方处于两个互不相容的位置)。只是互相补充的细节、关于不同时间的陈述、不同人的不同看法,都不算冲突。如果冲突,就把 conflict 填 true,并逐字引用第一条和第二条中互相排斥的那两段原文,再用一句话说明原因。如果不冲突,conflict 填 false,两个引文留空。不能引用出来的冲突,不要下结论。标题或小标题不是陈述;两个条目标题相近,不构成冲突;请引用互相矛盾的那几句话。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
下面给出故事世界的两条背景条目。它们说的事情能同时成立吗?例如同一件事有两个不同的日期、两种不同的起因,一个人在一条里活着而在另一条里已死,一个地方处于两个互不相容的位置。一条只是给另一条补充细节、说的是不同时间、或者是两个人各自不同的看法时,不算冲突。只有当你能指出两条里各有一句话互相排斥时才回答是,并用一句话说明理由。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
下面给出来源卡片的一段文字和故事世界的一份文档。文档说出了这段文字所说的内容吗?即相同的事实,不论措辞或语言。文档只是提到同一个人或地点、却没有陈述这段文字的事实,不算。文档用别的说法陈述了这段文字的大部分事实,则算。文档说了就回答是,并用一句话说明理由。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
有人即将以下面描述的角色开始一个故事。请读开场白和第一个场景:角色在哪里,那里有谁、有什么,角色正在做什么或想要什么。对这个人来说,这些够不够让他知道自己身在何处,并为第一步找到事做——一个可以交谈的人、一个要面对的问题,或一个可以追随的愿望?不够,是指开场白缺失或只渲染气氛、地点里没有任何东西引人行动,或者看不出玩家是谁。足够就回答是,并用一句话说明理由。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
下面描述了故事世界里同一类(角色、地点、组织或物品)的两个条目。它们是同一个,只是用不同的名称或说法写了两遍吗?也就是世界里是否有一份已有内容的副本。两份描述的是同一个人、地点、团体或物品,即使名称不同或其中一个更短,就是同一个。只是彼此相像的两个不同条目则不是:兄弟姐妹、对手、两名守卫、同一栋楼里的两个房间、一个地方和它的一部分。位于更大地点之内的地方(区域中的一座站点、城市的一个街区、建筑里的一个房间)与那个更大的地点不是同一个。条目分别标为 A 和 B:请在理由里说明 A 是什么、B 是什么。是同一个就回答是,并用一句话说明理由。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
下面描述了故事要记录的两个数值,各有名称、键和含义。它们衡量的是同一件事吗?也就是说,两个都保留会把同一个事实记两遍,并且两者会渐渐不一致。一个是另一个的别名、缩写或译名时(生命值和体力点数、金币和钱币),它们就是同一件事。相关但不同时(生命和耐力、信任和好感、饥饿和口渴),或者衡量的是不同对象的同一件事时,则不是。是同一个数值就回答是,并用一句话说明理由。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
这份角色设定足以让人令人信服地扮演这个角色吗?足够,是指它说明了这个角色是谁、怎么说话或举止,以及想要什么、害怕什么、在乎什么,使得没读过别的材料的人也能用他的口吻回答,并决定他会怎么做。不够,是指它只有名字和一句话,或只有一串外貌描写。足够就回答是,并用一句话说明理由。
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
你要把一个角色扮演世界的某份文档,与它所依据的角色卡片段对照,报告丢失了什么、编造了什么。你会拿到原文片段和这份文档。
|
|
2
|
+
- 文档只关于一个对象,名字写在文档上方。只对照原文就这个对象说的话;原文片段可能同时讲到别的人或地点,那些内容属于别的文档。
|
|
3
|
+
- dropped(丢失):原文就这个对象陈述的某个事实(名字、日期、数字、原因、习惯、关系、规则),文档没有陈述或与之矛盾。引用陈述它的原文段落,与原文写法完全一致。
|
|
4
|
+
- invented(编造):文档陈述了原文没有给出、也无法由原文推出的某个事实。引用文档中的段落,与文档写法完全一致。
|
|
5
|
+
- 按意思判断,不按措辞:换了说法或换了语言的事实算保留。文风、顺序、篇幅不是事实。文档有意略去的内容(给叙述者的指令、对玩家说的话)不要报告。
|
|
6
|
+
- 只报告你确定的,每类至多六条。文档保留了事实又没有添加时,什么都不报告。
|
|
7
|
+
- 可由原文直接推出的内容(由称呼推出的代词、角色标签、条目的类型或排版)不要报告;每段引文只报告一次,把其中的事实合并在同一条里。
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
你像编辑在游玩之前审阅草稿那样审阅一个角色扮演世界,指出它要玩得好还缺什么。你会拿到这个世界的概要:它对自身的说明、角色、地点、组织、背景条目和追踪的数值。
|
|
2
|
+
- 只报告你能在概要里看到的缺口:有描述却没有任何人或事可做的地点;背景里提到、却没有任何角色或组织承担的冲突;有名字却没有行动理由的角色;开场白许诺了、世界却从未铺垫的东西;永远不会被任何东西揭示的规则或秘密。
|
|
3
|
+
- 不要编造这个世界来源的事实,也不要评判趣味或文风。不要重复文件检查能发现的问题(悬空引用、无法到达的地点、重名)。
|
|
4
|
+
- 每个缺口,about 是它所涉及的角色、地点、组织或条目的 key,或者 "world";说明缺了什么,以及用一句话说明补上什么。至多列八条,选对游玩最重要的。看不到缺口时什么都不报告。
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
用户运行了 ${command}(附加内容:${request})。现在就用 ${tools} 检查这个世界,即使本次对话里早先已经运行过(世界可能已经变了,你记得的结果不等于结果),并阅读它返回的每一条发现。
|
|
2
|
+
然后像一位细心的编辑那样处理:每一条发现都要么修正、要么向用户提问、要么说明为什么保持原样,不能跳过;明显有误的,用你的编辑工具一处一处地修正,每次修改照常会请用户批准。如果某条发现需要做选择(两个重复项保留哪一个、缺失的东西应该是什么),先询问,再动手。可以接受的就保持原样,并说明原因。不要为了填补空缺而编造事实;如果世界保留了角色卡,先去读它(card_read、card_search)。 如果某个工具说这个世界没有角色卡,就跳过它并如实说明,不要猜测卡里有什么。与卡比较得出的发现只是线索,不是结论:修改任何东西之前,先用 card_read 读该段原文。 先用快速检查。当请求里说要深入或彻底检查、快速检查的结果显示世界内容单薄、或者要确认一次导入时,调用工具时把 deep 设为 true:那时由模型来比对和判断,耗时更长。
|
|
3
|
+
修正之后,再运行同一个工具,确认你修正的问题已经消失,也没有出现新的问题。然后用几句话告诉用户:各严重程度的发现各有多少条,你改了什么,还剩下什么以及原因。然后停下。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
世界已经写入,但是作为草稿写入的:它目前还无法开始,上面列出了问题。现在用编辑工具修复它们(本回合内这些工具无需询问即可执行),并用 card_overview、card_read 和 card_search 阅读原始角色卡,恢复悬空引用原本要指向的东西,而不是直接把引用砍掉。每修完一轮就调用
|
|
1
|
+
世界已经写入,但是作为草稿写入的:它目前还无法开始,上面列出了问题。现在用编辑工具修复它们(本回合内这些工具无需询问即可执行),并用 card_overview、card_read 和 card_search 阅读原始角色卡,恢复悬空引用原本要指向的东西,而不是直接把引用砍掉。每修完一轮就调用 check_world:它会指出世界中第一个有问题的部分,所以修好一处可能露出下一处,直到它报告 ok。只改有问题的地方,改动越小越好,绝不要添加卡里没写的内容。然后像一名细心的编辑那样检查这个世界(地点及其通路、起始地点、重复项),并简要告诉用户导入了什么、修复了什么、还剩什么。
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
- 先用 get_world_overview,再看各个地点及其出口(list_relationships 的出口、get_world_element_source):每条通路都应通向卡片所暗示的地方;通向毫不相干地点的出口、无法到达的地点、被错误放进另一个地点的地点,都要修正或删除。
|
|
3
3
|
- 每个角色的起始地点要符合卡片,可扮演的角色(如果有)要从故事能够开始的地方出发。
|
|
4
4
|
- 名字、别名和简介要符合卡片的本意;重复的人物(同一个人出现两次)删除较弱的那个。
|
|
5
|
-
除非导入另有说明,卡片没有玩家角色:关于与 [PLAYER]
|
|
5
|
+
除非导入另有说明,卡片没有玩家角色:关于与 [PLAYER] 的关系的备注是预料之中的,不要管它们,也绝不要为玩家创建角色。只改错误的地方,改动尽量少,绝不添加卡片没有说的内容。然后简要告诉用户:导入了什么、略去了什么以及原因、是否有可扮演的角色(如果没有,说明没有找到,并主动提出添加一个)、你纠正了什么,以及重要的备注。最后说明:用户随时可以用 /check(全部)、/check-card(对照角色卡)或 /check-quality 再次检查这个世界,请求里加上 deep 则由模型来比对和判断。如果报告显示从角色卡的网址取回了图片,说明数量;它们存放在世界的图片库中,由此世界开始的每个会话的画廊里都有。
|
|
6
6
|
|
|
7
7
|
导入已把角色卡中关于叙述和角色表现的指令整理成世界的文风提示(报告里列出)。你可以调整它们,或先用 read_world_prompt 读原文,再用 write_world_prompt 写其他文笔类提示(roleplay/persona、roleplay/style、roleplay/character-style),并保留其中的占位符。其他所有提示都是游戏规则,不允许你修改。角色卡没有要求的,一概不要添加。
|
|
8
8
|
|
|
9
9
|
报告还会说明:角色卡的状态栏和数值面板变成了多少个变量(variables.json)、角色卡的其他开场白有多少个成为开始会话时可选的开场、以及角色卡的图片是否成为了对应角色的立绘。请简要提及。
|
|
10
|
+
|
|
11
|
+
报告附带 `checks`:程序对每次导入都会运行的检查,已经运行并存放在世界里(世界自身的一致性、与卡片的对照、创作质量)。请阅读这些发现。错误由你修复。警告只是线索:先用 card_read 读卡片的对应片段,再修正有误之处,或说明为什么不改。提示只需一提。由模型判断的检查还没有运行。卡片很长、或其中很多片段被改写成了背景条目、或者快速检查显示有事实丢失或被编造时,用 deep 为 true 运行 check_card;角色设定很空、或世界显得单薄时,用 deep 为 true 运行 check_quality。修正之后再运行一次,确认那条发现消失了。不要为了运行而运行,也不要用卡片没有写的内容去填补空缺。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
这张卡的导入结果已作为草稿写进世界,因为这个世界目前还无法开始。这一回合是对它的修复,由用户发起。你可以用工具编辑这个世界(本回合内这些工具无需询问即可执行)。
|
|
2
|
-
1. 先调用
|
|
2
|
+
1. 先调用 check_world。它会指出世界中第一个有问题的部分:每个问题在哪里、错在哪里。修好之后可能会露出下一个部分的问题,所以每修完一轮就再调用一次,直到它报告 ok。
|
|
3
3
|
2. 阅读原始角色卡(card_overview、card_read、card_search),用来恢复悬空引用原本要指向的东西,而不是直接把引用砍掉:卡里确实有的角色、地点或组织,用 create_world_element 创建;卡里没有的东西,用编辑工具把引用移除。只改有问题的地方,改动越小越好,绝不要添加卡里没写的内容。
|
|
4
|
-
3. 当
|
|
4
|
+
3. 当 check_world 报告 ok,或者剩下的问题你无法修复时,就停下,用几句话向用户说明你修了什么、还剩什么,使用用户的语言。不要再运行导入工具。
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
经过你的修改,这个世界仍然无法开始,所以这一回合还不能结束。
|
|
1
|
+
经过你的修改,这个世界仍然无法开始,所以这一回合还不能结束。check_world 现在报告的问题是:
|
|
2
2
|
${problems}
|
|
3
|
-
用编辑工具修复它们;如果卡里描述过的某样东西缺失了,就阅读原始角色卡(card_read、card_search)把它补回来,然后再次调用
|
|
3
|
+
用编辑工具修复它们;如果卡里描述过的某样东西缺失了,就阅读原始角色卡(card_read、card_search)把它补回来,然后再次调用 check_world。只有当卡里没有任何可指向的东西时,才删掉那条引用。如果剩下的问题你无法修复,就准确说明还剩什么、为什么,然后停下。
|