@dsh-agentic-roleplay/core 0.11.1 → 0.12.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/{access-Md1YTSX1.js → access-DifaiHrI.js} +3 -15
- package/lib/{authoring-tools-BFdw7ahj.js → authoring-tools-VOaXzr_R.js} +58 -766
- package/lib/authoring.js +136 -13
- package/lib/{child-C9nPIy9j.js → child-DzZ-aI6k.js} +130 -2
- package/lib/client.js +17093 -2269
- package/lib/client.js.map +1 -1
- package/lib/compaction.js +3 -3
- package/lib/dev-context-Bdm-eVer.js +40 -0
- package/lib/doctor.js +5 -3
- package/lib/{gallery-BWHmjogd.js → gallery-Ctz-UoFk.js} +3 -3
- package/lib/{generator-QCdm8nUh.js → generator-Cv6WWmZT.js} +2 -2
- package/lib/helper.js +15 -1
- package/lib/{hooks-C2U1-8ur.js → hooks-BdR3mBeM.js} +751 -344
- package/lib/images.js +4 -4
- package/lib/index.js +342 -463
- package/lib/jail-Cp4zEfip.js +107 -0
- package/lib/{library-4zmCAshR.js → library-BU2A_Dx8.js} +3 -3
- package/lib/{lorebook-author-tools-Bjfjt3bg.js → lorebook-author-tools-DUKcQu8P.js} +20 -7
- package/lib/lorebook-authoring.js +12 -5
- package/lib/{narration-b_VBEUWn.js → narration-CDsJ5wxH.js} +29 -2
- package/lib/orchestration.js +615 -48
- package/lib/{pack-jail-Ci9bIeDI.js → pack-jail-CzHQu0n3.js} +559 -23
- package/lib/{packs-CYkozh8Q.js → packs-BZ-45J4-.js} +2 -2
- package/lib/{presenter-agent-CqkAL03Q.js → presenter-agent-C2ZkoxZu.js} +9 -9
- package/lib/{preset-B-35yUmt.js → preset-BPnRPW-1.js} +4 -4
- package/lib/{preset-author-tools-BUymqZM5.js → preset-author-tools-DBqPwn-o.js} +9 -8
- package/lib/preset-authoring.js +11 -6
- package/lib/{reflection-B9N0z3KY.js → reflection-Cuy0YLv0.js} +22 -16
- package/lib/{presets-_U-xroo0.js → serial-BZNeK57v.js} +1305 -331
- package/lib/service-mRKwpWjX.js +140 -0
- package/lib/{text-C2AGl7Je.js → text-Dfv8S8eq.js} +27 -2
- package/lib/{turn-guard-C0M3rXEN.js → turn-guard-xaFxYc1T.js} +3 -3
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +34 -34
- package/prompts/en/import/finish-ok.md +1 -1
- package/prompts/en/import/generator.md +1 -1
- package/prompts/en/import/style.md +2 -1
- package/prompts/en/import/variables.md +2 -1
- package/prompts/en/roleplay/character-lookup.md +1 -1
- package/prompts/en/roleplay/decide-errand.md +1 -0
- package/prompts/en/roleplay/decide-message.md +1 -0
- package/prompts/en/roleplay/dream.md +1 -0
- package/prompts/en/roleplay/gate-repeat.md +1 -0
- package/prompts/en/world/procedure.md +1 -1
- package/prompts/zh/import/finish-ok.md +1 -1
- package/prompts/zh/import/generator.md +1 -1
- package/prompts/zh/import/style.md +2 -1
- package/prompts/zh/import/variables.md +2 -1
- package/prompts/zh/roleplay/character-lookup.md +1 -1
- package/prompts/zh/roleplay/decide-errand.md +1 -0
- package/prompts/zh/roleplay/decide-message.md +1 -0
- package/prompts/zh/roleplay/dream.md +1 -0
- package/prompts/zh/roleplay/gate-repeat.md +1 -0
- package/prompts/zh/world/procedure.md +1 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
2
|
+
import { mkdir, readFile, realpath, rename, stat, writeFile } from "node:fs/promises";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
|
+
// src/shared/folders.ts
|
|
5
|
+
const FOLDER_ACCESS = ["read", "write"];
|
|
6
|
+
/** The folder of the roleplay root that every story's file tools reach, whatever else it was given. */
|
|
7
|
+
const WORKSPACE_FOLDER = "workspace";
|
|
8
|
+
// src/host/workspace/folders.ts
|
|
9
|
+
const FOLDERS_FILE = "folders.json";
|
|
10
|
+
var InvalidFoldersError = class extends Error {
|
|
11
|
+
problems;
|
|
12
|
+
constructor(problems) {
|
|
13
|
+
super(problems.join("; "));
|
|
14
|
+
this.problems = problems;
|
|
15
|
+
this.name = "InvalidFoldersError";
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
/** Whether `path` is `parent` or lies below it. */
|
|
19
|
+
const isInside = (parent, path) => {
|
|
20
|
+
const inside = relative(parent, path);
|
|
21
|
+
return inside === "" || !inside.startsWith("..") && !isAbsolute(inside);
|
|
22
|
+
};
|
|
23
|
+
/** The folder every story's file tools reach. */
|
|
24
|
+
const workspaceOf = (root) => join(root, WORKSPACE_FOLDER);
|
|
25
|
+
function parse(value) {
|
|
26
|
+
if (!Array.isArray(value)) throw new Error("folders must be a list");
|
|
27
|
+
return value.map((entry) => {
|
|
28
|
+
const folder = entry;
|
|
29
|
+
if (typeof folder !== "object" || folder === null || typeof folder["path"] !== "string" || !FOLDER_ACCESS.includes(folder["access"])) throw new Error("a folder needs a path and an access of read or write");
|
|
30
|
+
return {
|
|
31
|
+
path: folder["path"],
|
|
32
|
+
access: folder["access"]
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/** The folders a story was given; none for a story that was never given any. */
|
|
37
|
+
async function readFolders(sessionFolder) {
|
|
38
|
+
let text;
|
|
39
|
+
try {
|
|
40
|
+
text = await readFile(join(sessionFolder, FOLDERS_FILE), "utf8");
|
|
41
|
+
} catch (error) {
|
|
42
|
+
if (error.code === "ENOENT") return [];
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
return parse(JSON.parse(text).folders ?? []);
|
|
46
|
+
}
|
|
47
|
+
/** The places no story may be given: the roleplay root and the folder above it (they hold every story), and DSH's own home. */
|
|
48
|
+
const forbiddenFolders = (root) => [root, join(homedir(), ".dsh")];
|
|
49
|
+
/**
|
|
50
|
+
* The folders as they will be kept: absolute, real (a symbolic link is followed once, here), existing folders, without repeats,
|
|
51
|
+
* none that would hand over the roleplay root or DSH's home, at most `MAX_STORY_FOLDERS`.
|
|
52
|
+
* @throws {InvalidFoldersError} with every problem.
|
|
53
|
+
*/
|
|
54
|
+
async function checkFolders(requested, root) {
|
|
55
|
+
const problems = [];
|
|
56
|
+
if (requested.length > 16) problems.push(`a story may be given at most 16 folders`);
|
|
57
|
+
const workspace = await realpath(workspaceOf(root)).catch(() => workspaceOf(root));
|
|
58
|
+
const forbidden = await Promise.all(forbiddenFolders(root).map(async (path) => await realpath(path).catch(() => path)));
|
|
59
|
+
const kept = /* @__PURE__ */ new Map();
|
|
60
|
+
for (const folder of requested) {
|
|
61
|
+
if (!isAbsolute(folder.path)) {
|
|
62
|
+
problems.push(`${folder.path}: give the whole path`);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
let real;
|
|
66
|
+
try {
|
|
67
|
+
real = await realpath(resolve(folder.path));
|
|
68
|
+
if (!(await stat(real)).isDirectory()) {
|
|
69
|
+
problems.push(`${folder.path} is not a folder`);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
} catch {
|
|
73
|
+
problems.push(`${folder.path} does not exist`);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (real === dirname(real)) {
|
|
77
|
+
problems.push("the whole disk cannot be given");
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const exposing = forbidden.find((path) => isInside(real, path) || isInside(path, real) && !isInside(workspace, real));
|
|
81
|
+
if (exposing !== void 0) {
|
|
82
|
+
problems.push(`${folder.path}: it holds or lies in ${exposing}, which keeps every story`);
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
const earlier = kept.get(real);
|
|
86
|
+
kept.set(real, {
|
|
87
|
+
path: real,
|
|
88
|
+
access: earlier?.access === "write" || folder.access === "write" ? "write" : "read"
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (problems.length > 0) throw new InvalidFoldersError(problems);
|
|
92
|
+
return [...kept.values()];
|
|
93
|
+
}
|
|
94
|
+
/** Writes the story's folders after checking them, and returns what was kept. */
|
|
95
|
+
async function writeFolders(sessionFolder, requested, root) {
|
|
96
|
+
const folders = await checkFolders(requested, root);
|
|
97
|
+
const target = join(sessionFolder, FOLDERS_FILE);
|
|
98
|
+
await mkdir(sessionFolder, { recursive: true });
|
|
99
|
+
await writeFile(`${target}.writing`, JSON.stringify({ folders }, null, 2));
|
|
100
|
+
await rename(`${target}.writing`, target);
|
|
101
|
+
return folders;
|
|
102
|
+
}
|
|
103
|
+
// src/host/workspace/service.ts
|
|
104
|
+
/** What the file tools of a story reach: the shared workspace, always writable, and each folder the story was given. */
|
|
105
|
+
async function storyRoots(root, sessionFolder) {
|
|
106
|
+
const workspace = workspaceOf(root);
|
|
107
|
+
await mkdir(workspace, { recursive: true });
|
|
108
|
+
const folders = await checkFolders(await readFolders(sessionFolder), root).catch(() => []);
|
|
109
|
+
return [{
|
|
110
|
+
path: workspace,
|
|
111
|
+
write: true
|
|
112
|
+
}, ...folders.map((folder) => ({
|
|
113
|
+
path: folder.path,
|
|
114
|
+
write: folder.access === "write"
|
|
115
|
+
}))];
|
|
116
|
+
}
|
|
117
|
+
/** The folders of one story, for the page that shows and changes them. */
|
|
118
|
+
var StoryFoldersService = class {
|
|
119
|
+
deps;
|
|
120
|
+
constructor(deps) {
|
|
121
|
+
this.deps = deps;
|
|
122
|
+
}
|
|
123
|
+
async status(id) {
|
|
124
|
+
const folder = this.deps.sessionFolder(id);
|
|
125
|
+
const workspace = workspaceOf(this.deps.root());
|
|
126
|
+
await mkdir(workspace, { recursive: true });
|
|
127
|
+
return {
|
|
128
|
+
workspace,
|
|
129
|
+
folders: await readFolders(folder),
|
|
130
|
+
limit: 16
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
async set(id, folders) {
|
|
134
|
+
await writeFolders(this.deps.sessionFolder(id), folders, this.deps.root());
|
|
135
|
+
return await this.status(id);
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
export { workspaceOf as a, isInside as i, storyRoots as n, FOLDER_ACCESS as o, InvalidFoldersError as r, StoryFoldersService as t };
|
|
139
|
+
|
|
140
|
+
//# sourceMappingURL=service-mRKwpWjX.js.map
|
|
@@ -75,6 +75,11 @@ const ZH = {
|
|
|
75
75
|
"Background you know, to read with recall_my_lore when it bears on the moment: ": "你所知的背景(与当下相关时用 recall_my_lore 查阅):",
|
|
76
76
|
"Your day and what you are after (plans, not orders: keep them, put them off or drop them as the moment and your character suggest):": "你的日程与你想达成的事(只是计划,不是命令:依当下情形和你的性格,可以照做、推迟或放弃):",
|
|
77
77
|
"Your day, now: {activity}{place}, until {until}{note}.": "你此刻的日程:{activity}{place},持续到{until}{note}。",
|
|
78
|
+
"What is happening to you has taken you from your day for now; you take it up again {until}.": "眼下发生的事让你暂时离开了日程;{until}你会重新回到日程。",
|
|
79
|
+
"Asleep now: {names}. An asleep character takes part only if what the player does wakes them: name them in wakes when you ask them, and show them waking.": "此刻正在睡觉:{names}。睡着的角色只有在玩家的行为把他们唤醒时才会参与:询问他们时把他们列入 wakes,并写出他们醒来的样子。",
|
|
80
|
+
"{name} (until {until})": "{name}(到{until})",
|
|
81
|
+
"You are asleep and dreaming, and the player's character is in your dream. What you intend and say is the dream's: it may shift, blur and be odd, and it is not something you do awake. Answer from what the dream would make of the moment, out of your own fears, wants and what you have not said.": "你正在睡梦中,玩家的角色出现在你的梦里。你所打算和所说的都属于梦:它可以变幻、模糊、古怪,并不是你醒着时做的事。请从梦会如何看待此刻出发来回答,出于你自己的恐惧、愿望和没有说出口的话。",
|
|
82
|
+
"Something in your own day has just changed, and it may have made you think of them.": "你自己的日程刚刚有了变化,这也许让你想起了他们。",
|
|
78
83
|
"Your day, next: {activity}{place}, from {from}.": "你接下来的日程:{activity}{place},{from}开始。",
|
|
79
84
|
" at {place}": ",在{place}",
|
|
80
85
|
" (not something you would drop lightly)": "(你不会轻易放下)",
|
|
@@ -221,6 +226,10 @@ const ZH = {
|
|
|
221
226
|
"macros ({names})": "宏({names})",
|
|
222
227
|
"tag blocks ({names})": "标签块({names})",
|
|
223
228
|
"Nothing runs them, so they are not carried: {parts}. Their effect is kept only where the card also says it in words.": "这些内容不会被执行,所以不会带入:{parts}。只有卡片同时用文字写明的效果才会保留。",
|
|
229
|
+
"this chat keeps no days for its characters, so nobody sleeps and there is no dream to enter": "这个对话不给角色安排日程,所以没有人在睡觉,也就没有梦可以进入",
|
|
230
|
+
"nobody is asleep, so there is no dream to enter": "没有人在睡觉,所以没有梦可以进入",
|
|
231
|
+
"say whose dream: {names}": "请说明是谁的梦:{names}",
|
|
232
|
+
"more than one is asleep ({names}): say whose dream": "不止一个人在睡觉({names}):请说明是谁的梦",
|
|
224
233
|
"this chat follows the clock on the wall, so time cannot be skipped": "这个对话跟随墙上的时钟,所以不能跳过时间",
|
|
225
234
|
"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
235
|
"that is more than the {days} days this chat allows in one skip": "这超过了本对话一次最多可跳过的 {days} 天",
|
|
@@ -265,9 +274,19 @@ const ZH = {
|
|
|
265
274
|
"All the pieces of this card, in order:": "这张卡的所有片段,按顺序:",
|
|
266
275
|
"The standing rules of this world. Apply them on every turn:": "这个世界的常驻规则。每个回合都要遵守:",
|
|
267
276
|
"The instructions of the card:": "卡片的指令:",
|
|
277
|
+
"Your file tools reach only these folders, and every path must be a whole path. The shared workspace, which you may read and write: {workspace}.{given}": "你的文件工具只能进入这些文件夹,每个路径都必须写完整路径。所有故事共用的工作区,可读可写:{workspace}。{given}",
|
|
278
|
+
"The player's character has not been with you for {away}, and you are not with them now. It is {now} for you.": "玩家的角色已经有 {away} 没和你在一起了,你现在也不在他身边。对你来说现在是 {now}。",
|
|
279
|
+
"You may write them a short message, in your own voice, as someone who knows them would: what you are doing, what is on your mind, something you want them to know or do. Say it in the utterance, in a line or two, with nothing around it.": "你可以用自己的口吻给他写一条简短的消息,就像熟悉他的人那样:你在做什么、心里想着什么、想让他知道或去做的事。把它写在台词里,一两句话,前后不要加任何东西。",
|
|
280
|
+
"You and others have already written to them since they were last here and they have not answered: do not press, and never complain about it.": "自从他上次来过之后,你和别人已经给他写过消息而他没有回复:不要催促,也绝不要为此抱怨。",
|
|
281
|
+
"If nothing makes you want to write now, answer with commitment low and no utterance.": "如果现在没有什么让你想写的,就把决心填为 low,并且不写台词。",
|
|
282
|
+
"While the player was away, these messages reached their character, who has read them: {messages}. Refer to them only if the player does.": "玩家不在的时候,这些消息送到了他的角色手里,他已经读过:{messages}。只有玩家提起时才提到它们。",
|
|
283
|
+
" Given for this story: {folders}.": "本故事另外给了:{folders}。",
|
|
284
|
+
"{path} (read only)": "{path}(只读)",
|
|
285
|
+
"{path} (read and write)": "{path}(可读可写)",
|
|
268
286
|
"Characters:": "角色:",
|
|
269
287
|
"Places:": "地点:",
|
|
270
288
|
"Things:": "物品:",
|
|
289
|
+
"A status panel from one of the card's own messages (it shows which values the card keeps and where they start):": "卡片自带消息里的一个状态栏(它显示卡片记录哪些数值以及它们从多少开始):",
|
|
271
290
|
"The pieces of the card that may describe what it tracks:": "卡片中可能描述其所追踪内容的片段:",
|
|
272
291
|
"Entry {ref}": "条目{ref}",
|
|
273
292
|
"(triggers: {keys})": "(触发词:{keys})",
|
|
@@ -287,7 +306,13 @@ const ZH = {
|
|
|
287
306
|
"The values that changed, to be given a new value:": "已经改变、要给出新值的数值:",
|
|
288
307
|
"Now: {value}.": "现在:{value}。",
|
|
289
308
|
"the story": "故事",
|
|
290
|
-
"Changes: {rule}": "变化规则:{rule}"
|
|
309
|
+
"Changes: {rule}": "变化规则:{rule}",
|
|
310
|
+
"You are asleep and the player's character has come into your dream. Say what the dream holds.": "你在睡梦中,玩家的角色走进了你的梦里。请说出梦中的内容。",
|
|
311
|
+
"Ask {name} (activate_characters with only {key}; the sleeper stays asleep and needs no wakes) what the dream holds, then narrate it.": "让{name}给出梦中的内容(activate_characters 只选 {key};沉睡者仍在睡,不需要 wakes),然后叙述。",
|
|
312
|
+
"{name} has already been asked and answered from the dream: intent \"{intent}\"{said}. Ask nobody and call no tool but narrate, with narration segments only, and put what {name} says in the narration.": "{name}已经被询问过,并从梦中作了回答:意图“{intent}”{said}。不要再询问任何人,只调用 narrate,且只用叙述段落,把{name}在梦中说的话写进叙述里。",
|
|
313
|
+
", said \"{text}\"": ",所说的是“{text}”",
|
|
314
|
+
"time passes": "时间流逝",
|
|
315
|
+
"The player let {minutes} minutes pass{reason}, and the story's time has already been moved on to {now}: do not call advance_time for it. {moved}{happened}Narrate what the player perceived in that time, in the story's own terms. If something in it would have made the player act or woken them, let it come at the end and stop there. You may play at most {rounds} rounds for this.": "玩家让 {minutes} 分钟过去{reason},故事的时间已经推进到 {now}:不要再为此调用 advance_time。{moved}{happened}请用故事自己的方式叙述玩家在这段时间里的所感。如果其中有什么会让玩家行动或惊醒玩家,就让它出现在最后,并在那里停下。这次你最多可以进行 {rounds} 轮。"
|
|
291
316
|
};
|
|
292
317
|
// ../dsh-roleplay-model/src/messages.ts
|
|
293
318
|
/** The language a setting such as `zh-CN` or `en` stands for; English when it is none that is known. */
|
|
@@ -320,4 +345,4 @@ function withoutExtension(value) {
|
|
|
320
345
|
}
|
|
321
346
|
export { translator as i, withoutExtension as n, languageOf as r, trimCharacters as t };
|
|
322
347
|
|
|
323
|
-
//# sourceMappingURL=text-
|
|
348
|
+
//# sourceMappingURL=text-Dfv8S8eq.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { D as finishOf, E as cutOff } from "./child-DzZ-aI6k.js";
|
|
2
|
+
import { r as guardRepeatedCalls } from "./hooks-BdR3mBeM.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-xaFxYc1T.js.map
|
package/locale/de.json
ADDED
package/locale/en.json
ADDED
package/locale/es.json
ADDED
package/locale/fr.json
ADDED
package/locale/ja.json
ADDED
package/locale/pt.json
ADDED
package/locale/ru.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-agentic-roleplay/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.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",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"./helper": "./lib/helper.js",
|
|
21
21
|
"./images": "./lib/images.js",
|
|
22
22
|
"./client": "./lib/client.js",
|
|
23
|
-
"./package.json": "./package.json"
|
|
23
|
+
"./package.json": "./package.json",
|
|
24
|
+
"./locale/*.json": "./locale/*.json"
|
|
24
25
|
},
|
|
25
26
|
"dsh": {
|
|
26
27
|
"bundle": {
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
},
|
|
63
64
|
"files": [
|
|
64
65
|
"icon.svg",
|
|
66
|
+
"locale",
|
|
65
67
|
"lib/*.js",
|
|
66
68
|
"packs",
|
|
67
69
|
"prompts",
|
|
@@ -78,40 +80,38 @@
|
|
|
78
80
|
"@deepseek-ai/schemastery": "^3.18.5"
|
|
79
81
|
},
|
|
80
82
|
"dependencies": {
|
|
81
|
-
"@dsh-agentic-roleplay/state": "0.
|
|
82
|
-
"@dsh-ai-providers/core": "^0.
|
|
83
|
+
"@dsh-agentic-roleplay/state": "0.12.1",
|
|
84
|
+
"@dsh-ai-providers/core": "^0.7.0"
|
|
83
85
|
},
|
|
84
86
|
"devDependencies": {
|
|
85
|
-
"@deepseek-ai/cordis": "^4.0
|
|
86
|
-
"@deepseek-ai/cordis-plugin-loader": "^1.0
|
|
87
|
-
"@deepseek-ai/dsh-agent": "0.2.2-rc.1",
|
|
88
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.2-rc.1",
|
|
89
|
-
"@deepseek-ai/dsh-
|
|
90
|
-
"@deepseek-ai/dsh-client-
|
|
91
|
-
"@deepseek-ai/dsh-client-
|
|
92
|
-
"@deepseek-ai/dsh-client-ui-
|
|
93
|
-
"@deepseek-ai/dsh-client-ui-
|
|
94
|
-
"@deepseek-ai/dsh-client-ui-
|
|
95
|
-
"@deepseek-ai/dsh-client-ui-
|
|
96
|
-
"@deepseek-ai/dsh-client-ui-
|
|
97
|
-
"@deepseek-ai/dsh-client-ui-
|
|
98
|
-
"@deepseek-ai/dsh-client-ui-
|
|
99
|
-
"@deepseek-ai/dsh-
|
|
100
|
-
"@deepseek-ai/dsh-
|
|
101
|
-
"@deepseek-ai/dsh-
|
|
102
|
-
"@deepseek-ai/dsh-
|
|
103
|
-
"@deepseek-ai/dsh-
|
|
104
|
-
"@deepseek-ai/dsh-
|
|
105
|
-
"@deepseek-ai/dsh-
|
|
106
|
-
"@deepseek-ai/dsh-
|
|
107
|
-
"@deepseek-ai/dsh-
|
|
108
|
-
"@deepseek-ai/dsh-
|
|
109
|
-
"@deepseek-ai/dsh-
|
|
110
|
-
"@deepseek-ai/dsh-
|
|
111
|
-
"@deepseek-ai/dsh-
|
|
112
|
-
"@deepseek-ai/dsh-
|
|
113
|
-
"@deepseek-ai/dsh-tools": "0.2.2-rc.1",
|
|
114
|
-
"@deepseek-ai/dsh-user-approval": "0.2.2-rc.1",
|
|
87
|
+
"@deepseek-ai/cordis": "^4.1.0",
|
|
88
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.1.0",
|
|
89
|
+
"@deepseek-ai/dsh-agent": ">=0.2.2-rc.1 <0.2.3",
|
|
90
|
+
"@deepseek-ai/dsh-agent-loop": ">=0.2.2-rc.1 <0.2.3",
|
|
91
|
+
"@deepseek-ai/dsh-client-locale": ">=0.2.2-rc.1 <0.2.3",
|
|
92
|
+
"@deepseek-ai/dsh-client-store": ">=0.2.2-rc.1 <0.2.3",
|
|
93
|
+
"@deepseek-ai/dsh-client-ui-chat": ">=0.2.2-rc.1 <0.2.3",
|
|
94
|
+
"@deepseek-ai/dsh-client-ui-conversation": ">=0.2.2-rc.1 <0.2.3",
|
|
95
|
+
"@deepseek-ai/dsh-client-ui-layout": ">=0.2.2-rc.1 <0.2.3",
|
|
96
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.2-rc.1 <0.2.3",
|
|
97
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.2-rc.1 <0.2.3",
|
|
98
|
+
"@deepseek-ai/dsh-client-ui-sidebar": ">=0.2.2-rc.1 <0.2.3",
|
|
99
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right": ">=0.2.2-rc.1 <0.2.3",
|
|
100
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.2.2-rc.1 <0.2.3",
|
|
101
|
+
"@deepseek-ai/dsh-compaction": ">=0.2.2-rc.1 <0.2.3",
|
|
102
|
+
"@deepseek-ai/dsh-compaction-basic": ">=0.2.2-rc.1 <0.2.3",
|
|
103
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.2.2-rc.1 <0.2.3",
|
|
104
|
+
"@deepseek-ai/dsh-llm": ">=0.2.2-rc.1 <0.2.3",
|
|
105
|
+
"@deepseek-ai/dsh-scope": ">=0.2.2-rc.1 <0.2.3",
|
|
106
|
+
"@deepseek-ai/dsh-session": ">=0.2.2-rc.1 <0.2.3",
|
|
107
|
+
"@deepseek-ai/dsh-session-projection": ">=0.2.2-rc.1 <0.2.3",
|
|
108
|
+
"@deepseek-ai/dsh-subagent": ">=0.2.2-rc.1 <0.2.3",
|
|
109
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": ">=0.2.2-rc.1 <0.2.3",
|
|
110
|
+
"@deepseek-ai/dsh-system-prompt": ">=0.2.2-rc.1 <0.2.3",
|
|
111
|
+
"@deepseek-ai/dsh-token-meter": ">=0.2.2-rc.1 <0.2.3",
|
|
112
|
+
"@deepseek-ai/dsh-tool-executor-native": ">=0.2.2-rc.1 <0.2.3",
|
|
113
|
+
"@deepseek-ai/dsh-tools": ">=0.2.2-rc.1 <0.2.3",
|
|
114
|
+
"@deepseek-ai/dsh-user-approval": ">=0.2.2-rc.1 <0.2.3",
|
|
115
115
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
116
116
|
"@types/node": "^22.20.0",
|
|
117
117
|
"@types/react": "~18.3.1",
|
|
@@ -4,7 +4,7 @@ The import is done and written into the world. Before you report, review it as a
|
|
|
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
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
|
-
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.
|
|
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. A note that says instructions, panels or update blocks were left out is deliberate: the story shows its tracked values itself, so never write a status bar, a panel, HTML, a code block or an update block into a prompt, the opening or the lore, and never add back what the import left out.
|
|
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
10
|
|
|
@@ -2,7 +2,7 @@ You read one piece of a character card written for a role-playing chat tool. Fin
|
|
|
2
2
|
|
|
3
3
|
casting: how people, places or things are made up while the story is played: pools of kinds or situations to choose from, templates, tables, the fields a newly made character must have, when someone new is brought in ("generate each follower's profile when they appear", "pick one of these types for the next stranger", a random encounter table).
|
|
4
4
|
|
|
5
|
-
rules: standing rules and mechanics the game master applies as the story is played: how checks and dice are used, how combat or a contest is run step by step, tables and charts the rules refer to,
|
|
5
|
+
rules: standing rules and mechanics the game master applies as the story is played: how checks and dice are used, how combat or a contest is run step by step, tables and charts the rules refer to, what must always or never happen. Not a description of the setting, of a place or of a named character; not how the text is written (style, tone, length, formats of the reply); not an instruction to print or append something to a reply (a status bar, a panel, an update block, markup, a code block); not a list of tags or markup for a program.
|
|
6
6
|
|
|
7
7
|
A passage belongs to one list only. Give no passages for a kind the piece does not hold. Do not add anything of your own.
|
|
8
8
|
${rules}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
You turn the instructions a character card gives to the AI into the style notes of a role-playing world. ${rules}
|
|
2
2
|
Keep only guidance about how the story is written and how the characters behave: voice, tone, perspective, tense, pacing, level of detail, staying in character, manner of speaking, and how a character reacts to what it is asked to do or declines to do. Write it as short, direct guidance to the AI, in the language of the instructions, and keep what the card asks for as faithfully as it can be said in a few sentences.
|
|
3
|
-
|
|
3
|
+
Rules of the world that the instructions lay down (what exists, does not exist or may not happen in the story, such as "there are no firearms") go in world_rules, one short sentence each, in the language of the instructions and as faithfully as they say it; do not repeat them in the style notes.
|
|
4
|
+
Leave out, and list in left_out: how to run the game, formats and status panels, instructions about tools, scripts, anything addressed to the player, and anything about specific characters, places or events (those belong to the world, not to the style). Never keep an instruction to add something to every reply (a status bar, a panel, an update block, markup, a code block, HTML), even when it shares a sentence with a style instruction: the story shows its tracked values itself, so list it in left_out and write the style part without it. Do not add guidance the instructions do not give. When they give none of one kind, leave that field empty.
|
|
4
5
|
The instructions may give the AI a persona of its own (a writer or narrator with a name); never use that name or persona in the notes, and say "the character" or "the narrator" instead. List every such name in persona_names; an answer that contains one is refused.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
You find what a character card keeps track of in its story and write it as the declarations of a role-playing world's tracked variables. ${rules}
|
|
2
2
|
A variable is a number (affection, money, health, a day count, a level), a flag (true or false: has something happened, does someone know something) or a choice (one of a few named states). Declare only what the card clearly keeps track of: status panels, stat blocks, counters, progress or levelling rules, relationship meters. Do not invent anything the card does not track, and do not declare feelings (valence, arousal and dominance already exist).
|
|
3
3
|
For each: key (lowercase ASCII letters, digits and underscores, starting with a letter, like trust_meter), name, kind (number, flag or choice), subject (character, item, location or world: who or what it is about), visibility (public: everyone can see it, private: only its owner, hidden: only the game master). For a number give min and max when the card gives limits, integer when it counts whole units, and default when the card says where it starts; add bands (up_to and label: "up_to 20 is Hostile") when the card names ranges of values. For a choice give options. Use only when the card limits it to some of the characters, places or things of the list.
|
|
4
|
-
Declare every value a panel or meter shows, one variable each. What the card says about a value belongs in its fields, never in left_out: where it starts is default, its limits are min and max, whole units are integer: true, and named ranges are bands. A value of a person (money, reputation, trust) has subject character; a value of the whole story (the day, the weather) has subject world.
|
|
4
|
+
Declare every value a panel or meter shows, one variable each. What the card says about a value belongs in its fields, never in left_out: where it starts is default, its limits are min and max, whole units are integer: true, and named ranges are bands. A value of a person (money, reputation, trust) has subject character; a value of the whole story (the day, the weather) has subject world. Give only when the card says whose value it is: a panel that does not say whose values it shows is about the player's character, so leave only out and the value applies to every character.
|
|
5
|
+
The card may also show sample status panels from its own messages (a bar of values after a reply, a block of markup): they tell you which values it keeps and where they start, so declare those values, and take the numbers of the first sample as their defaults when nothing else gives a starting value. Never carry a panel's layout, markup or the instruction to print it: only the values.
|
|
5
6
|
What the card says about when and how a value changes (an update rule: "raise trust by 1 when the user is kind", "fatigue goes up for each hour of hard work", an update block of a state-tracking framework) goes into update, in a sentence or two, as the card states it: what makes the value rise or fall and by how much. Never invent a rule the card does not give; leave update empty then.
|
|
6
7
|
Leave out, and list in left_out: rules of the game that are not a tracked value, formats of the output, instructions about narration, scripts, and values that belong to one moment of the story and not to the world. When the card tracks nothing, return no variables.
|
|
7
8
|
Declare at most ${max} variables in one answer, the ones the story depends on most first; when the card tracks more, you are asked again for the rest, told which are declared already.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
What you remember that bears on the moment is already given to you above, with whatever came to mind along with it. Only if something the situation names is missing from it, ask yourself with recall_my_memories, about that one thing, and no more than a few times in all. When it gives you nothing, there is nothing more to find: do not ask again about the same thing in other words, simply go on with what you know, and never say that you remembered nothing.
|
|
1
|
+
What you remember that bears on the moment is already given to you above, with whatever came to mind along with it. Only if something the situation asks for or names (a name, a fact, what was said or done earlier) is missing from it, ask yourself with recall_my_memories, about that one thing, and no more than a few times in all. What comes back depends on the words you ask with: when you are asked about a name or a fact you were told, ask with the words the memory itself would hold (the person, the place, the thing), not the wording of the question. When it gives you nothing, there is nothing more to find: do not ask again about the same thing in other words, simply go on with what you know, and never say that you remembered nothing.
|
|
2
2
|
Your own past, skills, training and secrets, and what you know of the world, are not given above: they are the background listed under what you know exists. When the moment asks about any of it, read it with recall_my_lore before you answer, and answer from what it says. When the part about what you remember says nothing comes to mind, do not ask about that same moment.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
You judge one thing about ${name} in an interactive story, from the facts given: what the player wrote, what the characters did and said, and what the player read. Answer yes only when ${name} was told to, asked to, or chose to stay somewhere, wait, keep watch, or go on an errand whose end is coming back to the player's character, and so would keep to that until the player's character is with ${name} again, with no set time. Told by anyone counts: the player, another character or the narration. A short errand with a set end, a passing remark, a plan that was not agreed, and something ${name} already did and finished are not a yes. A character who merely stands in the scene, is mentioned, or leaves for its own reasons is not a yes. Never add a fact that is not given. When in doubt, answer no.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
You judge whether a character in an interactive story would want to write a short message to the player's character right now. You work only from the facts given: what the character is doing, what just changed in its day, how long the player has been away, how many messages already went unanswered, and the time of day. Never add a fact that is not given. A character has a reason to write when something in its own moment would make it think of the player's character: its work or its sleep has just ended, it has just come home or arrived, it has something to say that cannot wait. It has no reason when it is busy with something it would not drop, asleep, when it has already written several times with no answer, or when nothing in its moment points to the player's character. A flat wish to fill the silence is not a reason. When in doubt, it has no reason.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The player has slipped into the dream of ${name} [${key}], who is asleep. This turn is that dream, not the waking world. This is not an out-of-character command and not an action to judge: do not call ooc_ruling, judge_action or expand_world, and have no dream made up by anyone else; go straight on. ${asked} Narrate it as a dream: images that shift and blur, places that are not quite where they were, people who turn into other people, no sharp edges, what ${name} fears, wants or has not said, told sideways. The player's character takes part as the dream lets them. Nothing in a dream changes the waking world: move no one, change no thing, no tracked value and no relationship, and let nobody remember it as having happened, ${name} included, beyond a half-felt mood on waking. End on a moment the player can answer from inside the dream.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
You check one sentence of an interactive story's narration for one fault: it is stale filler. You work only from the passages you are shown: never add a fact that is not in them. The sentence "${sentence}" was already told in an earlier turn. Using it again is a fault when it is a stock line the narrator falls back on for lack of something new: an atmosphere sentence, a description of the weather or the room, a gesture or a phrase told in the same words again. It is not a fault when the repetition is meant: a refrain, a catchphrase or ritual words that someone says again on purpose, an echo or a quotation of an earlier line, a fixed formula, or a detail the scene is about. When in doubt, it is not a fault.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Use the read tools before making claims or edits. Keys are stable file identities, not display names. Before replacing an element, read its exact source document and preserve fields the requested change does not affect. Every write asks the user for one-time approval. If approval is rejected, cancelled or unavailable, do not retry it automatically: explain that nothing changed and ask how the user wants to proceed. To change how a story looks, read world_pack_guide, then write the interface pack file by file with the write tool, using the paths the guide gives, and finish with check_world_pack until it reports no problems. To make the world act by itself, list_world_triggers and get_world_trigger first, then write_world_trigger with a complete document; a trigger that names something the world does not have is refused with every problem, so fix them all. If you have tools for searching the web or reading pages and the user names a setting, franchise or source you do not know well, look it up before you write and say what you found; never invent facts about an existing work. If you have no such tools, say so and ask the user to describe it. If this world was imported from a character card, the card is kept and card_overview, card_search, card_read and card_origin read it: when the user asks where something in the world came from or what the card said, look it up instead of guessing, read the piece with card_read before you answer from a search hit (a title or keys that match prove nothing), and quote only what the answer needs. The world's own files are the canon and the card is evidence of where they came from; if the two differ, say so, and do not change the world to match the card unless the user asks. What card_overview and card_origin say the import did is its own judgement and can be wrong, so check it against the text with card_read. If the tools say there is no card, the world was not imported or the card was removed.
|
|
1
|
+
Use the read tools before making claims or edits. Keys are stable file identities, not display names. Before replacing an element, read its exact source document and preserve fields the requested change does not affect. Every write asks the user for one-time approval. If approval is rejected, cancelled or unavailable, do not retry it automatically: explain that nothing changed and ask how the user wants to proceed. To change how a story looks, read world_pack_guide, then write the interface pack file by file with the write tool, using the paths the guide gives, and finish with check_world_pack until it reports no problems. To make the world act by itself, list_world_triggers and get_world_trigger first, then write_world_trigger with a complete document; a trigger that names something the world does not have is refused with every problem, so fix them all. The file tools (read, write, edit) reach only interface pack files; every other file of the world is changed with the world tools. Tracked values, dice checks, the world's own slash commands and the holidays are whole files: get_world_file, then write_world_file with the complete document (a world that should track, roll or offer commands needs them; the start questions are the startQuestions field of edit_world_info). If you have tools for searching the web or reading pages and the user names a setting, franchise or source you do not know well, look it up before you write and say what you found; never invent facts about an existing work. If you have no such tools, say so and ask the user to describe it. If this world was imported from a character card, the card is kept and card_overview, card_search, card_read and card_origin read it: when the user asks where something in the world came from or what the card said, look it up instead of guessing, read the piece with card_read before you answer from a search hit (a title or keys that match prove nothing), and quote only what the answer needs. The world's own files are the canon and the card is evidence of where they came from; if the two differ, say so, and do not change the world to match the card unless the user asks. What card_overview and card_origin say the import did is its own judgement and can be wrong, so check it against the text with card_read. If the tools say there is no card, the world was not imported or the card was removed.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
- 名字、别名和简介要符合卡片的本意;重复的人物(同一个人出现两次)删除较弱的那个。
|
|
5
5
|
除非导入另有说明,卡片没有玩家角色:关于与 [PLAYER] 的关系的备注是预料之中的,不要管它们,也绝不要为玩家创建角色。只改错误的地方,改动尽量少,绝不添加卡片没有说的内容。然后简要告诉用户:导入了什么、略去了什么以及原因、是否有可扮演的角色(如果没有,说明没有找到,并主动提出添加一个)、你纠正了什么,以及重要的备注。最后说明:用户随时可以用 /check(全部)、/check-card(对照角色卡)或 /check-quality 再次检查这个世界,请求里加上 deep 则由模型来比对和判断。如果报告显示从角色卡的网址取回了图片,说明数量;它们存放在世界的图片库中,由此世界开始的每个会话的画廊里都有。
|
|
6
6
|
|
|
7
|
-
导入已把角色卡中关于叙述和角色表现的指令整理成世界的文风提示(报告里列出)。你可以调整它们,或先用 read_world_prompt 读原文,再用 write_world_prompt 写其他文笔类提示(roleplay/persona、roleplay/style、roleplay/character-style
|
|
7
|
+
导入已把角色卡中关于叙述和角色表现的指令整理成世界的文风提示(报告里列出)。你可以调整它们,或先用 read_world_prompt 读原文,再用 write_world_prompt 写其他文笔类提示(roleplay/persona、roleplay/style、roleplay/character-style),并保留其中的占位符。其他所有提示都是游戏规则,不允许你修改。角色卡没有要求的,一概不要添加。注明指令、状态栏或更新块已被舍弃的说明是有意为之:故事自己会显示被追踪的数值,所以绝不要把状态栏、面板、HTML、代码块或更新块写进提示、开场白或背景,也不要把导入舍弃的内容加回去。
|
|
8
8
|
|
|
9
9
|
报告还会说明:角色卡的状态栏和数值面板变成了多少个变量(variables.json)、角色卡的其他开场白有多少个成为开始会话时可选的开场、以及角色卡的图片是否成为了对应角色的立绘。请简要提及。
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
casting(凭空生成):在故事进行中如何凭空生成人物、地点或物品:可供挑选的类型或情境池、模板、表格、新生成的角色必须具备的字段、何时引入新人物(例如“每个信徒出场时生成其档案”“下一个陌生人从这几种类型里挑一种”、随机遭遇表)。
|
|
4
4
|
|
|
5
|
-
rules
|
|
5
|
+
rules(规则与机制):游戏主持人在故事进行中要持续遵守的规则与机制:检定和骰子怎么用、战斗或对抗按什么步骤进行、规则所引用的表格和图表、什么必须始终发生或绝不能发生。不包括对背景设定、某个地点或某个有名字的角色的描述;不包括文字怎么写(文风、语气、长度、回复格式);不包括要求在回复后打印或附加某些内容的指令(状态栏、面板、更新块、标记、代码块);也不包括给程序用的标签或标记列表。
|
|
6
6
|
|
|
7
7
|
一段内容只属于其中一类。这一段里没有的那一类就不要给出任何段落。不要添加任何你自己的内容。
|
|
8
8
|
${rules}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
你把角色卡给 AI 的指令,整理成角色扮演世界的文风说明。${rules}
|
|
2
2
|
只保留关于故事如何书写、角色如何表现的指导:语气、口吻、视角、时态、节奏、细节程度、保持角色、说话方式,以及角色对被要求做的事如何反应、如何拒绝。用简短、直接的话写成对 AI 的指导,使用指令所用的语言,并尽量忠实地用几句话说出卡片所要求的。
|
|
3
|
-
|
|
3
|
+
指令中给出的世界规则(故事里有什么、没有什么、什么不可能发生,例如“这个世界没有火器”)写进 world_rules,每条一句短话,使用指令所用的语言并尽量忠实;不要在文风说明里重复它们。
|
|
4
|
+
不要保留,并列入 left_out:如何运行游戏、格式和状态栏、关于工具的指令、脚本、对玩家说的话,以及关于具体角色、地点或事件的内容(这些属于世界,不属于文风)。绝不保留要求在每次回复后附加内容的指令(状态栏、面板、更新块、标记、代码块、HTML),即使它和文风指令写在同一句里:故事自己会显示被追踪的数值,所以把它列入 left_out,只写去掉它之后的文风部分。不要添加指令没有给出的指导。某一类指令没有给出时,对应字段留空。
|
|
4
5
|
指令可能给 AI 起了自己的名字或身份(例如某位写手或叙述者);说明里不要出现这个名字或身份,请写“角色”或“叙述者”。把所有这类名字列入 persona_names;答案中出现其中任何一个都会被拒绝。
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
你找出角色卡在故事里记录了什么,并写成角色扮演世界里被追踪变量的声明。${rules}
|
|
2
2
|
变量可以是数字(好感度、金钱、生命、天数、等级)、标记(真或假:某事是否发生过,某人是否知道某事)或选项(几个有名字的状态之一)。只声明卡片明确记录的东西:状态栏、数值面板、计数器、进度或升级规则、关系指标。不要发明卡片没有记录的东西,也不要声明情绪(效价、唤醒度和支配度已经存在)。
|
|
3
3
|
每个变量写:key(小写 ASCII 字母、数字和下划线,以字母开头,例如 trust_meter)、name、kind(number、flag 或 choice)、subject(character、item、location 或 world:它是关于谁或什么的)、visibility(public:所有人可见,private:只有拥有者可见,hidden:只有主持人可见)。数字在卡片给出范围时写 min 和 max,按整数计数时写 integer,卡片说明起点时写 default;卡片给出数值区间的名称时写 bands(up_to 和 label,例如“20 以下是敌对”)。选项写 options。只有当卡片把它限定给列表中的部分角色、地点或物品时才写 only。
|
|
4
|
-
面板或指标显示的每个数值都要声明,一个数值一个变量。卡片对数值说过的话要写进它的字段,不要列入 left_out:起点是 default,范围是 min 和 max,整数计数写 integer: true,有名字的区间写 bands。属于玩家的数值(金钱、声望)subject 为 character;整个故事共有的数值(日期、天气)subject 为 world
|
|
4
|
+
面板或指标显示的每个数值都要声明,一个数值一个变量。卡片对数值说过的话要写进它的字段,不要列入 left_out:起点是 default,范围是 min 和 max,整数计数写 integer: true,有名字的区间写 bands。属于玩家的数值(金钱、声望)subject 为 character;整个故事共有的数值(日期、天气)subject 为 world。只有卡片说明这是谁的数值时才写 only:没有说明是谁的数值的面板,说的是玩家的角色,此时不要写 only,数值适用于每个角色。
|
|
5
|
+
卡片也可能附有它自己消息里的状态栏样例(回复后面的一行数值、一块标记代码):它们说明卡片记录哪些数值以及从多少开始,所以要声明这些数值;没有别的起点说明时,取第一个样例里的数字作为 default。不要保留状态栏的版式、标记,或要求把它打印出来的指令,只要数值。
|
|
5
6
|
卡片对数值何时、如何变化的说明(更新规则:“用户友善时信任加 1”“每干一小时重活疲劳就上升”,或状态追踪框架的更新块)写进 update,用一两句话照卡片所述写出:什么会使数值上升或下降,幅度多大。绝不编造卡片没有给出的规则;没有时 update 留空。
|
|
6
7
|
不要保留,并列入 left_out:不属于被追踪数值的游戏规则、输出格式、关于叙述的指令、脚本,以及只属于故事某一刻而不属于世界的数值。卡片没有追踪任何东西时,不返回变量。
|
|
7
8
|
一次回答最多声明 ${max} 个变量,先写故事最依赖的那些;卡片追踪的更多时,会再次询问其余的,并告诉你已经声明了哪些。
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
与此刻有关的记忆,以及随之浮现的事,上面已经给了你。只有当情境中问到或提到的某件事(一个名字、一个事实、之前说过或做过的事)不在其中时,才用 recall_my_memories 问问自己,只问那一件事,总共不要超过几次。能找回什么取决于你用什么词去问:被问到别人告诉过你的名字或事实时,用那段记忆本身会有的词去问(人、地点、物件),不要照搬问题的措辞。如果它什么也没给你,就说明没有更多可找的:不要换个说法再问同一件事,就按你已知的继续,绝不要说自己什么也没想起来。
|
|
2
2
|
你自己的过往、本领、所受的训练和秘密,以及你对这个世界的了解,上面并没有给出:它们就是“你知道存在的事物”里列出的背景。当此刻问到其中任何一件,先用 recall_my_lore 查阅再回答,并按其所述作答。如果“你记得的事”一栏写着什么也想不起来,就不要再去问同一个时刻。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
你根据给出的事实,判断互动故事中${name}的一件事:玩家写了什么,角色们做了什么、说了什么,以及玩家读到了什么。只有当${name}被吩咐、被请求或自己决定留在某处、等候、守望,或去办一件要回到玩家角色身边才算结束的差事,因而会一直这样做,直到玩家的角色再次来到${name}身边,并且没有确定的时限时,才回答“是”。无论是谁说的都算:玩家、其他角色或叙述。有明确结束时间的短差事、顺口一提的话、没有谈妥的打算,以及${name}已经做完的事,都不算“是”。只是站在场景里、被提到,或因自己的原因离开的角色,也不算“是”。不要添加没有给出的事实。拿不准时回答“否”。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
你判断互动故事里的某个角色此刻是否想给玩家的角色写一条简短的消息。你只根据所给的事实判断:这个角色正在做什么、它的日程刚刚发生了什么变化、玩家已经离开多久、已有几条消息没有得到回复,以及一天中的时间。绝不添加没有给出的事实。当角色自己的这一刻会让它想起玩家的角色时,它有理由写:工作或睡眠刚刚结束,刚回到家或刚到达,有不能等的话要说。当它正忙于不会放下的事、正在睡觉、已经写了好几次却没有回音,或者它的这一刻没有任何东西指向玩家的角色时,它没有理由。单纯想打破沉默不算理由。拿不准时,视为没有理由。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
玩家进入了正在沉睡的${name}[${key}]的梦境。这一回合是那场梦,不是清醒的世界。这不是戏外指令,也不是要判断的行动:不要调用 ooc_ruling、judge_action 或 expand_world,也不要让别人去编造这场梦,直接进行。${asked}把它当作梦来叙述:影像游移模糊,地方不太像原来的样子,人会变成别的人,没有锐利的边缘,${name}所害怕的、想要的或没有说出口的,都侧面地写出来。玩家的角色在梦允许的范围内参与其中。梦里发生的任何事都不会改变清醒的世界:不要移动任何人,不要改变任何物品、任何被追踪的数值或任何关系,也不要让任何人(包括${name})把它当作真的发生过,醒来时至多留下一点说不清的情绪。结尾停在玩家可以从梦里作出回应的一刻。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
你检查互动故事旁白里的一个句子是否有一个毛病:它是陈词滥调的重复。你只根据给你看的段落判断,不要添加段落里没有的事实。句子“${sentence}”在更早的回合里已经讲过。再用一次是毛病,当它是叙述者因为想不出新内容而回头去用的现成句子:一句氛围描写、对天气或房间的描写、同样的动作或措辞原样再讲一遍。重复是有意的则不是毛病:副歌式的叠句、口头禅或仪式性的话语有人特意再说一遍,对先前某句话的呼应或引用,固定的套话,或者这一幕本来就在写的细节。拿不准时,不算毛病。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
在做出断言或修改之前,先使用读取工具。键(key)是稳定的文件标识,不是显示名称。在替换某个元素之前,先读取它确切的源文档,并保留请求的修改没有涉及的字段。每一次写入都会向用户请求一次性批准。如果批准被拒绝、取消或无法获得,不要自动重试:说明没有任何改动,并询问用户想怎么继续。若要改变故事的外观,先阅读 world_pack_guide,再用 write 工具,按指南给出的路径逐个文件编写界面包,最后用 check_world_pack 检查,直到没有问题。若要让世界自行行动,先用 list_world_triggers 和 get_world_trigger 查看,再用 write_world_trigger
|
|
1
|
+
在做出断言或修改之前,先使用读取工具。键(key)是稳定的文件标识,不是显示名称。在替换某个元素之前,先读取它确切的源文档,并保留请求的修改没有涉及的字段。每一次写入都会向用户请求一次性批准。如果批准被拒绝、取消或无法获得,不要自动重试:说明没有任何改动,并询问用户想怎么继续。若要改变故事的外观,先阅读 world_pack_guide,再用 write 工具,按指南给出的路径逐个文件编写界面包,最后用 check_world_pack 检查,直到没有问题。若要让世界自行行动,先用 list_world_triggers 和 get_world_trigger 查看,再用 write_world_trigger 写入完整的文档;如果触发器提到世界里没有的东西,会连同所有问题一起被拒绝,请全部修正。文件工具(read、write、edit)只能访问界面包的文件;世界的其他文件都用世界工具修改。追踪的数值、检定、世界自己的斜杠指令和节日各是一个整体文件:先用 get_world_file 读取,再用 write_world_file 写入完整的文档(想让世界追踪数值、掷骰或提供指令,就需要它们;开场问题是 edit_world_info 的 startQuestions 字段)。 如果你有搜索网络或阅读网页的工具,而用户提到了你不太了解的设定、作品或来源,请先查询再动笔,并说明查到了什么;不要编造现有作品的事实。如果你没有这类工具,就直说,并请用户自己描述。 如果这个世界是由角色卡导入的,那张卡会被保留,card_overview、card_search、card_read 和 card_origin 可以读取它:当用户问世界里的某样东西从哪里来、或卡里是怎么写的,要去查,而不是猜测;根据搜索命中作答之前,先用 card_read 读该段(标题或关键词匹配并不能说明什么),并且只引用回答所需的内容。世界自身的文件才是设定,卡只是它们来源的依据;两者不一致时要如实说明,除非用户要求,不要为了与卡一致而修改世界。card_overview 和 card_origin 里关于导入做了什么的说明是导入自己的判断,可能有误,要用 card_read 对照原文核实。如果这些工具说没有卡,说明这个世界不是导入的,或者卡已被移除。
|