@dsh-agentic-roleplay/core 0.8.2 → 0.9.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/lib/{authoring-tools-BgmC2oqU.js → authoring-tools-C_l07RYn.js} +2568 -53
- package/lib/authoring.js +145 -38
- package/lib/client.js +327 -327
- package/lib/doctor.js +1 -1
- package/lib/{gallery-D1V4h8vh.js → gallery-q7niLtWn.js} +2 -2
- package/lib/{generator-CLPosooC.js → generator-BpjPrvHe.js} +2 -2
- package/lib/{hooks-rQTTeOC4.js → hooks-DNaDzMjW.js} +38 -5
- package/lib/images.js +4 -4
- package/lib/index.js +14 -14
- package/lib/{library-Dfu0dgRj.js → library-CIkxhf_R.js} +5 -3
- package/lib/{lorebook-author-tools-BAaAqZZm.js → lorebook-author-tools-BiMDmdFi.js} +6 -6
- package/lib/lorebook-authoring.js +4 -4
- package/lib/orchestration.js +8 -8
- package/lib/{pack-jail-CN-314ln.js → pack-jail-B35Vx3hT.js} +36 -728
- package/lib/{packs-DIj5BEfq.js → packs-BajKw7S9.js} +2 -2
- package/lib/{presenter-agent-DR0KvLE0.js → presenter-agent-jgtuTwZr.js} +4 -4
- package/lib/{preset-CscHj1-Y.js → preset-DWgkcPau.js} +3 -3
- package/lib/{preset-author-tools-CxluF8qc.js → preset-author-tools-BhuYIKms.js} +6 -6
- package/lib/preset-authoring.js +5 -5
- package/lib/{presets-HB8kJTaE.js → presets-9GzaSELc.js} +32 -12
- package/lib/{reflection-Dg1xtOTW.js → reflection-4L0Plvct.js} +6 -6
- package/lib/{text-DyRN4nDP.js → text-CbGQhK1-.js} +4 -3
- package/lib/{turn-guard-g_hDn0jR.js → turn-guard-sCUXmp-5.js} +2 -2
- package/package.json +2 -2
- package/prompts/en/checks/conflict.md +1 -0
- package/prompts/en/checks/decide-conflict.md +1 -0
- package/prompts/en/checks/decide-covered.md +1 -0
- package/prompts/en/checks/decide-opening.md +1 -0
- package/prompts/en/checks/decide-same-thing.md +1 -0
- package/prompts/en/checks/decide-same-value.md +1 -0
- 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/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/conflict.md +1 -0
- package/prompts/zh/checks/decide-conflict.md +1 -0
- package/prompts/zh/checks/decide-covered.md +1 -0
- package/prompts/zh/checks/decide-opening.md +1 -0
- package/prompts/zh/checks/decide-same-thing.md +1 -0
- package/prompts/zh/checks/decide-same-value.md +1 -0
- 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/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
package/lib/doctor.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as chatSessionId } from "./access-CfQWbNZP.js";
|
|
2
2
|
import { n as doctorSessionOf } from "./doctor-chat-hL1a61hp.js";
|
|
3
|
-
import { i as externalTools, t as externalToolLimit } from "./hooks-
|
|
3
|
+
import { i as externalTools, t as externalToolLimit } from "./hooks-DNaDzMjW.js";
|
|
4
4
|
import { a as liveSettings } from "./narration-CjB_KwwY.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { existsSync } from "node:fs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as writeImageFileMetadata, a as LIBRARY_FOLDER,
|
|
1
|
+
import { _ as writeImageFileMetadata, a as LIBRARY_FOLDER, g as sidecarOf, h as readImageFileMetadata, m as mediaTypeOf, x as mapLimit } from "./library-CIkxhf_R.js";
|
|
2
2
|
import { join, sep } from "node:path";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { lstat, mkdir, readFile, readdir, realpath, rename, stat, writeFile } from "node:fs/promises";
|
|
@@ -191,4 +191,4 @@ async function updateImage(sessionFolder, path, update) {
|
|
|
191
191
|
}
|
|
192
192
|
export { updateImage as i, galleryFile as n, listGallery as r, describeGalleryImage as t };
|
|
193
193
|
|
|
194
|
-
//# sourceMappingURL=gallery-
|
|
194
|
+
//# sourceMappingURL=gallery-q7niLtWn.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as sceneImagePath, f as writeImage, u as referenceImagePath } from "./library-
|
|
1
|
+
import { d as sceneImagePath, f as writeImage, u as referenceImagePath } from "./library-CIkxhf_R.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-
|
|
144
|
+
//# sourceMappingURL=generator-BpjPrvHe.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as roleplaySessionOf, t as promptFor } from "./access-CfQWbNZP.js";
|
|
2
2
|
import { _ as DECISION_SITES, a as liveSettings, g as rulesOf, h as WORLD_RULES_KEY, n as encodeOutput, r as encodePreview, y as emptyStats } from "./narration-CjB_KwwY.js";
|
|
3
|
-
import { i as translator, r as languageOf$1, t as trimCharacters } from "./text-
|
|
3
|
+
import { i as translator, r as languageOf$1, t as trimCharacters } from "./text-CbGQhK1-.js";
|
|
4
4
|
import { a as childTrace, c as runChild, f as tokensOf, m as addTokens, n as childModel, p as NO_TOKENS, r as childSampling, v as estimateAnswer } from "./child-lYYeOwl2.js";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
import { copyFileSync, cpSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -268,6 +268,30 @@ var Reader = class Reader {
|
|
|
268
268
|
data;
|
|
269
269
|
path;
|
|
270
270
|
issues;
|
|
271
|
+
static watched;
|
|
272
|
+
looked = /* @__PURE__ */ new Set();
|
|
273
|
+
inner = [];
|
|
274
|
+
/**
|
|
275
|
+
* Runs a parse and returns what it never looked at: the fields of the document (and of the objects inside it) that nothing reads, as paths, and the top-level fields it did look at. A parser that gave up
|
|
276
|
+
* early has not looked at the rest, so only a parse that succeeded says anything.
|
|
277
|
+
*/
|
|
278
|
+
static unreadBy(parse) {
|
|
279
|
+
const outer = Reader.watched;
|
|
280
|
+
const roots = [];
|
|
281
|
+
Reader.watched = roots;
|
|
282
|
+
try {
|
|
283
|
+
parse();
|
|
284
|
+
} finally {
|
|
285
|
+
Reader.watched = outer;
|
|
286
|
+
}
|
|
287
|
+
return {
|
|
288
|
+
unread: roots.flatMap((root) => root.unread()),
|
|
289
|
+
read: roots.flatMap((root) => [...root.looked])
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
unread() {
|
|
293
|
+
return [...Object.keys(this.data).filter((key) => !this.looked.has(key)).map((key) => this.child(key)), ...this.inner.flatMap((reader) => reader.unread())];
|
|
294
|
+
}
|
|
271
295
|
constructor(data, path, issues) {
|
|
272
296
|
this.data = data;
|
|
273
297
|
this.path = path;
|
|
@@ -292,7 +316,9 @@ var Reader = class Reader {
|
|
|
292
316
|
});
|
|
293
317
|
return;
|
|
294
318
|
}
|
|
295
|
-
|
|
319
|
+
const reader = new Reader(data, "", issues);
|
|
320
|
+
Reader.watched?.push(reader);
|
|
321
|
+
return reader;
|
|
296
322
|
}
|
|
297
323
|
fail(key, message) {
|
|
298
324
|
this.issues.push({
|
|
@@ -302,6 +328,7 @@ var Reader = class Reader {
|
|
|
302
328
|
}
|
|
303
329
|
/** The value as written, with `null` read as absent. */
|
|
304
330
|
raw(key) {
|
|
331
|
+
this.looked.add(key);
|
|
305
332
|
const value = this.data[key];
|
|
306
333
|
return value === null ? void 0 : value;
|
|
307
334
|
}
|
|
@@ -367,7 +394,9 @@ var Reader = class Reader {
|
|
|
367
394
|
this.fail(key, "must be an object");
|
|
368
395
|
return;
|
|
369
396
|
}
|
|
370
|
-
|
|
397
|
+
const reader = new Reader(value, this.child(key), this.issues);
|
|
398
|
+
this.inner.push(reader);
|
|
399
|
+
return reader;
|
|
371
400
|
}
|
|
372
401
|
objects(key) {
|
|
373
402
|
const value = this.raw(key);
|
|
@@ -377,7 +406,11 @@ var Reader = class Reader {
|
|
|
377
406
|
return [];
|
|
378
407
|
}
|
|
379
408
|
return value.flatMap((entry, index) => {
|
|
380
|
-
if (isRecord(entry))
|
|
409
|
+
if (isRecord(entry)) {
|
|
410
|
+
const reader = new Reader(entry, this.child(`${key}[${index}]`), this.issues);
|
|
411
|
+
this.inner.push(reader);
|
|
412
|
+
return [reader];
|
|
413
|
+
}
|
|
381
414
|
this.fail(`${key}[${index}]`, "must be an object");
|
|
382
415
|
return [];
|
|
383
416
|
});
|
|
@@ -3579,4 +3612,4 @@ function installHooks(ctx, deps) {
|
|
|
3579
3612
|
}
|
|
3580
3613
|
export { copyWorldPrompts as $, answerLimits as A, loadPlots as B, readNotes as C, describeWhen as D, describeTime as E, STORY_LANGUAGES as F, commandsOf as G, plotReferenceProblems as H, isStoryLanguage as I, formatIssue as J, readDocument as K, textLanguage as L, plotProgressOf as M, populatePlots as N, zoneOf as O, LANGUAGE_NAMES as P, PromptLibrary as Q, wrongLanguage as R, notesOfSession as S, ClockError as T, COMMANDS_KEY as U, parsePlotsFile as V, commandFlagKey as W, LANGUAGE_FOLDER as X, errorMessage as Y, PROMPTS_FOLDER as Z, readRunDetail as _, externalWithheld as a, shippedPromptsDirectory as at, readWithdrawn as b, record as c, InvalidStartError as ct, guardRepeatedCalls as d, SessionArchivedError as dt, inheritPrompts as et, MAX_OOC_ANSWER as f, SessionNotFoundError as ft, readActivity as g, readDecisionStats as h, COMPARISONS as ht, externalTools as i, shippedLanguages as it, PLOTS_METADATA_KEY as j, RESULTS as k, characterRunner as l, InvalidWorldError as lt, readUsage as m, AUTHORING_NEEDS as mt, installHooks as n, listFiles as nt, PREVIEW_TOOL as o, shippedText as ot, storesOf as p, WorldNotFoundError as pt, Reader as q, externalGiven as r, promptProblem as rt, createTools$1 as s, AgentUnavailableError as st, externalToolLimit as t, languageOf as tt, toolEnabled as u, ReflectionRefusedError as ut, readVerdicts as v, observeAsPlayer as w, addToNote as x, writeVerdicts as y, PLOTS_FILE_NAME as z };
|
|
3581
3614
|
|
|
3582
|
-
//# sourceMappingURL=hooks-
|
|
3615
|
+
//# sourceMappingURL=hooks-DNaDzMjW.js.map
|
package/lib/images.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as tokensOf, i as searchImages, n as interpretImage, o as present, r as imageTools, s as presentedFor, t as runImagePresenter } from "./presenter-agent-
|
|
2
|
-
import { i as updateImage, r as listGallery } from "./gallery-
|
|
3
|
-
import { c as nextSceneSerial, d as sceneImagePath, l as readImageMetadata, o as entityImageDirectory, s as inheritImages, t as addToLibrary, u as referenceImagePath, v as readPngMetadata, y as withPngMetadata } from "./library-
|
|
4
|
-
import { i as transientPrompt, n as generateTransientImage, r as referencePrompt, t as generateReferenceImage } from "./generator-
|
|
1
|
+
import { a as tokensOf, i as searchImages, n as interpretImage, o as present, r as imageTools, s as presentedFor, t as runImagePresenter } from "./presenter-agent-jgtuTwZr.js";
|
|
2
|
+
import { i as updateImage, r as listGallery } from "./gallery-q7niLtWn.js";
|
|
3
|
+
import { c as nextSceneSerial, d as sceneImagePath, l as readImageMetadata, o as entityImageDirectory, s as inheritImages, t as addToLibrary, u as referenceImagePath, v as readPngMetadata, y as withPngMetadata } from "./library-CIkxhf_R.js";
|
|
4
|
+
import { i as transientPrompt, n as generateTransientImage, r as referencePrompt, t as generateReferenceImage } from "./generator-BpjPrvHe.js";
|
|
5
5
|
export { addToLibrary, entityImageDirectory, generateReferenceImage, generateTransientImage, imageTools, inheritImages, interpretImage, listGallery, nextSceneSerial, present, presentedFor, readImageMetadata, readPngMetadata, referenceImagePath, referencePrompt, runImagePresenter, sceneImagePath, searchImages, tokensOf, transientPrompt, updateImage, withPngMetadata };
|
package/lib/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { a as chatSessionId, i as VARIABLE_VISIBILITIES, n as VARIABLE_KINDS, o as roleplaySessionOf, r as VARIABLE_SUBJECTS } from "./access-CfQWbNZP.js";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { a as lorebookImportMessage, c as readLorebook, d as lorebookOfChat, l as selectEntries, s as previewLorebook, t as LOREBOOK_UPLOAD, u as lorebookChatSessionId } from "./lorebook-author-tools-
|
|
4
|
-
import { a as presetChatSessionId, n as narrationImportMessage, o as presetOfChat } from "./preset-author-tools-
|
|
2
|
+
import { $ as WORLD_FILE_NAME, $t as pictureOf, At as routineProblems, B as localChanges, C as readWorldInfo, Ct as populateItems, Dt as populateRoutines, Et as populateLore, Gt as loadCalendar, H as writeOrigin, Ht as loadDice, It as loadLocations, J as guardedLookup, Jt as loadCharacters, Kt as parseCalendarFile, L as describeChanges, Ot as populateTriggers, Qt as isPng, R as hashWorld, Rt as loadItems, S as editWorldInfo, St as populateFactions, T as loadWorldParts, Tt as populateLocations, U as CatalogueError, Ut as parseDiceFile, V as readOrigin, Vt as DICE_FILE_NAME, Wt as CALENDAR_FILE_NAME, X as vetUrl, Xt as knownOutputCeiling, Yt as subfolders, Zt as ImportCardError, _t as knowsCharacter, at as deleteLorebookEntry, bt as populateClock, c as importPhase, ct as listLorebooks, d as markReady, en as readCard, et as parseWorldFile, f as settleDraft, ft as reserveLorebook, gt as loadValidatedWorld, ht as checkWorld, in as authoredWorldOf, it as deleteLorebook, jt as TRIGGERS_FILE_NAME, kt as populateVariables, lt as loadLorebook, mt as writeLorebookEntry, nn as DICE_READINGS, nt as addLorebookEntries, ot as entriesOf, p as structureImport, pt as updateLorebookInfo, qt as CHARACTERS_DIR, rn as DICE_RESULTS, rt as createLorebook, st as isLorebookName, t as AuthoringTools, tn as DICE_COMPARISONS, tt as parseWorldInfoEdit, u as keepDraft, ut as lorebookDirectory, vt as populateCalendar, wt as populateKnowledge, xt as populateDice, yt as populateCharacters, z as isUnchanged } from "./authoring-tools-C_l07RYn.js";
|
|
3
|
+
import { a as lorebookImportMessage, c as readLorebook, d as lorebookOfChat, l as selectEntries, s as previewLorebook, t as LOREBOOK_UPLOAD, u as lorebookChatSessionId } from "./lorebook-author-tools-BiMDmdFi.js";
|
|
4
|
+
import { a as presetChatSessionId, n as narrationImportMessage, o as presetOfChat } from "./preset-author-tools-BhuYIKms.js";
|
|
5
5
|
import { a as liveSettings, c as writeSettings, d as DEFAULT_SETTINGS, f as SETTINGS_SPEC, h as WORLD_RULES_KEY, i as InvalidSettingsError, l as atomicWrite, o as readSettings, p as parseSettings, s as useChildReasoning } from "./narration-CjB_KwwY.js";
|
|
6
|
-
import { A as worldEntityImageFile, B as
|
|
6
|
+
import { $ as DOCTOR_OPENING_SOURCE, A as worldEntityImageFile, B as languageOfDocuments, C as readWorldEditor, D as uploadWorldCharacterPortrait, E as replaceFile, F as PRESET_FILE, G as revertUpdate, H as findTargets, I as presetMessage, J as AuthoringSessions, K as startUpdate, O as uploadWorldEntityImage, Q as agentServicesOf, R as translateMessage, S as generateWorldEntityImage, T as removeWorldTrigger, V as readWorldDocuments, X as ensureAuthoringChat, Y as authoringTitle, Z as AgentSessions, _ as editWorldPlots$1, a as deleteWorldPackFile, b as entityFolder, c as createAuthoredEntity, et as appendEmptyTurn, f as editWorldCharacter$1, g as editWorldPlace$1, h as editWorldNarrationVoice, j as writeWorldTrigger, k as worldCharacterPortraitFile, l as deleteAuthoredEntity, m as editWorldLore$1, n as packFileProblem, p as editWorldFaction$1, q as updateStatus, t as MAX_PACK_TEXT, tt as appendNarratedTurn, u as readAuthoredEntityDocument, v as editWorldRelation$1, w as readWorldTrigger, x as generateWorldCharacterPortrait, y as editWorldThing$1 } from "./pack-jail-B35Vx3hT.js";
|
|
7
7
|
import { d as sharedSamplingOf, i as childSamplingOf, u as parseSampling } from "./child-lYYeOwl2.js";
|
|
8
|
-
import { $ as copyWorldPrompts, C as readNotes, H as plotReferenceProblems, J as formatIssue, K as readDocument, M as plotProgressOf, N as populatePlots, O as zoneOf, Q as PromptLibrary, S as notesOfSession, U as COMMANDS_KEY, V as parsePlotsFile, Y as errorMessage, _ as readRunDetail, b as readWithdrawn, ct as InvalidStartError, dt as SessionArchivedError, ft as SessionNotFoundError, g as readActivity, h as readDecisionStats, i as externalTools, it as shippedLanguages, j as PLOTS_METADATA_KEY, lt as InvalidWorldError, m as readUsage, pt as WorldNotFoundError, st as AgentUnavailableError, tt as languageOf, ut as ReflectionRefusedError, w as observeAsPlayer, x as addToNote } from "./hooks-
|
|
9
|
-
import { $ as ImportNotFoundError, At as
|
|
10
|
-
import { i as translator, r as languageOf$1, t as trimCharacters } from "./text-
|
|
11
|
-
import { n as readPreset, r as selectPrompts, t as previewPreset } from "./preset-
|
|
12
|
-
import {
|
|
8
|
+
import { $ as copyWorldPrompts, C as readNotes, H as plotReferenceProblems, J as formatIssue, K as readDocument, M as plotProgressOf, N as populatePlots, O as zoneOf, Q as PromptLibrary, S as notesOfSession, U as COMMANDS_KEY, V as parsePlotsFile, Y as errorMessage, _ as readRunDetail, b as readWithdrawn, ct as InvalidStartError, dt as SessionArchivedError, ft as SessionNotFoundError, g as readActivity, h as readDecisionStats, i as externalTools, it as shippedLanguages, j as PLOTS_METADATA_KEY, lt as InvalidWorldError, m as readUsage, pt as WorldNotFoundError, st as AgentUnavailableError, tt as languageOf, ut as ReflectionRefusedError, w as observeAsPlayer, x as addToNote } from "./hooks-DNaDzMjW.js";
|
|
9
|
+
import { $ as ImportNotFoundError, At as parseLoreEdit, Ct as CHARACTER_FILE_NAME, Dt as InvalidEditProblems, Ft as LORE_SCOPES, G as listWorldPrompts, K as readWorldPrompt, Mt as parseRelationEdit, Nt as parseThingEdit, Ot as parseCharacterEdit, Pt as LORE_KINDS, Q as IMPORT_FOLDER, W as deleteWorldPrompt, X as partsOf, Z as withPlayer, a as isPresetName, c as presetDirectory, d as savePresetFromWorld, dt as parseVariablesFile, et as ImportStore, ft as variableProblems, i as deletePreset, jt as parsePlaceEdit, kt as parseFactionEdit, lt as VARIABLES_FILE_NAME, o as listPresets, ot as IMPORT_COMMAND, p as updatePresetInfo, q as writeWorldPrompt, r as createPresetFromShipped, rt as parseChoices, s as loadPreset, t as PRESET_FILE$1, u as reservePreset, ut as loadVariables, wt as parseCharacterFile } from "./presets-9GzaSELc.js";
|
|
10
|
+
import { i as translator, r as languageOf$1, t as trimCharacters } from "./text-CbGQhK1-.js";
|
|
11
|
+
import { n as readPreset, r as selectPrompts, t as previewPreset } from "./preset-DWgkcPau.js";
|
|
12
|
+
import { C as slug, T as uniqueKey, d as sceneImagePath, s as inheritImages, t as addToLibrary, u as referenceImagePath } from "./library-CIkxhf_R.js";
|
|
13
13
|
import { t as doctorChatSessionId } from "./doctor-chat-hL1a61hp.js";
|
|
14
|
-
import { c as readTimeline, d as copyPreset, f as presetStatus, h as defaultBoundaries, i as reflectionStatus, l as writeTimeline, m as switchPreset, o as TimelineError, p as recordPreset, u as pathTo } from "./reflection-
|
|
15
|
-
import { _ as API_PREFIX, a as packIds, c as describePack, d as packPath, f as readPack, l as isPackId, m as PACK_LIMITS, n as anyTab, o as syncWorldPacks, r as copyWorldPacks, s as worldPackStates, t as activePack, u as packFile } from "./packs-
|
|
16
|
-
import { a as uploadReferenceImage, t as generateReferenceImage } from "./generator-
|
|
17
|
-
import { i as updateImage, n as galleryFile, r as listGallery } from "./gallery-
|
|
14
|
+
import { c as readTimeline, d as copyPreset, f as presetStatus, h as defaultBoundaries, i as reflectionStatus, l as writeTimeline, m as switchPreset, o as TimelineError, p as recordPreset, u as pathTo } from "./reflection-4L0Plvct.js";
|
|
15
|
+
import { _ as API_PREFIX, a as packIds, c as describePack, d as packPath, f as readPack, l as isPackId, m as PACK_LIMITS, n as anyTab, o as syncWorldPacks, r as copyWorldPacks, s as worldPackStates, t as activePack, u as packFile } from "./packs-BajKw7S9.js";
|
|
16
|
+
import { a as uploadReferenceImage, t as generateReferenceImage } from "./generator-BpjPrvHe.js";
|
|
17
|
+
import { i as updateImage, n as galleryFile, r as listGallery } from "./gallery-q7niLtWn.js";
|
|
18
18
|
import { basename, dirname, extname, isAbsolute, join, normalize, relative, resolve, sep } from "node:path";
|
|
19
19
|
import { cpSync, createReadStream, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
20
20
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
@@ -26,8 +26,8 @@ import { Service } from "@deepseek-ai/cordis";
|
|
|
26
26
|
import { addLocalDays, createSessionStore, describeInstant, describeValue, holidaysOn, isSessionId, itemKey, lintWorld, locationKey, parseInstant, readCalendar, seasonOf, sessionDatabase, sessionFolder, shownVariables, systemTimeZone } from "@dsh-agentic-roleplay/state";
|
|
27
27
|
import { request } from "node:http";
|
|
28
28
|
import { request as request$1 } from "node:https";
|
|
29
|
-
import { pipeline } from "node:stream/promises";
|
|
30
29
|
import { homedir } from "node:os";
|
|
30
|
+
import { pipeline } from "node:stream/promises";
|
|
31
31
|
import { spawn } from "node:child_process";
|
|
32
32
|
import z from "@deepseek-ai/schemastery";
|
|
33
33
|
// src/host/worlds/authoring-language.ts
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import "./access-CfQWbNZP.js";
|
|
2
|
-
import { i as translator, n as withoutExtension, r as languageOf, t as trimCharacters } from "./text-
|
|
2
|
+
import { i as translator, n as withoutExtension, r as languageOf, t as trimCharacters } from "./text-CbGQhK1-.js";
|
|
3
3
|
import { dirname, extname, join } from "node:path";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
5
|
import { createHash, randomUUID } 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
|
+
/** What `ImportContext.embed` rejects with when no embedding provider is selected or loaded: the checks that would use it go without. */
|
|
9
|
+
var NoEmbeddingService = class extends Error {};
|
|
8
10
|
/** The labels of a job's prompt, in the language of the import. */
|
|
9
11
|
const trOf = (ctx) => translator(languageOf(ctx.language));
|
|
10
12
|
/** Runs `work` on every item, at most `limit` at a time, and returns the results in the order of the items. */
|
|
@@ -377,6 +379,6 @@ async function addToLibraryOnce(sessionFolder, bytes, originalName, known) {
|
|
|
377
379
|
async function addToLibrary(sessionFolder, bytes, originalName) {
|
|
378
380
|
return (await addToLibraryOnce(sessionFolder, bytes, originalName)).path;
|
|
379
381
|
}
|
|
380
|
-
export {
|
|
382
|
+
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 };
|
|
381
383
|
|
|
382
|
-
//# sourceMappingURL=library-
|
|
384
|
+
//# sourceMappingURL=library-CIkxhf_R.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./access-CfQWbNZP.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { C as
|
|
5
|
-
import { i as translator, r as languageOf } from "./text-
|
|
6
|
-
import { at as shippedPromptsDirectory } from "./hooks-
|
|
2
|
+
import { Zt as ImportCardError, at as deleteLorebookEntry, dt as readLorebook$1, i as contextOf, lt as loadLorebook, mt as writeLorebookEntry, ot as entriesOf, pt as updateLorebookInfo, r as MAX_PREVIEW_TEXT, ut as lorebookDirectory } from "./authoring-tools-C_l07RYn.js";
|
|
3
|
+
import { Ft as LORE_SCOPES, J as cleanText, Pt as LORE_KINDS, Q as IMPORT_FOLDER, X as partsOf, Z as withPlayer, n as createPresetFromGuidance } from "./presets-9GzaSELc.js";
|
|
4
|
+
import { C as slug, T as uniqueKey, w as trOf, x as mapLimit } from "./library-CIkxhf_R.js";
|
|
5
|
+
import { i as translator, r as languageOf } from "./text-CbGQhK1-.js";
|
|
6
|
+
import { at as shippedPromptsDirectory } from "./hooks-DNaDzMjW.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-BiMDmdFi.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as limitAuthoringAgents,
|
|
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 { n as limitAuthoringAgents, ut as lorebookDirectory } from "./authoring-tools-C_l07RYn.js";
|
|
2
|
+
import { t as guardAuthoringTurns } from "./turn-guard-sCUXmp-5.js";
|
|
3
|
+
import { d as lorebookOfChat, i as lorebookAuthorTools, n as LorebookReader, o as pendingTargets, r as lorebookApproval } from "./lorebook-author-tools-BiMDmdFi.js";
|
|
4
|
+
import "./hooks-DNaDzMjW.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { existsSync, readdirSync } from "node:fs";
|
|
7
7
|
// src/lorebook-authoring.ts
|
package/lib/orchestration.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { a as chatSessionId, o as roleplaySessionOf, t as promptFor } from "./access-CfQWbNZP.js";
|
|
2
|
-
import { D as describeWhen, G as commandsOf, O as zoneOf, R as wrongLanguage, T as ClockError, U as COMMANDS_KEY, W as commandFlagKey, c as record, f as MAX_OOC_ANSWER, k as RESULTS, l as characterRunner, mt as AUTHORING_NEEDS, n as installHooks, o as PREVIEW_TOOL, ot as shippedText, p as storesOf, r as externalGiven, s as createTools$1, u as toolEnabled, ut as ReflectionRefusedError, v as readVerdicts, y as writeVerdicts } from "./hooks-
|
|
2
|
+
import { D as describeWhen, G as commandsOf, O as zoneOf, R as wrongLanguage, T as ClockError, U as COMMANDS_KEY, W as commandFlagKey, c as record, f as MAX_OOC_ANSWER, k as RESULTS, l as characterRunner, mt as AUTHORING_NEEDS, n as installHooks, o as PREVIEW_TOOL, ot as shippedText, p as storesOf, r as externalGiven, s as createTools$1, u as toolEnabled, ut as ReflectionRefusedError, v as readVerdicts, y as writeVerdicts } from "./hooks-DNaDzMjW.js";
|
|
3
3
|
import { a as childTrace, c as runChild, h as currentTurn, n as childModel, r as childSampling, v as estimateAnswer, y as tokensOf } from "./child-lYYeOwl2.js";
|
|
4
|
-
import { _ as referent, a as whereabouts, g as sameWords, n as memoryReflector, r as recordFailure, s as Timelines, t as dueReflection } from "./reflection-
|
|
5
|
-
import { B as noAt, H as yesAt, I as announceProblem, L as askYesNo,
|
|
6
|
-
import { i as translator, r as languageOf } from "./text-
|
|
4
|
+
import { _ as referent, a as whereabouts, g as sameWords, n as memoryReflector, r as recordFailure, s as Timelines, t as dueReflection } from "./reflection-4L0Plvct.js";
|
|
5
|
+
import { B as noAt, H as yesAt, I as announceProblem, L as askYesNo, Rt as INTENT_STATUSES, V as routeVerdicts, m as STANDING_PROMPT, z as modeFor } from "./presets-9GzaSELc.js";
|
|
6
|
+
import { i as translator, r as languageOf } from "./text-CbGQhK1-.js";
|
|
7
7
|
import { a as liveSettings, n as encodeOutput, v as GATE_SITES } from "./narration-CjB_KwwY.js";
|
|
8
|
-
import {
|
|
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-
|
|
8
|
+
import { C as slug, T as uniqueKey, t as addToLibrary } from "./library-CIkxhf_R.js";
|
|
9
|
+
import { _ as API_PREFIX } from "./packs-BajKw7S9.js";
|
|
10
|
+
import { i as updateImage, r as listGallery, t as describeGalleryImage } from "./gallery-q7niLtWn.js";
|
|
11
|
+
import { n as interpretImage, s as presentedFor, t as runImagePresenter } from "./presenter-agent-jgtuTwZr.js";
|
|
12
12
|
import { join } from "node:path";
|
|
13
13
|
import { existsSync } from "node:fs";
|
|
14
14
|
import { readdir } from "node:fs/promises";
|