@dsh-agentic-roleplay/core 0.9.1 → 0.10.1
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-CfQWbNZP.js → access-CXtaZNbx.js} +50 -2
- package/lib/{authoring-tools-C_l07RYn.js → authoring-tools-C6Hzy8jU.js} +1571 -1301
- package/lib/authoring.js +19 -8
- package/lib/{child-lYYeOwl2.js → child-C8r8AFpm.js} +150 -14
- package/lib/client.js +6295 -3329
- package/lib/client.js.map +1 -1
- package/lib/compaction.js +3 -3
- package/lib/doctor.js +3 -3
- package/lib/{gallery-q7niLtWn.js → gallery-CtG-bDzz.js} +5 -9
- package/lib/{generator-BpjPrvHe.js → generator-nLoPM5MF.js} +2 -2
- package/lib/helper.js +1 -1
- package/lib/{hooks-DNaDzMjW.js → hooks-BuQ61nvQ.js} +207 -56
- package/lib/images.js +4 -4
- package/lib/index.js +1312 -125
- package/lib/{library-CIkxhf_R.js → library-CH-ahlm0.js} +7 -14
- package/lib/{lorebook-author-tools-BiMDmdFi.js → lorebook-author-tools-B6_Jj8oe.js} +7 -7
- package/lib/lorebook-authoring.js +4 -4
- package/lib/{narration-CjB_KwwY.js → narration-B0hConSw.js} +11 -53
- package/lib/orchestration.js +196 -14
- package/lib/{pack-jail-B35Vx3hT.js → pack-jail-OZSgU85i.js} +11 -11
- package/lib/{packs-BajKw7S9.js → packs-B88bxt8E.js} +2 -2
- package/lib/{presenter-agent-jgtuTwZr.js → presenter-agent-D-WNs626.js} +12 -17
- package/lib/{preset-DWgkcPau.js → preset-DNuqvMan.js} +4 -4
- package/lib/{preset-author-tools-BhuYIKms.js → preset-author-tools-CDwavcTb.js} +7 -7
- package/lib/preset-authoring.js +5 -5
- package/lib/{presets-9GzaSELc.js → presets-9_MNxwaw.js} +105 -10
- package/lib/{reflection-4L0Plvct.js → reflection-BvM0w1R4.js} +179 -112
- package/lib/{text-CbGQhK1-.js → text-CzqhC8sT.js} +11 -1
- package/lib/{turn-guard-sCUXmp-5.js → turn-guard-Ygdww1Wt.js} +3 -3
- package/package.json +2 -2
- package/prompts/en/checks/conflict.md +1 -1
- package/prompts/en/checks/decide-conflict.md +1 -1
- package/prompts/en/checks/decide-opening.md +1 -1
- package/prompts/en/checks/decide-same-value.md +1 -1
- package/prompts/en/checks/decide-sheet.md +1 -1
- package/prompts/en/checks/decide-stated.md +1 -0
- package/prompts/en/checks/fidelity.md +1 -0
- package/prompts/zh/checks/conflict.md +1 -1
- package/prompts/zh/checks/decide-conflict.md +1 -1
- package/prompts/zh/checks/decide-opening.md +1 -1
- package/prompts/zh/checks/decide-same-value.md +1 -1
- package/prompts/zh/checks/decide-sheet.md +1 -1
- package/prompts/zh/checks/decide-stated.md +1 -0
- package/prompts/zh/checks/fidelity.md +1 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./access-
|
|
2
|
-
import { i as translator, n as withoutExtension, r as languageOf, t as trimCharacters } from "./text-
|
|
1
|
+
import { n as atomicWrite } from "./access-CXtaZNbx.js";
|
|
2
|
+
import { i as translator, n as withoutExtension, r as languageOf, t as trimCharacters } from "./text-CzqhC8sT.js";
|
|
3
3
|
import { dirname, extname, join } from "node:path";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
|
-
import { createHash
|
|
5
|
+
import { createHash } from "node:crypto";
|
|
6
6
|
import { copyFile, link, mkdir, readFile, readdir, rename, unlink, writeFile } from "node:fs/promises";
|
|
7
7
|
// src/host/import/run.ts
|
|
8
8
|
/** What `ImportContext.embed` rejects with when no embedding provider is selected or loaded: the checks that would use it go without. */
|
|
@@ -170,15 +170,10 @@ async function readImageFileMetadata(file) {
|
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
async function replaceAtomically(file, data) {
|
|
174
|
-
const temporary = `${file}.${process.pid}.${randomUUID()}.writing`;
|
|
175
|
-
await writeFile(temporary, data);
|
|
176
|
-
await rename(temporary, file);
|
|
177
|
-
}
|
|
178
173
|
/** Writes the metadata where the format keeps it, replacing what was there. */
|
|
179
174
|
async function writeImageFileMetadata(file, metadata) {
|
|
180
|
-
if (extname(file).toLowerCase() === ".png") await
|
|
181
|
-
else await
|
|
175
|
+
if (extname(file).toLowerCase() === ".png") await atomicWrite(file, withPngMetadata(await readFile(file), metadata));
|
|
176
|
+
else await atomicWrite(sidecarOf(file), `${JSON.stringify(metadata, null, 2)}\n`);
|
|
182
177
|
}
|
|
183
178
|
// src/host/images/storage.ts
|
|
184
179
|
const PLURAL = {
|
|
@@ -355,9 +350,7 @@ async function addToLibraryOnce(sessionFolder, bytes, originalName, known) {
|
|
|
355
350
|
await mkdir(directory, { recursive: true });
|
|
356
351
|
const name = libraryName(originalName, extension, (candidate) => existsSync(join(directory, candidate)));
|
|
357
352
|
const file = join(directory, name);
|
|
358
|
-
|
|
359
|
-
await writeFile(temporary, bytes);
|
|
360
|
-
await rename(temporary, file);
|
|
353
|
+
await atomicWrite(file, bytes);
|
|
361
354
|
await writeImageFileMetadata(file, {
|
|
362
355
|
schema: "dsh-roleplay-image/v3",
|
|
363
356
|
purpose: "uploaded",
|
|
@@ -381,4 +374,4 @@ async function addToLibrary(sessionFolder, bytes, originalName) {
|
|
|
381
374
|
}
|
|
382
375
|
export { slug as C, norm as S, uniqueKey as T, writeImageFileMetadata as _, LIBRARY_FOLDER as a, NoEmbeddingService as b, nextSceneSerial as c, sceneImagePath as d, writeImage as f, sidecarOf as g, readImageFileMetadata as h, libraryHashes as i, readImageMetadata as l, mediaTypeOf as m, addToLibraryOnce as n, entityImageDirectory as o, MEDIA_TYPES as p, imageExtensionOf as r, inheritImages as s, addToLibrary as t, referenceImagePath as u, readPngMetadata as v, trOf as w, mapLimit as x, withPngMetadata as y };
|
|
383
376
|
|
|
384
|
-
//# sourceMappingURL=library-
|
|
377
|
+
//# sourceMappingURL=library-CH-ahlm0.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./access-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { C as slug, T as uniqueKey, w as trOf, x as mapLimit } from "./library-
|
|
5
|
-
import { i as translator, r as languageOf } from "./text-
|
|
6
|
-
import {
|
|
1
|
+
import "./access-CXtaZNbx.js";
|
|
2
|
+
import { $t as ImportCardError, dt as lorebookDirectory, ft as readLorebook$1, ht as writeLorebookEntry, i as contextOf, mt as updateLorebookInfo, ot as deleteLorebookEntry, r as MAX_PREVIEW_TEXT, st as entriesOf, ut as loadLorebook } from "./authoring-tools-C6Hzy8jU.js";
|
|
3
|
+
import { $ as IMPORT_FOLDER, Lt as LORE_KINDS, Q as withPlayer, Rt as LORE_SCOPES, Y as cleanText, Z as partsOf, n as createPresetFromGuidance } from "./presets-9_MNxwaw.js";
|
|
4
|
+
import { C as slug, T as uniqueKey, w as trOf, x as mapLimit } from "./library-CH-ahlm0.js";
|
|
5
|
+
import { i as translator, r as languageOf } from "./text-CzqhC8sT.js";
|
|
6
|
+
import { ot as shippedPromptsDirectory } from "./hooks-BuQ61nvQ.js";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { existsSync, readFileSync } from "node:fs";
|
|
9
9
|
import { readFile, rm, writeFile } from "node:fs/promises";
|
|
@@ -696,4 +696,4 @@ async function lorebookApproval(exec, next, state) {
|
|
|
696
696
|
}
|
|
697
697
|
export { lorebookImportMessage as a, readLorebook as c, lorebookOfChat as d, lorebookAuthorTools as i, selectEntries as l, LorebookReader as n, pendingTargets as o, lorebookApproval as r, previewLorebook as s, LOREBOOK_UPLOAD as t, lorebookChatSessionId as u };
|
|
698
698
|
|
|
699
|
-
//# sourceMappingURL=lorebook-author-tools-
|
|
699
|
+
//# sourceMappingURL=lorebook-author-tools-B6_Jj8oe.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as guardAuthoringTurns } from "./turn-guard-
|
|
3
|
-
import { d as lorebookOfChat, i as lorebookAuthorTools, n as LorebookReader, o as pendingTargets, r as lorebookApproval } from "./lorebook-author-tools-
|
|
4
|
-
import "./hooks-
|
|
1
|
+
import { dt as lorebookDirectory, n as limitAuthoringAgents } from "./authoring-tools-C6Hzy8jU.js";
|
|
2
|
+
import { t as guardAuthoringTurns } from "./turn-guard-Ygdww1Wt.js";
|
|
3
|
+
import { d as lorebookOfChat, i as lorebookAuthorTools, n as LorebookReader, o as pendingTargets, r as lorebookApproval } from "./lorebook-author-tools-B6_Jj8oe.js";
|
|
4
|
+
import "./hooks-BuQ61nvQ.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { existsSync, readdirSync } from "node:fs";
|
|
7
7
|
// src/lorebook-authoring.ts
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import "./access-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { randomUUID } from "node:crypto";
|
|
5
|
-
import { chmod, mkdir, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
1
|
+
import { i as atomicWriteSync } from "./access-CXtaZNbx.js";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
6
4
|
// ../dsh-roleplay-model/src/clock.ts
|
|
7
5
|
/**
|
|
8
6
|
* How the story's time passes: `simulated` moves only when the story does (the game master says how
|
|
@@ -194,7 +192,10 @@ const SETTINGS_SPEC = {
|
|
|
194
192
|
confidence: ratio(0, 1, .7)
|
|
195
193
|
},
|
|
196
194
|
interface: { pack: text(60, "") },
|
|
197
|
-
rewind: {
|
|
195
|
+
rewind: {
|
|
196
|
+
keepSnapshots: integer(0, 500, 30),
|
|
197
|
+
rolls: choice(["reroll", "keep"], "reroll")
|
|
198
|
+
},
|
|
198
199
|
rules: { own: text(MAX_OWN_RULES, "") },
|
|
199
200
|
preview: { enabled: flag(true) },
|
|
200
201
|
suggestions: { count: integer(0, 5, 3) },
|
|
@@ -319,50 +320,6 @@ function parseSettings(value) {
|
|
|
319
320
|
value: parsed
|
|
320
321
|
};
|
|
321
322
|
}
|
|
322
|
-
// src/host/atomic-write.ts
|
|
323
|
-
/**
|
|
324
|
-
* Replaces a file in one step: the data goes to a temporary file in the same folder and is renamed over the file, so an interruption leaves the old file or the new one,
|
|
325
|
-
* never half of either. Every writer of a file someone else may read at the same time goes through here.
|
|
326
|
-
*/
|
|
327
|
-
async function atomicWrite(file, data, options = {}) {
|
|
328
|
-
if (options.createDirectory === true) await mkdir(dirname(file), { recursive: true });
|
|
329
|
-
const temporary = join(dirname(file), `.${basename(file)}.${process.pid}.${randomUUID()}.tmp`);
|
|
330
|
-
try {
|
|
331
|
-
const mode = options.mode ?? await stat(file).then((value) => value.mode & 511, (error) => {
|
|
332
|
-
if (error.code === "ENOENT") return 420;
|
|
333
|
-
throw error;
|
|
334
|
-
});
|
|
335
|
-
await writeFile(temporary, data, { mode });
|
|
336
|
-
await chmod(temporary, mode);
|
|
337
|
-
await rename(temporary, file);
|
|
338
|
-
} catch (error) {
|
|
339
|
-
await rm(temporary, { force: true });
|
|
340
|
-
throw error;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
/** A JSON file written the same way, with the indentation given (none by default) and a final newline when it is indented. */
|
|
344
|
-
async function atomicWriteJson(file, value, options = {}) {
|
|
345
|
-
const { indent, ...rest } = options;
|
|
346
|
-
await atomicWrite(file, indent === void 0 ? JSON.stringify(value) : `${JSON.stringify(value, null, indent)}\n`, rest);
|
|
347
|
-
}
|
|
348
|
-
/** The synchronous form, for the few writers that cannot wait (the chat settings, read at every step). */
|
|
349
|
-
function atomicWriteSync(file, data) {
|
|
350
|
-
const temporary = join(dirname(file), `.${basename(file)}.${process.pid}.${randomUUID()}.tmp`);
|
|
351
|
-
try {
|
|
352
|
-
let mode = 420;
|
|
353
|
-
try {
|
|
354
|
-
mode = statSync(file).mode & 511;
|
|
355
|
-
} catch (error) {
|
|
356
|
-
if (error.code !== "ENOENT") throw error;
|
|
357
|
-
}
|
|
358
|
-
writeFileSync(temporary, data, { mode });
|
|
359
|
-
chmodSync(temporary, mode);
|
|
360
|
-
renameSync(temporary, file);
|
|
361
|
-
} catch (error) {
|
|
362
|
-
rmSync(temporary, { force: true });
|
|
363
|
-
throw error;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
323
|
// src/host/sessions/settings.ts
|
|
367
324
|
const SETTINGS_FILE = "settings.json";
|
|
368
325
|
const known = /* @__PURE__ */ new Map();
|
|
@@ -406,7 +363,8 @@ function readSettings(folder) {
|
|
|
406
363
|
function writeSettings(folder, value) {
|
|
407
364
|
const parsed = parseSettings(value);
|
|
408
365
|
if (!parsed.ok) throw new InvalidSettingsError(parsed.problems);
|
|
409
|
-
|
|
366
|
+
const file = join(folder, SETTINGS_FILE);
|
|
367
|
+
atomicWriteSync(file, `${JSON.stringify(parsed.value, null, 2)}\n`);
|
|
410
368
|
known.delete(folder);
|
|
411
369
|
return parsed.value;
|
|
412
370
|
}
|
|
@@ -494,6 +452,6 @@ function decodeOutput(text) {
|
|
|
494
452
|
return;
|
|
495
453
|
}
|
|
496
454
|
}
|
|
497
|
-
export {
|
|
455
|
+
export { emptyStats as _, liveSettings as a, writeSettings as c, parseSettings as d, parseSwitchboard as f, GATE_SITES as g, DECISION_SITES as h, InvalidSettingsError as i, DEFAULT_SETTINGS as l, rulesOf as m, encodeOutput as n, readSettings as o, WORLD_RULES_KEY as p, encodePreview as r, useChildReasoning as s, decodeOutput as t, SETTINGS_SPEC as u };
|
|
498
456
|
|
|
499
|
-
//# sourceMappingURL=narration-
|
|
457
|
+
//# sourceMappingURL=narration-B0hConSw.js.map
|
package/lib/orchestration.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { D as describeWhen, G as commandsOf, O as zoneOf, R as wrongLanguage, T as ClockError,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { B as
|
|
6
|
-
import { i as translator, r as languageOf } from "./text-
|
|
7
|
-
import { a as liveSettings,
|
|
8
|
-
import { C as slug, T as uniqueKey, t as addToLibrary } from "./library-
|
|
9
|
-
import { _ as API_PREFIX } from "./packs-
|
|
10
|
-
import { i as updateImage, r as listGallery, t as describeGalleryImage } from "./gallery-
|
|
11
|
-
import { n as interpretImage, s as presentedFor, t as runImagePresenter } from "./presenter-agent-
|
|
1
|
+
import { c as chatSessionId, l as roleplaySessionOf, t as promptFor } from "./access-CXtaZNbx.js";
|
|
2
|
+
import { D as describeWhen, G as commandFlagKey, K as commandsOf, O as zoneOf, R as wrongLanguage, T as ClockError, W as COMMANDS_KEY, c as record, dt as ReflectionRefusedError, f as MAX_OOC_ANSWER, ht as AUTHORING_NEEDS, k as RESULTS, l as characterRunner, n as installHooks, o as PREVIEW_TOOL, p as storesOf, r as externalGiven, s as createTools$1, st as shippedText, u as toolEnabled, v as readVerdicts, y as writeVerdicts } from "./hooks-BuQ61nvQ.js";
|
|
3
|
+
import { C as tokensOf, S as estimateAnswer, a as childTrace, c as runChild, n as childModel, r as childSampling, y as currentTurn } from "./child-C8r8AFpm.js";
|
|
4
|
+
import { a as whereabouts, m as referent, n as memoryReflector, p as sameWords, r as recordFailure, s as Timelines, t as dueReflection } from "./reflection-BvM0w1R4.js";
|
|
5
|
+
import { B as modeFor, H as routeVerdicts, L as announceProblem, R as askYesNo, U as yesAt, V as noAt, Vt as INTENT_STATUSES, m as STANDING_PROMPT } from "./presets-9_MNxwaw.js";
|
|
6
|
+
import { i as translator, r as languageOf } from "./text-CzqhC8sT.js";
|
|
7
|
+
import { a as liveSettings, g as GATE_SITES, n as encodeOutput } from "./narration-B0hConSw.js";
|
|
8
|
+
import { C as slug, T as uniqueKey, t as addToLibrary } from "./library-CH-ahlm0.js";
|
|
9
|
+
import { _ as API_PREFIX } from "./packs-B88bxt8E.js";
|
|
10
|
+
import { i as updateImage, r as listGallery, t as describeGalleryImage } from "./gallery-CtG-bDzz.js";
|
|
11
|
+
import { n as interpretImage, s as presentedFor, t as runImagePresenter } from "./presenter-agent-D-WNs626.js";
|
|
12
12
|
import { join } from "node:path";
|
|
13
13
|
import { existsSync } from "node:fs";
|
|
14
|
+
import { createHash } from "node:crypto";
|
|
14
15
|
import { readdir } from "node:fs/promises";
|
|
15
16
|
import { SessionId } from "@deepseek-ai/dsh-session";
|
|
16
17
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
17
|
-
import { InvalidEditError, characterKey, createDiceTools, createTools, dayPart, describeDuration, describeHolder, describeInstant, describeValue, itemKey, judgedStatements, lintWorld, localTime, locationKey, mentioned, parseRecordsEdit, rollForCheck, sessionDatabase, sessionFolder } from "@dsh-agentic-roleplay/state";
|
|
18
|
+
import { InvalidEditError, characterKey, createDiceTools, createTools, dayPart, describeDuration, describeHolder, describeInstant, describeValue, itemKey, judgedStatements, lintWorld, localTime, locationKey, mentioned, parseRecordsEdit, rollForCheck, sessionDatabase, sessionFolder, systemRoller } from "@dsh-agentic-roleplay/state";
|
|
18
19
|
// src/host/tools/resource-hint.ts
|
|
19
20
|
/** The name DSH's MCP resource plugin gives the prompt paragraph it adds for every agent; a section of the same name in an agent's scope replaces it. */
|
|
20
21
|
const RESOURCE_HINT_SECTION = "mcp-resource-servers";
|
|
@@ -1316,6 +1317,39 @@ function describeChecks(checks, tr) {
|
|
|
1316
1317
|
});
|
|
1317
1318
|
return [tr("The checks of this story:"), ...lines].join("\n");
|
|
1318
1319
|
}
|
|
1320
|
+
// src/host/dice/replay.ts
|
|
1321
|
+
/**
|
|
1322
|
+
* Dice that fall the same way when a turn is played again from the same place. Each turn is given a seed (the story and the turn it follows); the n-th die of the turn is
|
|
1323
|
+
* drawn from the seed and n, so a regenerated or swapped turn meets the same numbers in the order it asks for them. The numbers are not tied to what is rolled for: a turn
|
|
1324
|
+
* that rolls other things in another order gets the same sequence. Stories that reroll use the system's randomness.
|
|
1325
|
+
*/
|
|
1326
|
+
var RollReplay = class {
|
|
1327
|
+
policy;
|
|
1328
|
+
turns = /* @__PURE__ */ new Map();
|
|
1329
|
+
constructor(policy) {
|
|
1330
|
+
this.policy = policy;
|
|
1331
|
+
}
|
|
1332
|
+
/** A turn begins after the turn `parent` (or the start): its dice are drawn from this place. */
|
|
1333
|
+
begin(chat, session, parent) {
|
|
1334
|
+
this.turns.set(chat, {
|
|
1335
|
+
seed: `${session}|${parent ?? "start"}`,
|
|
1336
|
+
drawn: 0
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1339
|
+
forget(chat) {
|
|
1340
|
+
this.turns.delete(chat);
|
|
1341
|
+
}
|
|
1342
|
+
/** The roller of a chat's turn. */
|
|
1343
|
+
roller(chat) {
|
|
1344
|
+
if (this.policy(chat) !== "keep") return systemRoller;
|
|
1345
|
+
return (sides) => {
|
|
1346
|
+
const turn = this.turns.get(chat);
|
|
1347
|
+
if (turn === void 0) return systemRoller(sides);
|
|
1348
|
+
turn.drawn += 1;
|
|
1349
|
+
return 1 + createHash("sha256").update(`${turn.seed}|${turn.drawn}`).digest().readUIntBE(0, 6) % sides;
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
};
|
|
1319
1353
|
// src/host/orchestration/check-tool.ts
|
|
1320
1354
|
const CHECK_NARRATE_TOOL = "roll_and_narrate";
|
|
1321
1355
|
const BRANCHES = [
|
|
@@ -1450,7 +1484,7 @@ function createCheckNarrateTool(deps) {
|
|
|
1450
1484
|
character: args.character,
|
|
1451
1485
|
...args.target === void 0 ? {} : { target: args.target },
|
|
1452
1486
|
...args.bonus === void 0 ? {} : { bonus: args.bonus }
|
|
1453
|
-
});
|
|
1487
|
+
}, deps.roller?.(owner.chat));
|
|
1454
1488
|
const branch = given[rolled.result];
|
|
1455
1489
|
if (branch === void 0) throw new Error(`the roll gave ${rolled.result}, for which no branch was written`);
|
|
1456
1490
|
const run = characterRunner({
|
|
@@ -1777,6 +1811,89 @@ var AfterTurnJobs = class {
|
|
|
1777
1811
|
}));
|
|
1778
1812
|
}
|
|
1779
1813
|
};
|
|
1814
|
+
// src/host/diagnostics/access.ts
|
|
1815
|
+
const MAX_NAMES = 12;
|
|
1816
|
+
const unknown = (all, known, name) => all.map(name).filter((entry) => !known.has(entry));
|
|
1817
|
+
/**
|
|
1818
|
+
* What a character was given for an activation, counted by kind, and what the story holds that it was not given: the people, places, things, ways, groups and background it has
|
|
1819
|
+
* no knowledge of, hidden things where it stands, and the events it took no part in. A missing edge means not knowing, so each count is what the world has less what the character knows.
|
|
1820
|
+
* The names behind the counts are what the character must not know, and are kept only when asked for.
|
|
1821
|
+
*/
|
|
1822
|
+
function accessOf(story, request, withNames) {
|
|
1823
|
+
const { member, knowledge, memories = [], relationships = [], carrying = [], cues = [], affiliations = [] } = request;
|
|
1824
|
+
const known = knowledge ?? {
|
|
1825
|
+
characters: [],
|
|
1826
|
+
factions: [],
|
|
1827
|
+
locations: [],
|
|
1828
|
+
items: [],
|
|
1829
|
+
routes: [],
|
|
1830
|
+
lore: []
|
|
1831
|
+
};
|
|
1832
|
+
const here = /* @__PURE__ */ new Set([
|
|
1833
|
+
member.key,
|
|
1834
|
+
member.character.name,
|
|
1835
|
+
...(request.place?.here ?? request.cast).map((entry) => entry.character.name)
|
|
1836
|
+
]);
|
|
1837
|
+
const people = unknown(story.characters.list(), /* @__PURE__ */ new Set([...known.characters, ...here]), (character) => character.name);
|
|
1838
|
+
const places = unknown(story.locations.list(), new Set(known.locations), (place) => place.name);
|
|
1839
|
+
const seenThings = /* @__PURE__ */ new Set([
|
|
1840
|
+
...known.items,
|
|
1841
|
+
...carrying.map((item) => item.name),
|
|
1842
|
+
...(request.place?.items ?? []).map((item) => item.name)
|
|
1843
|
+
]);
|
|
1844
|
+
const things = unknown(story.items.list().filter((item) => !item.hidden), seenThings, (item) => item.name);
|
|
1845
|
+
const factions = unknown(story.factions.list(), /* @__PURE__ */ new Set([...known.factions, ...affiliations.map((entry) => entry.name)]), (faction) => faction.name);
|
|
1846
|
+
const lore = unknown(story.lore.list(), new Set(known.lore), (entry) => entry.title);
|
|
1847
|
+
const allExits = story.locations.allExits().length;
|
|
1848
|
+
const placeId = member.place?.location.id;
|
|
1849
|
+
const hidden = placeId === void 0 ? [] : story.items.contents({
|
|
1850
|
+
kind: "location",
|
|
1851
|
+
id: placeId
|
|
1852
|
+
}).filter((entry) => entry.item.hidden).map((entry) => entry.item.name);
|
|
1853
|
+
const events = Math.max(0, story.events.list().length - story.events.perceivedBy(member.character.id).length);
|
|
1854
|
+
const names = {
|
|
1855
|
+
people,
|
|
1856
|
+
places,
|
|
1857
|
+
things,
|
|
1858
|
+
factions,
|
|
1859
|
+
lore
|
|
1860
|
+
};
|
|
1861
|
+
return {
|
|
1862
|
+
character: member.character.name,
|
|
1863
|
+
attempt: request.attempt,
|
|
1864
|
+
given: {
|
|
1865
|
+
people: known.characters.length,
|
|
1866
|
+
places: known.locations.length,
|
|
1867
|
+
things: known.items.length,
|
|
1868
|
+
routes: known.routes.length,
|
|
1869
|
+
factions: known.factions.length,
|
|
1870
|
+
lore: known.lore.length,
|
|
1871
|
+
memories: {
|
|
1872
|
+
clear: memories.filter((memory) => memory.clarity === "clear").length,
|
|
1873
|
+
faded: memories.filter((memory) => memory.clarity === "faded").length,
|
|
1874
|
+
vague: memories.filter((memory) => memory.clarity === "vague").length
|
|
1875
|
+
},
|
|
1876
|
+
relationships: relationships.length,
|
|
1877
|
+
present: Math.max(0, (request.place?.here ?? request.cast).length - 1),
|
|
1878
|
+
carrying: carrying.length,
|
|
1879
|
+
cues: cues.length
|
|
1880
|
+
},
|
|
1881
|
+
withheld: {
|
|
1882
|
+
people: people.length,
|
|
1883
|
+
places: places.length,
|
|
1884
|
+
things: things.length,
|
|
1885
|
+
routes: Math.max(0, allExits - known.routes.length),
|
|
1886
|
+
factions: factions.length,
|
|
1887
|
+
lore: lore.length,
|
|
1888
|
+
hidden: hidden.length,
|
|
1889
|
+
events
|
|
1890
|
+
},
|
|
1891
|
+
...withNames ? { names: Object.fromEntries(Object.entries({
|
|
1892
|
+
...names,
|
|
1893
|
+
things: [...things, ...hidden.map((name) => `${name} (hidden)`)]
|
|
1894
|
+
}).filter(([, list]) => list.length > 0).map(([kind, list]) => [kind, list.slice(0, MAX_NAMES)])) } : {}
|
|
1895
|
+
};
|
|
1896
|
+
}
|
|
1780
1897
|
// src/host/orchestration/turn-rules.ts
|
|
1781
1898
|
/** Whether the game master still has to judge the player's action. */
|
|
1782
1899
|
function judgeDue(state) {
|
|
@@ -2008,6 +2125,12 @@ async function askCharacters(deps, owner, number, keys, cast, state, run, signal
|
|
|
2008
2125
|
commitment: previous.commitment
|
|
2009
2126
|
} }
|
|
2010
2127
|
};
|
|
2128
|
+
if (store !== void 0) try {
|
|
2129
|
+
const access = accessOf(store.story, request, store.settings().diagnostics.keepRuns);
|
|
2130
|
+
store.recordTrace?.(owner.turn, {}, (current) => ({ access: [...current.access ?? [], access].slice(-40) }));
|
|
2131
|
+
} catch (error) {
|
|
2132
|
+
deps.problem(`what ${member.character.name} was given could not be traced: ${error instanceof Error ? error.message : String(error)}`);
|
|
2133
|
+
}
|
|
2011
2134
|
try {
|
|
2012
2135
|
const action = await run(request, signal);
|
|
2013
2136
|
const verdict = outputValidator.validate(action, request);
|
|
@@ -3026,6 +3149,60 @@ var TurnEngine = class {
|
|
|
3026
3149
|
turn: store.story.metadata.get().turns
|
|
3027
3150
|
}, cancel.signal);
|
|
3028
3151
|
}
|
|
3152
|
+
/**
|
|
3153
|
+
* What a moment would bring back for the characters, as a turn would ask for it and without changing anything the story keeps: nothing is counted as recalled
|
|
3154
|
+
* and no turn begins. @throws {Error} when the chat has no story, or names a character that is not in it.
|
|
3155
|
+
*/
|
|
3156
|
+
async recallPreview(chat, request, signal) {
|
|
3157
|
+
const store = this.stores(chat);
|
|
3158
|
+
if (store === void 0) throw new Error(`no story for chat ${chat}`);
|
|
3159
|
+
const cast = store.cast();
|
|
3160
|
+
const player = cast.find((member) => member.character.control === "player");
|
|
3161
|
+
const members = request.character === void 0 ? cast.filter((member) => member.character.control !== "player" && (player?.place === void 0 || member.place?.location.id === player.place.location.id)) : cast.filter((member) => member.key === request.character);
|
|
3162
|
+
if (request.character !== void 0 && members.length === 0) throw new Error(`no character "${request.character}" in the story`);
|
|
3163
|
+
const turn = store.story.metadata.get().turns + 1;
|
|
3164
|
+
const settings = store.settings();
|
|
3165
|
+
const queryVector = await store.queryVector(request.situation, signal);
|
|
3166
|
+
const characters = await Promise.all(members.map(async (member) => {
|
|
3167
|
+
const memories = await this.boundaries().recaller.recall({
|
|
3168
|
+
member,
|
|
3169
|
+
situation: request.situation,
|
|
3170
|
+
turn,
|
|
3171
|
+
policy: settings.memory,
|
|
3172
|
+
explain: true,
|
|
3173
|
+
peek: true,
|
|
3174
|
+
...queryVector === void 0 ? {} : { queryVector }
|
|
3175
|
+
}, store.story, signal);
|
|
3176
|
+
const here = (member.place === void 0 ? cast : cast.filter((other) => other.place?.location.id === member.place?.location.id)).map((entry) => entry.character.id);
|
|
3177
|
+
const known = store.knowledge(member.character.id, turn, here);
|
|
3178
|
+
return {
|
|
3179
|
+
key: member.key,
|
|
3180
|
+
name: member.character.name,
|
|
3181
|
+
...member.place === void 0 ? {} : { place: member.place.location.name },
|
|
3182
|
+
memories: memories.map(({ clarity, turn: from, text, why }) => ({
|
|
3183
|
+
clarity,
|
|
3184
|
+
turn: from,
|
|
3185
|
+
text,
|
|
3186
|
+
...why === void 0 ? {} : { why }
|
|
3187
|
+
})),
|
|
3188
|
+
lore: known.lore,
|
|
3189
|
+
known: {
|
|
3190
|
+
characters: known.characters.length,
|
|
3191
|
+
factions: known.factions.length,
|
|
3192
|
+
places: known.locations.length,
|
|
3193
|
+
things: known.items.length,
|
|
3194
|
+
routes: known.routes.length
|
|
3195
|
+
}
|
|
3196
|
+
};
|
|
3197
|
+
}));
|
|
3198
|
+
return {
|
|
3199
|
+
turn,
|
|
3200
|
+
situation: request.situation,
|
|
3201
|
+
byMeaning: queryVector !== void 0,
|
|
3202
|
+
limit: settings.memory.recall,
|
|
3203
|
+
characters
|
|
3204
|
+
};
|
|
3205
|
+
}
|
|
3029
3206
|
/** Whether a turn is being played: characters are being asked or the game master is between rounds. */
|
|
3030
3207
|
playing(chat) {
|
|
3031
3208
|
const turning = this.states.get(chat);
|
|
@@ -3663,11 +3840,13 @@ function apply(ctx) {
|
|
|
3663
3840
|
interpolate: false,
|
|
3664
3841
|
text: ""
|
|
3665
3842
|
});
|
|
3843
|
+
const rolls = new RollReplay((chat) => stores(chat)?.settings().rewind.rolls ?? "reroll");
|
|
3666
3844
|
const toolDeps = {
|
|
3667
3845
|
engine,
|
|
3668
3846
|
boundaries,
|
|
3669
3847
|
stores,
|
|
3670
3848
|
turnOf: currentTurn,
|
|
3849
|
+
roller: (chat) => rolls.roller(chat),
|
|
3671
3850
|
delivered: (chat, output) => {
|
|
3672
3851
|
const node = timelines.delivered(chat, output);
|
|
3673
3852
|
if (node !== void 0) images.afterDelivery(chat, node, output);
|
|
@@ -3680,7 +3859,9 @@ function apply(ctx) {
|
|
|
3680
3859
|
ctx.roleplayOrchestration.reflect = (chat) => engine.reflect(chat);
|
|
3681
3860
|
ctx.roleplayOrchestration.reflecting = (chat) => engine.reflecting(chat);
|
|
3682
3861
|
ctx.roleplayOrchestration.playing = (chat) => engine.playing(chat);
|
|
3862
|
+
ctx.roleplayOrchestration.recallPreview = (chat, request, signal) => engine.recallPreview(chat, request, signal);
|
|
3683
3863
|
return () => {
|
|
3864
|
+
ctx.roleplayOrchestration.recallPreview = () => Promise.reject(/* @__PURE__ */ new Error("the orchestration is not running"));
|
|
3684
3865
|
ctx.roleplayOrchestration.reflect = () => Promise.reject(/* @__PURE__ */ new Error("the orchestration is not running"));
|
|
3685
3866
|
ctx.roleplayOrchestration.reflecting = () => false;
|
|
3686
3867
|
ctx.roleplayOrchestration.playing = () => false;
|
|
@@ -3751,8 +3932,9 @@ function apply(ctx) {
|
|
|
3751
3932
|
boundaries,
|
|
3752
3933
|
stores,
|
|
3753
3934
|
timelines,
|
|
3935
|
+
rolls,
|
|
3754
3936
|
previewTool,
|
|
3755
|
-
optionalTools: [...createDiceTools(diceLink), createCheckNarrateTool(toolDeps)]
|
|
3937
|
+
optionalTools: [...createDiceTools(diceLink, { rollerFor: (chat) => rolls.roller(chat) }), createCheckNarrateTool(toolDeps)]
|
|
3756
3938
|
});
|
|
3757
3939
|
}
|
|
3758
3940
|
export { apply, inject, name };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { B as
|
|
6
|
-
import { i as translator, r as languageOf } from "./text-
|
|
7
|
-
import { h as readImageFileMetadata, u as referenceImagePath, x as mapLimit } from "./library-
|
|
8
|
-
import { n as readPreset } from "./preset-
|
|
9
|
-
import { _ as API_PREFIX, a as packIds, d as packPath, f as readPack, h as PACK_MEDIA_TYPES, l as isPackId } from "./packs-
|
|
10
|
-
import { a as uploadReferenceImage, t as generateReferenceImage } from "./generator-
|
|
1
|
+
import { c as chatSessionId, n as atomicWrite, r as atomicWriteJson } from "./access-CXtaZNbx.js";
|
|
2
|
+
import { A as editsSince, B as addressesToFetch, Bt as loadItems, C as worldFieldChanges, E as loadWorldParts, Ft as LORE_DIR, H as fetchPictures, Ht as loadFactions, It as loadLore, J as UPDATE_FOLDER, K as cardCharacter, Lt as LOCATIONS_DIR, Nt as TRIGGERS_FILE_NAME, Pt as loadTriggers, Rt as loadLocations, V as candidateUrls, Vt as FACTIONS_DIR, W as mergeReports, X as cardPieces, Xt as loadCharacters, Y as baseId, Yt as CHARACTERS_DIR, Zt as subfolders, _t as loadValidatedWorld, c as importPhase, i as contextOf, j as writeSnapshot, k as recordProvenance, on as authoredWorldOf, q as writePortrait, qt as loadCalendar, s as worldOf, sn as authoringChatSessionId, vt as withScratchStory, w as editWorldInfo, x as matchPieces, yt as knowsCharacter, z as addressKey, zt as ITEMS_DIR } from "./authoring-tools-C6Hzy8jU.js";
|
|
3
|
+
import { $ as IMPORT_FOLDER, At as InvalidEditProblems, Dt as parseCharacterFile, Et as CHARACTER_FILE_NAME, J as writeWorldPrompt, Q as withPlayer, St as parseItemFile, Tt as parseFactionFile, _t as parseLoreFile, at as readImportFolder, bt as ITEM_FILE_NAME, gt as LORE_FILE_NAME, nt as PICTURE_FILE, ot as writeChoices, pt as loadVariables, vt as LOCATION_FILE_NAME, wt as FACTION_FILE_NAME, x as extractStyleFrom, yt as parseLocationFile } from "./presets-9_MNxwaw.js";
|
|
4
|
+
import { n as encodeOutput } from "./narration-B0hConSw.js";
|
|
5
|
+
import { B as PLOTS_FILE_NAME, F as STORY_LANGUAGES, H as parsePlotsFile, I as isStoryLanguage, J as Reader, L as textLanguage, P as LANGUAGE_NAMES, Q as PROMPTS_FOLDER, U as plotReferenceProblems, V as loadPlots, Y as formatIssue, at as shippedLanguages, ct as AgentUnavailableError, mt as WorldNotFoundError, ut as InvalidWorldError } from "./hooks-BuQ61nvQ.js";
|
|
6
|
+
import { i as translator, r as languageOf } from "./text-CzqhC8sT.js";
|
|
7
|
+
import { h as readImageFileMetadata, u as referenceImagePath, x as mapLimit } from "./library-CH-ahlm0.js";
|
|
8
|
+
import { n as readPreset } from "./preset-DNuqvMan.js";
|
|
9
|
+
import { _ as API_PREFIX, a as packIds, d as packPath, f as readPack, h as PACK_MEDIA_TYPES, l as isPackId } from "./packs-B88bxt8E.js";
|
|
10
|
+
import { a as uploadReferenceImage, t as generateReferenceImage } from "./generator-nLoPM5MF.js";
|
|
11
11
|
import { basename, dirname, extname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
12
12
|
import { existsSync, lstatSync, statSync } from "node:fs";
|
|
13
13
|
import { randomUUID } from "node:crypto";
|
|
@@ -2649,4 +2649,4 @@ function registerPackJail(ctx, deps) {
|
|
|
2649
2649
|
}
|
|
2650
2650
|
export { DOCTOR_OPENING_SOURCE as $, worldEntityImageFile as A, languageOfDocuments as B, readWorldEditor as C, uploadWorldCharacterPortrait as D, replaceFile as E, PRESET_FILE as F, revertUpdate as G, findTargets as H, presetMessage as I, AuthoringSessions as J, startUpdate as K, presetTools as L, deleteTriggerDocument as M, readTriggerDocuments as N, uploadWorldEntityImage as O, writeTriggerDocument as P, agentServicesOf as Q, translateMessage as R, generateWorldEntityImage as S, removeWorldTrigger as T, finishUpdate as U, readWorldDocuments as V, pendingUpdate as W, ensureAuthoringChat as X, authoringTitle as Y, AgentSessions as Z, editWorldPlots as _, deleteWorldPackFile as a, entityFolder as b, createAuthoredEntity as c, replaceAuthoredEntity as d, appendEmptyTurn as et, editWorldCharacter as f, editWorldPlace as g, editWorldNarrationVoice as h, checkWorldPack as i, writeWorldTrigger as j, worldCharacterPortraitFile as k, deleteAuthoredEntity as l, editWorldLore as m, packFileProblem as n, listWorldPacks as o, editWorldFaction as p, updateStatus as q, registerPackJail as r, AUTHORED_ENTITY_KINDS as s, MAX_PACK_TEXT as t, appendNarratedTurn as tt, readAuthoredEntityDocument as u, editWorldRelation as v, readWorldTrigger as w, generateWorldCharacterPortrait as x, editWorldThing as y, translateTools as z };
|
|
2651
2651
|
|
|
2652
|
-
//# sourceMappingURL=pack-jail-
|
|
2652
|
+
//# sourceMappingURL=pack-jail-OZSgU85i.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as Reader } from "./hooks-BuQ61nvQ.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";
|
|
@@ -836,4 +836,4 @@ function anyTab(bases) {
|
|
|
836
836
|
}
|
|
837
837
|
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 };
|
|
838
838
|
|
|
839
|
-
//# sourceMappingURL=packs-
|
|
839
|
+
//# sourceMappingURL=packs-B88bxt8E.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { t as promptFor } from "./access-
|
|
2
|
-
import { c as runChild } from "./child-
|
|
3
|
-
import { n as generateTransientImage, t as generateReferenceImage } from "./generator-
|
|
4
|
-
import { i as updateImage, n as galleryFile, r as listGallery } from "./gallery-
|
|
5
|
-
import { c as nextSceneSerial, u as referenceImagePath } from "./library-
|
|
6
|
-
import {
|
|
1
|
+
import { n as atomicWrite, t as promptFor } from "./access-CXtaZNbx.js";
|
|
2
|
+
import { c as runChild } from "./child-C8r8AFpm.js";
|
|
3
|
+
import { n as generateTransientImage, t as generateReferenceImage } from "./generator-nLoPM5MF.js";
|
|
4
|
+
import { i as updateImage, n as galleryFile, r as listGallery } from "./gallery-CtG-bDzz.js";
|
|
5
|
+
import { c as nextSceneSerial, u as referenceImagePath } from "./library-CH-ahlm0.js";
|
|
6
|
+
import { join, relative } from "node:path";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
|
-
import { createHash
|
|
9
|
-
import {
|
|
8
|
+
import { createHash } from "node:crypto";
|
|
9
|
+
import { readFile } from "node:fs/promises";
|
|
10
10
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
11
11
|
import { characterKey, itemKey, locationKey } from "@dsh-agentic-roleplay/state";
|
|
12
12
|
// src/host/images/presented.ts
|
|
@@ -26,13 +26,10 @@ async function present(sessionFolder, node, image) {
|
|
|
26
26
|
const current = await presentedFor(sessionFolder, node);
|
|
27
27
|
if (current.some((entry) => entry.path === image.path)) return;
|
|
28
28
|
const file = fileOf(sessionFolder, node);
|
|
29
|
-
await
|
|
30
|
-
const temporary = `${file}.${process.pid}.${randomUUID()}.writing`;
|
|
31
|
-
await writeFile(temporary, JSON.stringify({ images: [...current, {
|
|
29
|
+
await atomicWrite(file, JSON.stringify({ images: [...current, {
|
|
32
30
|
...image,
|
|
33
31
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
34
|
-
}] }, null, 2));
|
|
35
|
-
await rename(temporary, file);
|
|
32
|
+
}] }, null, 2), { createDirectory: true });
|
|
36
33
|
}
|
|
37
34
|
// src/host/images/image-search.ts
|
|
38
35
|
const WORD = /[\p{L}\p{N}]+/gu;
|
|
@@ -145,9 +142,7 @@ async function readVectors(images) {
|
|
|
145
142
|
}
|
|
146
143
|
async function writeVectors(images, file) {
|
|
147
144
|
const path = join(images, VECTORS_FILE);
|
|
148
|
-
|
|
149
|
-
await writeFile(temporary, JSON.stringify(file));
|
|
150
|
-
await rename(temporary, path);
|
|
145
|
+
await atomicWrite(path, JSON.stringify(file));
|
|
151
146
|
}
|
|
152
147
|
/**
|
|
153
148
|
* The images that fit a description, by words and, when an embedding service is there, by meaning, the two rankings joined by reciprocal rank so that
|
|
@@ -846,4 +841,4 @@ async function runImagePresenter(job) {
|
|
|
846
841
|
}
|
|
847
842
|
export { tokensOf as a, searchImages as i, interpretImage as n, present as o, imageTools as r, presentedFor as s, runImagePresenter as t };
|
|
848
843
|
|
|
849
|
-
//# sourceMappingURL=presenter-agent-
|
|
844
|
+
//# sourceMappingURL=presenter-agent-D-WNs626.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { l as SAMPLING_RANGES } from "./child-
|
|
3
|
-
import {
|
|
1
|
+
import { $t as ImportCardError, r as MAX_PREVIEW_TEXT } from "./authoring-tools-C6Hzy8jU.js";
|
|
2
|
+
import { l as SAMPLING_RANGES } from "./child-C8r8AFpm.js";
|
|
3
|
+
import { Y as cleanText } from "./presets-9_MNxwaw.js";
|
|
4
4
|
// src/host/import/preset.ts
|
|
5
5
|
/** The older preset layout keeps its texts under fixed keys. */
|
|
6
6
|
const LEGACY_KEYS = [
|
|
@@ -239,4 +239,4 @@ function selectPrompts(file, enabled, keepSampling) {
|
|
|
239
239
|
}
|
|
240
240
|
export { readPreset as n, selectPrompts as r, previewPreset as t };
|
|
241
241
|
|
|
242
|
-
//# sourceMappingURL=preset-
|
|
242
|
+
//# sourceMappingURL=preset-DNuqvMan.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./access-
|
|
2
|
-
import {
|
|
3
|
-
import { n as readPreset$1 } from "./preset-
|
|
4
|
-
import { i as contextOf } from "./authoring-tools-
|
|
5
|
-
import { i as translator, r as languageOf } from "./text-
|
|
6
|
-
import { at as
|
|
1
|
+
import "./access-CXtaZNbx.js";
|
|
2
|
+
import { $ as IMPORT_FOLDER, G as deleteWorldPrompt, J as writeWorldPrompt, K as listWorldPrompts, Q as withPlayer, W as PROSE_PROMPTS, c as presetDirectory, l as readPreset, p as updatePresetInfo, q as readWorldPrompt, t as PRESET_FILE, x as extractStyleFrom } from "./presets-9_MNxwaw.js";
|
|
3
|
+
import { n as readPreset$1 } from "./preset-DNuqvMan.js";
|
|
4
|
+
import { i as contextOf } from "./authoring-tools-C6Hzy8jU.js";
|
|
5
|
+
import { i as translator, r as languageOf } from "./text-CzqhC8sT.js";
|
|
6
|
+
import { at as shippedLanguages, nt as languageOf$1, ot as shippedPromptsDirectory } from "./hooks-BuQ61nvQ.js";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
9
9
|
import { readFile, rm } from "node:fs/promises";
|
|
@@ -278,4 +278,4 @@ async function presetApproval(exec, next, carries) {
|
|
|
278
278
|
}
|
|
279
279
|
export { presetChatSessionId as a, presetAuthorTools as i, narrationImportMessage as n, presetOfChat as o, presetApproval as r, PresetReader as t };
|
|
280
280
|
|
|
281
|
-
//# sourceMappingURL=preset-author-tools-
|
|
281
|
+
//# sourceMappingURL=preset-author-tools-CDwavcTb.js.map
|
package/lib/preset-authoring.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as limitAuthoringAgents } from "./authoring-tools-
|
|
2
|
-
import { t as guardAuthoringTurns } from "./turn-guard-
|
|
3
|
-
import { i as presetAuthorTools, o as presetOfChat, r as presetApproval, t as PresetReader } from "./preset-author-tools-
|
|
4
|
-
import "./hooks-
|
|
5
|
-
import { c as presetDirectory } from "./presets-
|
|
1
|
+
import { n as limitAuthoringAgents } from "./authoring-tools-C6Hzy8jU.js";
|
|
2
|
+
import { t as guardAuthoringTurns } from "./turn-guard-Ygdww1Wt.js";
|
|
3
|
+
import { i as presetAuthorTools, o as presetOfChat, r as presetApproval, t as PresetReader } from "./preset-author-tools-CDwavcTb.js";
|
|
4
|
+
import "./hooks-BuQ61nvQ.js";
|
|
5
|
+
import { c as presetDirectory } from "./presets-9_MNxwaw.js";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
8
|
// src/preset-authoring.ts
|