@dsh-agentic-roleplay/core 0.7.3 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/{access-DtOxFKBK.js → access-CfQWbNZP.js} +4 -7
- package/lib/authoring-tools-BgmC2oqU.js +3691 -0
- package/lib/authoring.js +59 -24
- package/lib/{child-CyCViUKa.js → child-lYYeOwl2.js} +147 -46
- package/lib/client.js +931 -860
- package/lib/client.js.map +1 -1
- package/lib/compaction.js +8 -13
- package/lib/{doctor-chat-ByDfCMeo.js → doctor-chat-hL1a61hp.js} +2 -3
- package/lib/doctor.js +6 -8
- package/lib/{gallery-DmBZ2L5l.js → gallery-D1V4h8vh.js} +3 -4
- package/lib/{generator-BmdoTIL2.js → generator-CLPosooC.js} +3 -4
- package/lib/helper.js +2 -3
- package/lib/{hooks-C8eELrni.js → hooks-rQTTeOC4.js} +144 -88
- package/lib/images.js +4 -4
- package/lib/index.js +1024 -913
- package/lib/{library-lVNf9qG_.js → library-Dfu0dgRj.js} +32 -21
- package/lib/{lorebook-author-tools-BDOs4i5C.js → lorebook-author-tools-BAaAqZZm.js} +11 -14
- package/lib/lorebook-authoring.js +5 -6
- package/lib/{narration-DvFBqmqe.js → narration-CjB_KwwY.js} +58 -20
- package/lib/orchestration.js +138 -72
- package/lib/{pack-jail-DeTscGT2.js → pack-jail-CN-314ln.js} +94 -137
- package/lib/{packs-CY8ms8v_.js → packs-DIj5BEfq.js} +6 -10
- package/lib/{presenter-agent-cFR4sos3.js → presenter-agent-DR0KvLE0.js} +13 -19
- package/lib/{preset-n4-j6k4S.js → preset-CscHj1-Y.js} +5 -5
- package/lib/{preset-author-tools-2m4BLtws.js → preset-author-tools-CxluF8qc.js} +13 -15
- package/lib/preset-authoring.js +6 -7
- package/lib/presets-HB8kJTaE.js +3993 -0
- package/lib/{reflection-CJB5s0ip.js → reflection-Dg1xtOTW.js} +137 -148
- package/lib/{text-Cwl5s0j0.js → text-DyRN4nDP.js} +13 -7
- package/lib/{turn-guard-BvCs1VxB.js → turn-guard-g_hDn0jR.js} +6 -7
- package/package.json +29 -29
- package/prompts/en/import/casting.md +14 -0
- package/prompts/en/import/character.md +1 -0
- package/prompts/en/import/classifier.md +9 -0
- package/prompts/en/import/finish-draft.md +1 -0
- package/prompts/en/import/generator.md +8 -0
- package/prompts/en/import/notice-repair.md +4 -0
- package/prompts/en/import/repair-again.md +3 -0
- package/prompts/en/import/roster.md +1 -0
- package/prompts/en/import/variables.md +1 -0
- package/prompts/en/roleplay/game-master.md +3 -0
- package/prompts/en/roleplay/standing.md +1 -0
- package/prompts/en/world/author.md +1 -1
- package/prompts/zh/import/casting.md +14 -0
- package/prompts/zh/import/character.md +1 -0
- package/prompts/zh/import/classifier.md +9 -0
- package/prompts/zh/import/finish-draft.md +1 -0
- package/prompts/zh/import/generator.md +8 -0
- package/prompts/zh/import/notice-repair.md +4 -0
- package/prompts/zh/import/repair-again.md +3 -0
- package/prompts/zh/import/roster.md +1 -0
- package/prompts/zh/import/variables.md +1 -0
- package/prompts/zh/roleplay/game-master.md +3 -0
- package/prompts/zh/roleplay/standing.md +1 -0
- package/prompts/zh/world/author.md +1 -1
- package/lib/authoring-tools-CIsWbq0B.js +0 -6317
- package/lib/route-C6SHz9j2.js +0 -518
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./access-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { i as translator, r as languageOf
|
|
6
|
-
import {
|
|
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-HB8kJTaE.js";
|
|
3
|
+
import { n as readPreset$1 } from "./preset-CscHj1-Y.js";
|
|
4
|
+
import { i as contextOf } from "./authoring-tools-BgmC2oqU.js";
|
|
5
|
+
import { i as translator, r as languageOf } from "./text-DyRN4nDP.js";
|
|
6
|
+
import { at as shippedPromptsDirectory, it as shippedLanguages, tt as languageOf$1 } from "./hooks-rQTTeOC4.js";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
9
|
-
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
10
9
|
import { readFile, rm } from "node:fs/promises";
|
|
11
|
-
|
|
10
|
+
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
11
|
+
// src/shared/preset-chat.ts
|
|
12
12
|
const PREFIX = "preset-author-";
|
|
13
13
|
/** Stable DSH chat identity for the authoring conversation of one library preset. */
|
|
14
14
|
function presetChatSessionId(name) {
|
|
@@ -25,8 +25,7 @@ function presetOfChat(chatSessionId) {
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
//#region src/host/authoring/preset-author-tools.ts
|
|
28
|
+
// src/host/authoring/preset-author-tools.ts
|
|
30
29
|
const PRESET_MUTATION_TOOLS = [
|
|
31
30
|
"write_preset_prompt",
|
|
32
31
|
"delete_preset_prompt",
|
|
@@ -37,7 +36,7 @@ const NARRATION_IMPORT_TOOL = "import_narration_preset";
|
|
|
37
36
|
const UPLOAD_PATH = `${IMPORT_FOLDER}/${PRESET_FILE}`;
|
|
38
37
|
/** The command that has a preset's authoring chat turn an uploaded SillyTavern preset into prompts. */
|
|
39
38
|
function narrationImportMessage(language) {
|
|
40
|
-
return translator(languageOf
|
|
39
|
+
return translator(languageOf(language))("Turn the SillyTavern preset I uploaded into this preset's prompts: call {tool} with file {file}.", {
|
|
41
40
|
tool: NARRATION_IMPORT_TOOL,
|
|
42
41
|
file: UPLOAD_PATH
|
|
43
42
|
});
|
|
@@ -143,7 +142,7 @@ function presetAuthorTools(reader, settings, prompting, shipped = shippedPrompts
|
|
|
143
142
|
return json({
|
|
144
143
|
action: "written",
|
|
145
144
|
id: args.id,
|
|
146
|
-
language: languageOf(args.language)
|
|
145
|
+
language: languageOf$1(args.language)
|
|
147
146
|
});
|
|
148
147
|
}
|
|
149
148
|
}),
|
|
@@ -161,7 +160,7 @@ function presetAuthorTools(reader, settings, prompting, shipped = shippedPrompts
|
|
|
161
160
|
return json({
|
|
162
161
|
action: "deleted",
|
|
163
162
|
id: args.id,
|
|
164
|
-
language: languageOf(args.language),
|
|
163
|
+
language: languageOf$1(args.language),
|
|
165
164
|
trashPath
|
|
166
165
|
});
|
|
167
166
|
}
|
|
@@ -277,7 +276,6 @@ async function presetApproval(exec, next, carries) {
|
|
|
277
276
|
}
|
|
278
277
|
};
|
|
279
278
|
}
|
|
280
|
-
//#endregion
|
|
281
279
|
export { presetChatSessionId as a, presetAuthorTools as i, narrationImportMessage as n, presetOfChat as o, presetApproval as r, PresetReader as t };
|
|
282
280
|
|
|
283
|
-
//# sourceMappingURL=preset-author-tools-
|
|
281
|
+
//# sourceMappingURL=preset-author-tools-CxluF8qc.js.map
|
package/lib/preset-authoring.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as limitAuthoringAgents } from "./authoring-tools-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "./hooks-
|
|
5
|
-
import {
|
|
1
|
+
import { n as limitAuthoringAgents } from "./authoring-tools-BgmC2oqU.js";
|
|
2
|
+
import { t as guardAuthoringTurns } from "./turn-guard-g_hDn0jR.js";
|
|
3
|
+
import { i as presetAuthorTools, o as presetOfChat, r as presetApproval, t as PresetReader } from "./preset-author-tools-CxluF8qc.js";
|
|
4
|
+
import "./hooks-rQTTeOC4.js";
|
|
5
|
+
import { c as presetDirectory } from "./presets-HB8kJTaE.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
|
-
|
|
8
|
+
// src/preset-authoring.ts
|
|
9
9
|
const name = "@dsh-agentic-roleplay/core/preset-authoring";
|
|
10
10
|
const inject = [
|
|
11
11
|
"roleplayRoot",
|
|
@@ -55,7 +55,6 @@ function apply(ctx) {
|
|
|
55
55
|
text: (context) => ctx.roleplayPrompts.text(id, languageOf(context))
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
//#endregion
|
|
59
58
|
export { apply, inject, name };
|
|
60
59
|
|
|
61
60
|
//# sourceMappingURL=preset-authoring.js.map
|