@dsh-agentic-roleplay/core 0.7.1 → 0.7.3
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/README.md +1 -1
- package/lib/{authoring-tools-BKltdiea.js → authoring-tools-CIsWbq0B.js} +197 -20
- package/lib/authoring.js +410 -32
- package/lib/client.js +679 -347
- package/lib/client.js.map +1 -1
- package/lib/doctor.js +1 -1
- package/lib/{gallery-BxZGOgMb.js → gallery-DmBZ2L5l.js} +2 -2
- package/lib/{generator-BFmSYvR8.js → generator-BmdoTIL2.js} +2 -2
- package/lib/{hooks-HnqXO8mM.js → hooks-C8eELrni.js} +2 -2
- package/lib/images.js +4 -4
- package/lib/index.js +111 -566
- package/lib/{library-BGxPKs9a.js → library-lVNf9qG_.js} +37 -4
- package/lib/{lorebook-author-tools-BAnUyRtS.js → lorebook-author-tools-BDOs4i5C.js} +6 -6
- package/lib/lorebook-authoring.js +3 -3
- package/lib/orchestration.js +8 -8
- package/lib/{pack-jail-DLGguGS3.js → pack-jail-DeTscGT2.js} +1255 -12
- package/lib/{packs-jowC-MN_.js → packs-CY8ms8v_.js} +2 -2
- package/lib/{presenter-agent-DvZtnf0Q.js → presenter-agent-cFR4sos3.js} +4 -4
- package/lib/{preset-author-tools-C26kj6t5.js → preset-author-tools-2m4BLtws.js} +6 -6
- package/lib/preset-authoring.js +4 -4
- package/lib/{preset-CXbC0NeU.js → preset-n4-j6k4S.js} +2 -2
- package/lib/{reflection-CvOZGjmn.js → reflection-CJB5s0ip.js} +6 -6
- package/lib/{route-DRTJ_vcA.js → route-C6SHz9j2.js} +2 -2
- package/lib/{text-JbWfTHbr.js → text-Cwl5s0j0.js} +3 -1
- package/package.json +2 -2
- package/prompts/en/import/finish-ok.md +1 -1
- package/prompts/en/world/procedure.md +1 -1
- package/prompts/zh/import/finish-ok.md +1 -1
- package/prompts/zh/world/procedure.md +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as Reader } from "./hooks-
|
|
1
|
+
import { W as Reader } from "./hooks-C8eELrni.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";
|
|
@@ -840,4 +840,4 @@ function anyTab(bases) {
|
|
|
840
840
|
//#endregion
|
|
841
841
|
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 };
|
|
842
842
|
|
|
843
|
-
//# sourceMappingURL=packs-
|
|
843
|
+
//# sourceMappingURL=packs-CY8ms8v_.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as promptFor } from "./access-DtOxFKBK.js";
|
|
2
2
|
import { c as runChild } from "./child-CyCViUKa.js";
|
|
3
|
-
import { c as
|
|
4
|
-
import { n as generateTransientImage, t as generateReferenceImage } from "./generator-
|
|
5
|
-
import { i as updateImage, n as galleryFile, r as listGallery } from "./gallery-
|
|
3
|
+
import { c as nextSceneSerial, u as referenceImagePath } from "./library-lVNf9qG_.js";
|
|
4
|
+
import { n as generateTransientImage, t as generateReferenceImage } from "./generator-BmdoTIL2.js";
|
|
5
|
+
import { i as updateImage, n as galleryFile, r as listGallery } from "./gallery-DmBZ2L5l.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";
|
|
@@ -852,4 +852,4 @@ async function runImagePresenter(job) {
|
|
|
852
852
|
//#endregion
|
|
853
853
|
export { tokensOf as a, searchImages as i, interpretImage as n, present as o, imageTools as r, presentedFor as s, runImagePresenter as t };
|
|
854
854
|
|
|
855
|
-
//# sourceMappingURL=presenter-agent-
|
|
855
|
+
//# sourceMappingURL=presenter-agent-cFR4sos3.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./access-DtOxFKBK.js";
|
|
2
|
-
import {
|
|
3
|
-
import { C as readWorldPrompt, S as listWorldPrompts, b as PROSE_PROMPTS, h as readPreset, m as presetDirectory, s as PRESET_FILE, w as writeWorldPrompt, x as deleteWorldPrompt, y as updatePresetInfo } from "./route-
|
|
4
|
-
import { Q as languageOf, nt as shippedPromptsDirectory, tt as shippedLanguages } from "./hooks-
|
|
5
|
-
import { i as translator, r as languageOf$1 } from "./text-
|
|
6
|
-
import { n as readPreset$1 } from "./preset-
|
|
2
|
+
import { Dt as IMPORT_FOLDER, ct as extractStyleFrom, i as contextOf, mt as withPlayer } from "./authoring-tools-CIsWbq0B.js";
|
|
3
|
+
import { C as readWorldPrompt, S as listWorldPrompts, b as PROSE_PROMPTS, h as readPreset, m as presetDirectory, s as PRESET_FILE, w as writeWorldPrompt, x as deleteWorldPrompt, y as updatePresetInfo } from "./route-C6SHz9j2.js";
|
|
4
|
+
import { Q as languageOf, nt as shippedPromptsDirectory, tt as shippedLanguages } from "./hooks-C8eELrni.js";
|
|
5
|
+
import { i as translator, r as languageOf$1 } from "./text-Cwl5s0j0.js";
|
|
6
|
+
import { n as readPreset$1 } from "./preset-n4-j6k4S.js";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
9
9
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
@@ -280,4 +280,4 @@ async function presetApproval(exec, next, carries) {
|
|
|
280
280
|
//#endregion
|
|
281
281
|
export { presetChatSessionId as a, presetAuthorTools as i, narrationImportMessage as n, presetOfChat as o, presetApproval as r, PresetReader as t };
|
|
282
282
|
|
|
283
|
-
//# sourceMappingURL=preset-author-tools-
|
|
283
|
+
//# sourceMappingURL=preset-author-tools-2m4BLtws.js.map
|
package/lib/preset-authoring.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as limitAuthoringAgents } from "./authoring-tools-
|
|
2
|
-
import { i as presetAuthorTools, o as presetOfChat, r as presetApproval, t as PresetReader } from "./preset-author-tools-
|
|
3
|
-
import { m as presetDirectory } from "./route-
|
|
4
|
-
import "./hooks-
|
|
1
|
+
import { n as limitAuthoringAgents } from "./authoring-tools-CIsWbq0B.js";
|
|
2
|
+
import { i as presetAuthorTools, o as presetOfChat, r as presetApproval, t as PresetReader } from "./preset-author-tools-2m4BLtws.js";
|
|
3
|
+
import { m as presetDirectory } from "./route-C6SHz9j2.js";
|
|
4
|
+
import "./hooks-C8eELrni.js";
|
|
5
5
|
import { t as guardAuthoringTurns } from "./turn-guard-BvCs1VxB.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dt as cleanText, r as MAX_PREVIEW_TEXT, un as ImportCardError } from "./authoring-tools-CIsWbq0B.js";
|
|
2
2
|
import { l as SAMPLING_RANGES } from "./child-CyCViUKa.js";
|
|
3
3
|
//#region src/host/import/preset.ts
|
|
4
4
|
/** The older preset layout keeps its texts under fixed keys. */
|
|
@@ -239,4 +239,4 @@ function selectPrompts(file, enabled, keepSampling) {
|
|
|
239
239
|
//#endregion
|
|
240
240
|
export { readPreset as n, selectPrompts as r, previewPreset as t };
|
|
241
241
|
|
|
242
|
-
//# sourceMappingURL=preset-
|
|
242
|
+
//# sourceMappingURL=preset-n4-j6k4S.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { o as roleplaySessionOf, t as promptFor } from "./access-DtOxFKBK.js";
|
|
2
|
-
import { a as routeVerdicts, f as listPresets, i as noAt, n as askYesNo, o as yesAt, p as loadPreset, r as mergeReports, t as announceProblem, v as sha } from "./route-
|
|
3
|
-
import { A as answerLimits, D as describeWhen, E as describeTime, J as PROMPTS_FOLDER, R as wrongLanguage, Z as inheritPrompts } from "./hooks-
|
|
4
|
-
import { i as translator, r as languageOf, t as trimCharacters } from "./text-
|
|
2
|
+
import { a as routeVerdicts, f as listPresets, i as noAt, n as askYesNo, o as yesAt, p as loadPreset, r as mergeReports, t as announceProblem, v as sha } from "./route-C6SHz9j2.js";
|
|
3
|
+
import { A as answerLimits, D as describeWhen, E as describeTime, J as PROMPTS_FOLDER, R as wrongLanguage, Z as inheritPrompts } from "./hooks-C8eELrni.js";
|
|
4
|
+
import { i as translator, r as languageOf, t as trimCharacters } from "./text-Cwl5s0j0.js";
|
|
5
5
|
import { a as childTrace, c as runChild, n as childModel, r as childSampling, v as estimateAnswer } from "./child-CyCViUKa.js";
|
|
6
|
-
import {
|
|
7
|
-
import { i as inheritPacks } from "./packs-
|
|
6
|
+
import { s as inheritImages } from "./library-lVNf9qG_.js";
|
|
7
|
+
import { i as inheritPacks } from "./packs-CY8ms8v_.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";
|
|
@@ -2039,4 +2039,4 @@ function memoryReflector(deps) {
|
|
|
2039
2039
|
//#endregion
|
|
2040
2040
|
export { referent as _, whereabouts as a, copyPreset as c, switchPreset as d, readTimeline as f, sameWords as g, defaultBoundaries as h, reflectionStatus as i, presetStatus as l, pathTo as m, memoryReflector as n, TimelineError as o, writeTimeline as p, recordFailure as r, Timelines as s, dueReflection as t, recordPreset as u };
|
|
2041
2041
|
|
|
2042
|
-
//# sourceMappingURL=reflection-
|
|
2042
|
+
//# sourceMappingURL=reflection-CJB5s0ip.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./narration-DvFBqmqe.js";
|
|
2
|
-
import { $ as listFiles, J as PROMPTS_FOLDER, Q as languageOf, et as promptProblem, nt as shippedPromptsDirectory, q as LANGUAGE_FOLDER, tt as shippedLanguages } from "./hooks-
|
|
2
|
+
import { $ as listFiles, J as PROMPTS_FOLDER, Q as languageOf, et as promptProblem, nt as shippedPromptsDirectory, q as LANGUAGE_FOLDER, tt as shippedLanguages } from "./hooks-C8eELrni.js";
|
|
3
3
|
import { u as parseSampling } from "./child-CyCViUKa.js";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
@@ -515,4 +515,4 @@ function mergeReports(mode, reports) {
|
|
|
515
515
|
//#endregion
|
|
516
516
|
export { readWorldPrompt as C, INTENT_TYPES as D, INTENT_STATUSES as E, listWorldPrompts as S, INTENT_HORIZONS as T, savePresetFromWorld as _, routeVerdicts as a, PROSE_PROMPTS as b, createPresetFromGuidance as c, isPresetName as d, listPresets as f, reservePreset as g, readPreset as h, noAt as i, createPresetFromShipped as l, presetDirectory as m, askYesNo as n, yesAt as o, loadPreset as p, mergeReports as r, PRESET_FILE as s, announceProblem as t, deletePreset as u, sha as v, writeWorldPrompt as w, deleteWorldPrompt as x, updatePresetInfo as y };
|
|
517
517
|
|
|
518
|
-
//# sourceMappingURL=route-
|
|
518
|
+
//# sourceMappingURL=route-C6SHz9j2.js.map
|
|
@@ -216,6 +216,8 @@ 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, then tell me briefly what you changed, what you left alone and why.": "这个世界所依据的角色卡有了新版本,放在这个世界的 .import/update 文件夹里。请让世界与它保持一致。先调用 card_diff:它会列出两个版本之间的变化、每个变化的片段生成了哪些角色、地点和物品,以及导入之后世界里哪些文件被修改过。需要时用 card_read 读取片段(version 为 current 是旧卡,为 new 是新卡)。然后用你的编辑工具只改新卡改动的部分,并保留用户在导入之后做的修改。卡片对世界本身的描述(简介、标签和开场)用 edit_world_info 修改。只由已被删除的片段生成、且用户没有改过的内容,要移除。两个版本的卡都没有写的内容,一概不要添加。世界与新卡一致后,调用 card_update_finish,再简要告诉我:你改了什么、哪些没动以及原因。",
|
|
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。你的工具做不了的改动,或需要用户决定的改动,写进报告里;然后说明还剩什么。",
|
|
219
221
|
"Turn the SillyTavern lorebook I uploaded into this lorebook: call {tool} with file {file}.": "把我上传的 SillyTavern 世界书转成这本世界书:调用 {tool},文件为 {file}。",
|
|
220
222
|
"Turn the SillyTavern preset I uploaded into this preset's prompts: call {tool} with file {file}.": "把我上传的 SillyTavern 预设转成这个预设的提示词:调用 {tool},文件为 {file}。",
|
|
221
223
|
"Apply the narration preset I uploaded to this world: call {tool} with file {file}.": "把我上传的叙述预设应用到这个世界:调用 {tool},文件为 {file}。",
|
|
@@ -292,4 +294,4 @@ function withoutExtension(value) {
|
|
|
292
294
|
//#endregion
|
|
293
295
|
export { translator as i, withoutExtension as n, languageOf as r, trimCharacters as t };
|
|
294
296
|
|
|
295
|
-
//# sourceMappingURL=text-
|
|
297
|
+
//# sourceMappingURL=text-Cwl5s0j0.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-agentic-roleplay/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
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.7.
|
|
79
|
+
"@dsh-agentic-roleplay/state": "0.7.3",
|
|
80
80
|
"@dsh-ai-providers/core": "^0.5.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
@@ -2,7 +2,7 @@ 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. 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.
|
|
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 offering to compare the world with the original card if the person wants it checked (you can read the card with card_overview and card_read), and do not do it now. 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
|
|
|
@@ -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.
|
|
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.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
- 先用 get_world_overview,再看各个地点及其出口(list_relationships 的出口、get_world_element_source):每条通路都应通向卡片所暗示的地方;通向毫不相干地点的出口、无法到达的地点、被错误放进另一个地点的地点,都要修正或删除。
|
|
3
3
|
- 每个角色的起始地点要符合卡片,可扮演的角色(如果有)要从故事能够开始的地方出发。
|
|
4
4
|
- 名字、别名和简介要符合卡片的本意;重复的人物(同一个人出现两次)删除较弱的那个。
|
|
5
|
-
除非导入另有说明,卡片没有玩家角色:关于与 [PLAYER]
|
|
5
|
+
除非导入另有说明,卡片没有玩家角色:关于与 [PLAYER] 的关系的备注是预料之中的,不要管它们,也绝不要为玩家创建角色。只改错误的地方,改动尽量少,绝不添加卡片没有说的内容。然后简要告诉用户:导入了什么、略去了什么以及原因、是否有可扮演的角色(如果没有,说明没有找到,并主动提出添加一个)、你纠正了什么,以及重要的备注。最后主动提出:如果用户希望,可以把世界与原始角色卡对照检查(用 card_overview 和 card_read 读卡),但现在不要做。如果报告显示从角色卡的网址取回了图片,说明数量;它们存放在世界的图片库中,由此世界开始的每个会话的画廊里都有。
|
|
6
6
|
|
|
7
7
|
导入已把角色卡中关于叙述和角色表现的指令整理成世界的文风提示(报告里列出)。你可以调整它们,或先用 read_world_prompt 读原文,再用 write_world_prompt 写其他文笔类提示(roleplay/persona、roleplay/style、roleplay/character-style),并保留其中的占位符。其他所有提示都是游戏规则,不允许你修改。角色卡没有要求的,一概不要添加。
|
|
8
8
|
|
|
@@ -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 写入完整的文档;如果触发器提到世界里没有的东西,会连同所有问题一起被拒绝,请全部修正。 如果你有搜索网络或阅读网页的工具,而用户提到了你不太了解的设定、作品或来源,请先查询再动笔,并说明查到了什么;不要编造现有作品的事实。如果你没有这类工具,就直说,并请用户自己描述。 如果这个世界是由角色卡导入的,那张卡会被保留,card_overview、card_search、card_read 和 card_origin 可以读取它:当用户问世界里的某样东西从哪里来、或卡里是怎么写的,要去查,而不是猜测;根据搜索命中作答之前,先用 card_read 读该段(标题或关键词匹配并不能说明什么),并且只引用回答所需的内容。世界自身的文件才是设定,卡只是它们来源的依据;两者不一致时要如实说明,除非用户要求,不要为了与卡一致而修改世界。card_overview 和 card_origin 里关于导入做了什么的说明是导入自己的判断,可能有误,要用 card_read 对照原文核实。如果这些工具说没有卡,说明这个世界不是导入的,或者卡已被移除。
|