@dsh-agentic-roleplay/core 0.3.3 → 0.3.4
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/authoring.js +4 -255
- package/lib/{child-lPncV1ps.js → child-CFjnaTZt.js} +62 -7
- package/lib/client.js +2530 -510
- package/lib/client.js.map +1 -1
- package/lib/{deliver-De62a8i9.js → deliver-CpZOxBX5.js} +47 -10
- package/lib/doctor.js +82 -6
- package/lib/{hooks-Ka22sFNy.js → hooks-KTCR3fNJ.js} +57 -16
- package/lib/images.js +1 -1
- package/lib/index.js +1240 -21
- package/lib/orchestration.js +5 -16
- package/lib/{documents-Do4lz4SB.js → pack-jail-CybSNzxr.js} +464 -27
- package/lib/{presenter-agent-Dt21K96b.js → presenter-agent-CiEVKcjJ.js} +2 -2
- package/lib/{reflection-md7BCYCl.js → reflection-waxFg1x-.js} +3 -3
- package/package.json +2 -2
- package/prompts/en/doctor/procedure.md +1 -1
- package/prompts/en/import/character.md +1 -1
- package/prompts/en/roleplay/record-keeper.md +2 -2
- package/prompts/zh/doctor/procedure.md +1 -1
- package/prompts/zh/import/character.md +1 -1
- package/prompts/zh/roleplay/record-keeper.md +2 -2
package/lib/orchestration.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { n as chatSessionId, r as roleplaySessionOf, t as promptFor } from "./access-EbNdZFbk.js";
|
|
2
2
|
import { _ as API_PREFIX, y as INTENT_STATUSES } from "./packs-BYjrAen6.js";
|
|
3
|
-
import { a as whereabouts, d as sameWords, f as referent, n as memoryReflector, r as recordFailure, s as Timelines, t as dueReflection } from "./reflection-
|
|
3
|
+
import { a as whereabouts, d as sameWords, f as referent, n as memoryReflector, r as recordFailure, s as Timelines, t as dueReflection } from "./reflection-waxFg1x-.js";
|
|
4
4
|
import "./settings-CA6icLL_.js";
|
|
5
5
|
import { D as ReflectionRefusedError, a as wrongLanguage } from "./language-DWVwi1R7.js";
|
|
6
|
-
import {
|
|
6
|
+
import { B as RESULTS, F as describeWhen, H as languageOf, M as ClockError, S as MAX_OOC_ANSWER, U as translator, m as createTools$1, p as PREVIEW_TOOL, u as externalGiven, w as toolEnabled, x as AUTHORING_NEEDS, z as zoneOf } from "./deliver-CpZOxBX5.js";
|
|
7
7
|
import { a as liveSettings } from "./narration-DK2kiIjE.js";
|
|
8
|
-
import { a as runChild,
|
|
8
|
+
import { a as runChild, d as tokensOf, i as childTrace, l as currentTurn, n as childSampling, t as childModel, u as estimateAnswer } from "./child-CFjnaTZt.js";
|
|
9
9
|
import { T as uniqueKey, o as addToLibrary, w as slug } from "./generator-B6FxlKOV.js";
|
|
10
10
|
import { i as updateImage, r as listGallery, t as describeGalleryImage } from "./gallery-CtFDL22W.js";
|
|
11
|
-
import { a as writeVerdicts, i as readVerdicts, n as installHooks, r as storesOf } from "./hooks-
|
|
12
|
-
import { n as interpretImage, s as presentedFor, t as runImagePresenter } from "./presenter-agent-
|
|
11
|
+
import { a as writeVerdicts, i as readVerdicts, n as installHooks, r as storesOf } from "./hooks-KTCR3fNJ.js";
|
|
12
|
+
import { n as interpretImage, s as presentedFor, t as runImagePresenter } from "./presenter-agent-CiEVKcjJ.js";
|
|
13
13
|
import { join } from "node:path";
|
|
14
14
|
import { existsSync } from "node:fs";
|
|
15
15
|
import { SessionId } from "@deepseek-ai/dsh-session";
|
|
@@ -956,17 +956,6 @@ function describeChecks(checks, tr) {
|
|
|
956
956
|
return [tr("The checks of this story:"), ...lines].join("\n");
|
|
957
957
|
}
|
|
958
958
|
//#endregion
|
|
959
|
-
//#region src/host/orchestration/current-turn.ts
|
|
960
|
-
/** The last turn the session started. */
|
|
961
|
-
function currentTurn(agent) {
|
|
962
|
-
const events = agent.session.snapshotEvents();
|
|
963
|
-
for (let index = events.length - 1; index >= 0; index--) {
|
|
964
|
-
const event = events[index];
|
|
965
|
-
if (event?.type === "turn/start") return event.data.turn;
|
|
966
|
-
}
|
|
967
|
-
return 0;
|
|
968
|
-
}
|
|
969
|
-
//#endregion
|
|
970
959
|
//#region src/host/memory/embedding-index.ts
|
|
971
960
|
const BATCH = 32;
|
|
972
961
|
/**
|