@dsh-agentic-roleplay/core 0.8.1 → 0.9.0
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-DtOxFKBK.js → access-CfQWbNZP.js} +4 -7
- package/lib/{authoring-tools-DNnx0Nts.js → authoring-tools-CdHlvx32.js} +2125 -152
- package/lib/authoring.js +143 -47
- package/lib/{child-D6mpkkCE.js → child-lYYeOwl2.js} +28 -51
- package/lib/client.js +611 -774
- 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-D9nG3C78.js → gallery-BKh7eu80.js} +3 -4
- package/lib/{generator-r1Czm7oi.js → generator-DdZ1-sgv.js} +3 -4
- package/lib/helper.js +2 -3
- package/lib/{hooks-BQCzgggH.js → hooks-CcQj_dJo.js} +69 -97
- package/lib/images.js +4 -4
- package/lib/index.js +195 -265
- package/lib/{library-zI-2tG7h.js → library-QFL6Z_Nr.js} +9 -15
- package/lib/{lorebook-author-tools-ywaYicwd.js → lorebook-author-tools-DWBnYo1E.js} +10 -13
- package/lib/lorebook-authoring.js +5 -6
- package/lib/{narration-CnBlVure.js → narration-CjB_KwwY.js} +9 -15
- package/lib/orchestration.js +53 -64
- package/lib/{pack-jail-5EJ-WYyW.js → pack-jail-BMy6NcCY.js} +81 -788
- package/lib/{packs-Cv8hanXJ.js → packs-BREPSfHy.js} +6 -10
- package/lib/{presenter-agent-BSaMSd3G.js → presenter-agent-B49-_iUm.js} +12 -18
- package/lib/{preset-CWI3-0r1.js → preset-BqgY1Tz4.js} +5 -6
- package/lib/{preset-author-tools-BrJYa2cr.js → preset-author-tools-BB_Dcv2o.js} +12 -14
- package/lib/preset-authoring.js +6 -7
- package/lib/{presets-MwOSMMyu.js → presets-Bwnrx7p0.js} +69 -63
- package/lib/{reflection-zSaMsjKj.js → reflection-CUWG-6Qg.js} +19 -30
- package/lib/{text-BzudpQLS.js → text-CbGQhK1-.js} +9 -10
- package/lib/{turn-guard-Cv8pfHEA.js → turn-guard-Bb8Ew-1z.js} +6 -11
- package/package.json +29 -29
- 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/casting.md +1 -1
- package/prompts/en/import/character.md +1 -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/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/casting.md +1 -1
- package/prompts/zh/import/character.md +1 -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
|
-
|
|
1
|
+
// src/shared/chat.ts
|
|
2
2
|
const CHAT_PREFIX = "session-";
|
|
3
3
|
const UUID_V4 = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
|
|
4
4
|
/** The DSH chat of a roleplay session is named after the session's id. */
|
|
@@ -11,8 +11,7 @@ function roleplaySessionOf(chat) {
|
|
|
11
11
|
const id = chat.slice(8);
|
|
12
12
|
return UUID_V4.test(id) ? id : void 0;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
//#region ../dsh-roleplay-model/src/variable.ts
|
|
14
|
+
// ../dsh-roleplay-model/src/variable.ts
|
|
16
15
|
/** What a variable holds: a number within bounds, a yes or no, or one of a list of words. */
|
|
17
16
|
const VARIABLE_KINDS = [
|
|
18
17
|
"number",
|
|
@@ -136,15 +135,13 @@ const VARIABLE_VISIBILITIES = [
|
|
|
136
135
|
always: false,
|
|
137
136
|
builtin: true
|
|
138
137
|
}));
|
|
139
|
-
|
|
140
|
-
//#region src/host/prompts/access.ts
|
|
138
|
+
// src/host/prompts/access.ts
|
|
141
139
|
/** The prompt `id` in `language`, from the library of the agent's own context. */
|
|
142
140
|
function promptFor(agent, id, language, variables) {
|
|
143
141
|
const library = agent.ctx.get("roleplayPrompts");
|
|
144
142
|
if (library === void 0) throw new Error("the prompt library is not running");
|
|
145
143
|
return library.text(id, language, variables, roleplaySessionOf(agent.session.id));
|
|
146
144
|
}
|
|
147
|
-
//#endregion
|
|
148
145
|
export { chatSessionId as a, VARIABLE_VISIBILITIES as i, VARIABLE_KINDS as n, roleplaySessionOf as o, VARIABLE_SUBJECTS as r, promptFor as t };
|
|
149
146
|
|
|
150
|
-
//# sourceMappingURL=access-
|
|
147
|
+
//# sourceMappingURL=access-CfQWbNZP.js.map
|