@dsh-agentic-roleplay/core 0.10.0 → 0.10.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.
Files changed (37) hide show
  1. package/README.md +1 -1
  2. package/icon.svg +13 -0
  3. package/lib/{authoring-tools-B4mEdKp_.js → authoring-tools-C9cmcUbD.js} +1820 -1243
  4. package/lib/authoring.js +18 -7
  5. package/lib/{child-Dtv76jNx.js → child-C9nPIy9j.js} +40 -5
  6. package/lib/client.js +4668 -2249
  7. package/lib/client.js.map +1 -1
  8. package/lib/compaction.js +2 -2
  9. package/lib/doctor.js +3 -3
  10. package/lib/{gallery-BZJleAeH.js → gallery-CtG-bDzz.js} +2 -2
  11. package/lib/{generator-Cg6CQc5S.js → generator-nLoPM5MF.js} +2 -2
  12. package/lib/helper.js +8 -1
  13. package/lib/{hooks-DTjHWTfx.js → hooks-BpLN_hhT.js} +282 -211
  14. package/lib/images.js +4 -4
  15. package/lib/index.js +1399 -146
  16. package/lib/{library-GIlrkOim.js → library-CH-ahlm0.js} +2 -2
  17. package/lib/{lorebook-author-tools-BCFFJSle.js → lorebook-author-tools-Cg7QQemi.js} +6 -6
  18. package/lib/lorebook-authoring.js +4 -4
  19. package/lib/{narration-BVzew4-K.js → narration-B0hConSw.js} +5 -2
  20. package/lib/orchestration.js +108 -21
  21. package/lib/{pack-jail-hsNQNTOf.js → pack-jail-D5j5mIq6.js} +16 -12
  22. package/lib/{packs-UpK_cvI4.js → packs-Cc05FrId.js} +2 -2
  23. package/lib/{presenter-agent-DZOgBOR9.js → presenter-agent-UKbKYXMO.js} +6 -6
  24. package/lib/{preset-Cyoj1ZWa.js → preset-Be4lz6vB.js} +4 -4
  25. package/lib/{preset-author-tools-RSta6pHK.js → preset-author-tools-C3s0iSfv.js} +6 -6
  26. package/lib/preset-authoring.js +5 -5
  27. package/lib/{presets-CvpsW_10.js → presets-Cl9sU3Qs.js} +152 -14
  28. package/lib/{reflection-0qTvw2It.js → reflection-I9z-PvFK.js} +135 -93
  29. package/lib/{text-CbGQhK1-.js → text-CzqhC8sT.js} +11 -1
  30. package/lib/{turn-guard-BzNeGNnc.js → turn-guard-B9pGCeir.js} +3 -3
  31. package/package.json +4 -2
  32. package/prompts/en/checks/decide-opening.md +7 -1
  33. package/prompts/en/checks/decide-stated.md +1 -0
  34. package/prompts/en/roleplay/record-keeper.md +2 -1
  35. package/prompts/zh/checks/decide-opening.md +7 -1
  36. package/prompts/zh/checks/decide-stated.md +1 -0
  37. package/prompts/zh/roleplay/record-keeper.md +2 -1
package/lib/compaction.js CHANGED
@@ -1,6 +1,6 @@
1
- import { a as liveSettings, t as decodeOutput } from "./narration-BVzew4-K.js";
1
+ import { a as liveSettings, t as decodeOutput } from "./narration-B0hConSw.js";
2
2
  import { l as roleplaySessionOf, t as promptFor } from "./access-CXtaZNbx.js";
3
- import { S as tokensOf, c as runChild, n as childModel, r as childSampling } from "./child-Dtv76jNx.js";
3
+ import { E as tokensOf, l as runChild, n as childModel, r as childSampling } from "./child-C9nPIy9j.js";
4
4
  import { join } from "node:path";
5
5
  import { sessionFolder } from "@dsh-agentic-roleplay/state";
6
6
  import BasicCompactionEngine from "@deepseek-ai/dsh-compaction-basic";
package/lib/doctor.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { c as chatSessionId } from "./access-CXtaZNbx.js";
2
2
  import { n as doctorSessionOf } from "./doctor-chat-hL1a61hp.js";
3
- import { i as externalTools, t as externalToolLimit } from "./hooks-DTjHWTfx.js";
4
- import { a as liveSettings } from "./narration-BVzew4-K.js";
3
+ import { i as externalTools, t as externalToolLimit } from "./hooks-BpLN_hhT.js";
4
+ import { a as liveSettings } from "./narration-B0hConSw.js";
5
5
  import { join } from "node:path";
6
+ import { createTools, isSessionId, sessionDatabase, sessionFolder } from "@dsh-agentic-roleplay/state";
6
7
  import { existsSync } from "node:fs";
7
8
  import { SessionId } from "@deepseek-ai/dsh-session";
8
9
  import { defineTool } from "@deepseek-ai/dsh-tools";
9
- import { createTools, isSessionId, sessionDatabase, sessionFolder } from "@dsh-agentic-roleplay/state";
10
10
  // src/host/agent/doctor-undo.ts
11
11
  const UNDO_SNAPSHOT = "doctor-undo";
12
12
  const UNDO_KEY = "doctor.undo";
@@ -1,5 +1,5 @@
1
1
  import { n as atomicWrite } from "./access-CXtaZNbx.js";
2
- import { _ as writeImageFileMetadata, a as LIBRARY_FOLDER, g as sidecarOf, h as readImageFileMetadata, m as mediaTypeOf, x as mapLimit } from "./library-GIlrkOim.js";
2
+ import { _ as writeImageFileMetadata, a as LIBRARY_FOLDER, g as sidecarOf, h as readImageFileMetadata, m as mediaTypeOf, x as mapLimit } from "./library-CH-ahlm0.js";
3
3
  import { join, sep } from "node:path";
4
4
  import { lstat, readFile, readdir, realpath, stat } from "node:fs/promises";
5
5
  // src/host/images/gallery.ts
@@ -187,4 +187,4 @@ async function updateImage(sessionFolder, path, update) {
187
187
  }
188
188
  export { updateImage as i, galleryFile as n, listGallery as r, describeGalleryImage as t };
189
189
 
190
- //# sourceMappingURL=gallery-BZJleAeH.js.map
190
+ //# sourceMappingURL=gallery-CtG-bDzz.js.map
@@ -1,4 +1,4 @@
1
- import { d as sceneImagePath, f as writeImage, u as referenceImagePath } from "./library-GIlrkOim.js";
1
+ import { d as sceneImagePath, f as writeImage, u as referenceImagePath } from "./library-CH-ahlm0.js";
2
2
  // src/host/images/generator.ts
3
3
  const unique = (values) => [...new Set(values.map((value) => value.trim()).filter((value) => value !== ""))];
4
4
  /** What a reference image shows: the subject and its stable look. */
@@ -141,4 +141,4 @@ async function generateTransientImage(service, request) {
141
141
  }
142
142
  export { uploadReferenceImage as a, transientPrompt as i, generateTransientImage as n, referencePrompt as r, generateReferenceImage as t };
143
143
 
144
- //# sourceMappingURL=generator-Cg6CQc5S.js.map
144
+ //# sourceMappingURL=generator-nLoPM5MF.js.map
package/lib/helper.js CHANGED
@@ -1,4 +1,4 @@
1
- import { o as helpers } from "./child-Dtv76jNx.js";
1
+ import { o as helpers } from "./child-C9nPIy9j.js";
2
2
  // src/helper.ts
3
3
  const name = "@dsh-agentic-roleplay/core/helper";
4
4
  const inject = ["tools", "systemPrompt"];
@@ -16,6 +16,13 @@ function apply(ctx) {
16
16
  return agent === void 0 ? "" : helpers.get(agent.session.id)?.persona ?? "";
17
17
  }
18
18
  });
19
+ ctx.effect(() => ctx.systemPrompt.suppressRuntimeContext(), "roleplay: helper runtime context");
20
+ ctx.systemPrompt.context({
21
+ name: "working-directory:current",
22
+ order: ctx.systemPrompt.getContextOrder("WORKING_DIRECTORY"),
23
+ interpolate: false,
24
+ text: ""
25
+ });
19
26
  ctx.on("agent/created", ({ agent }) => {
20
27
  helpers.get(agent.session.id)?.setup(agent);
21
28
  });