@dsh-agentic-roleplay/core 0.12.6 → 0.12.7
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-BpkpGMSO.js → authoring-tools-Bi9YQ9QH.js} +50 -16
- package/lib/authoring.js +227 -34
- package/lib/client.js +876 -519
- package/lib/client.js.map +1 -1
- package/lib/compaction.js +2 -2
- package/lib/doctor.js +2 -2
- package/lib/{library-CnWOHwQl.js → gallery-BT5lf-T5.js} +211 -6
- package/lib/{hooks-P_--KSFl.js → hooks-DR-HqE50.js} +4 -2
- package/lib/images.js +3 -4
- package/lib/index.js +84 -22
- package/lib/{presenter-agent-BTpJxmGi.js → interpreter-BYNrjYZo.js} +154 -63
- package/lib/{lorebook-author-tools-CWZ6WRN-.js → lorebook-author-tools-BI-r8fEt.js} +5 -5
- package/lib/lorebook-authoring.js +5 -5
- package/lib/{narration-DAHmte8p.js → narration-CUZIXzab.js} +8 -2
- package/lib/orchestration.js +56 -16
- package/lib/{pack-jail-DSTyLhMc.js → pack-jail-Y1XPbqHw.js} +18 -12
- package/lib/{packs-D9_N8kDF.js → packs-DD-v-Epl.js} +2 -2
- package/lib/presenter-agent-00sOVGI9.js +59 -0
- package/lib/{preset-B69AXtip.js → preset-Bnx3jhUv.js} +3 -3
- package/lib/{preset-author-tools-BJtt7D0J.js → preset-author-tools-DYrBcieA.js} +5 -5
- package/lib/preset-authoring.js +5 -5
- package/lib/{reflection-2uzE3U-v.js → reflection-DqxoV9xE.js} +7 -6
- package/lib/{serial-DnVqMDe5.js → serial-CS46qAvI.js} +55 -9
- package/lib/{turn-guard-D4YHE00t.js → turn-guard-bZkxzRXJ.js} +2 -2
- package/package.json +3 -2
- package/prompts/en/import/finish-ok.md +2 -0
- package/prompts/en/roleplay/image-worth.md +5 -0
- package/prompts/zh/import/finish-ok.md +2 -0
- package/prompts/zh/roleplay/image-worth.md +5 -0
- package/lib/gallery-D0h0X7Jy.js +0 -190
- package/lib/generator-CAJkevKl.js +0 -150
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./access-5vtPAT3O.js";
|
|
2
|
-
import { Et as IMPORT_FOLDER, H as PRESET_FILE, Tt as withPlayer, X as readPreset, Y as presetDirectory, at as writeWorldPrompt, et as updatePresetInfo, it as readWorldPrompt, l as extractStyleFrom, nt as deleteWorldPrompt, rt as listWorldPrompts, tt as PROSE_PROMPTS } from "./serial-
|
|
3
|
-
import { n as readPreset$1 } from "./preset-
|
|
4
|
-
import { o as contextOf } from "./authoring-tools-
|
|
2
|
+
import { Et as IMPORT_FOLDER, H as PRESET_FILE, Tt as withPlayer, X as readPreset, Y as presetDirectory, at as writeWorldPrompt, et as updatePresetInfo, it as readWorldPrompt, l as extractStyleFrom, nt as deleteWorldPrompt, rt as listWorldPrompts, tt as PROSE_PROMPTS } from "./serial-CS46qAvI.js";
|
|
3
|
+
import { n as readPreset$1 } from "./preset-Bnx3jhUv.js";
|
|
4
|
+
import { o as contextOf } from "./authoring-tools-Bi9YQ9QH.js";
|
|
5
5
|
import { i as translator, r as languageOf } from "./text-B-HsLdb-.js";
|
|
6
|
-
import { at as shippedPromptsDirectory, it as shippedLanguages, tt as languageOf$1 } from "./hooks-
|
|
6
|
+
import { at as shippedPromptsDirectory, it as shippedLanguages, tt as languageOf$1 } from "./hooks-DR-HqE50.js";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
9
9
|
import { readFile, rm } from "node:fs/promises";
|
|
@@ -279,4 +279,4 @@ async function presetApproval(exec, next, carries, auto = () => false) {
|
|
|
279
279
|
}
|
|
280
280
|
export { presetChatSessionId as a, presetAuthorTools as i, narrationImportMessage as n, presetOfChat as o, presetApproval as r, PresetReader as t };
|
|
281
281
|
|
|
282
|
-
//# sourceMappingURL=preset-author-tools-
|
|
282
|
+
//# sourceMappingURL=preset-author-tools-DYrBcieA.js.map
|
package/lib/preset-authoring.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as limitAuthoringAgents } from "./authoring-tools-
|
|
2
|
-
import { t as guardAuthoringTurns } from "./turn-guard-
|
|
1
|
+
import { n as limitAuthoringAgents } from "./authoring-tools-Bi9YQ9QH.js";
|
|
2
|
+
import { t as guardAuthoringTurns } from "./turn-guard-bZkxzRXJ.js";
|
|
3
3
|
import { n as silenceRuntimeContext, t as silenceHarnessDevContext } from "./dev-context-Cgv_wZbG.js";
|
|
4
|
-
import { i as presetAuthorTools, o as presetOfChat, r as presetApproval, t as PresetReader } from "./preset-author-tools-
|
|
5
|
-
import "./hooks-
|
|
6
|
-
import { Y as presetDirectory } from "./serial-
|
|
4
|
+
import { i as presetAuthorTools, o as presetOfChat, r as presetApproval, t as PresetReader } from "./preset-author-tools-DYrBcieA.js";
|
|
5
|
+
import "./hooks-DR-HqE50.js";
|
|
6
|
+
import { Y as presetDirectory } from "./serial-CS46qAvI.js";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { existsSync } from "node:fs";
|
|
9
9
|
// src/preset-authoring.ts
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { O as estimateAnswer, a as childTrace, j as roleplaySessionOf, l as runChild, n as childModel, r as childSampling } from "./child-Bfj7-Iuo.js";
|
|
2
|
-
import { $ as sha, A as routeVerdicts, D as mergeReports, E as askYesNo, J as loadPreset, T as announceProblem, j as yesAt, k as noAt, q as listPresets, t as SerialQueue } from "./serial-
|
|
2
|
+
import { $ as sha, A as routeVerdicts, D as mergeReports, E as askYesNo, J as loadPreset, T as announceProblem, j as yesAt, k as noAt, q as listPresets, t as SerialQueue } from "./serial-CS46qAvI.js";
|
|
3
|
+
import { i as wordsOf } from "./narration-CUZIXzab.js";
|
|
3
4
|
import { t as promptFor } from "./access-5vtPAT3O.js";
|
|
4
|
-
import { D as referent, I as wrongLanguage, Z as PROMPTS_FOLDER, et as inheritPrompts, vt as describeWhen } from "./hooks-
|
|
5
|
+
import { D as referent, I as wrongLanguage, Z as PROMPTS_FOLDER, et as inheritPrompts, vt as describeWhen } from "./hooks-DR-HqE50.js";
|
|
5
6
|
import { i as translator, r as languageOf } from "./text-B-HsLdb-.js";
|
|
6
|
-
import {
|
|
7
|
-
import { i as inheritPacks } from "./packs-
|
|
7
|
+
import { d as inheritImages } from "./gallery-BT5lf-T5.js";
|
|
8
|
+
import { i as inheritPacks } from "./packs-DD-v-Epl.js";
|
|
8
9
|
import { dirname, join } from "node:path";
|
|
9
10
|
import { characterKey, locationKey, sessionDatabase, sessionFolder, tokens } from "@dsh-agentic-roleplay/state";
|
|
10
11
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -69,7 +70,7 @@ function viewOf(timeline) {
|
|
|
69
70
|
}
|
|
70
71
|
/** Where a notice stands for a turn that is not told by its own events: the player's words and what was delivered, as plain text. */
|
|
71
72
|
function noticeText(node) {
|
|
72
|
-
const told = node.output === void 0 ? "(nothing was delivered)" : node.output.segments
|
|
73
|
+
const told = node.output === void 0 ? "(nothing was delivered)" : wordsOf(node.output.segments, (segment) => `${segment.name}: "${segment.text}"`).join("\n");
|
|
73
74
|
const ooc = node.output?.ooc;
|
|
74
75
|
const ruling = ooc === void 0 ? "" : ooc.question === true ? `\nThe question was answered out of character: ${ooc.note}` : `\nThe command was ruled ${ooc.legal ? "legal" : "illegal and refused"}: ${ooc.note}`;
|
|
75
76
|
return `The story, as it went earlier (restored):\nThe player said: ${node.player}${ruling}\nIt was told to the player:\n${told}`;
|
|
@@ -1504,4 +1505,4 @@ function memoryReflector(deps) {
|
|
|
1504
1505
|
}
|
|
1505
1506
|
export { pathTo as _, whereabouts as a, BranchError as c, recordPreset as d, switchPreset as f, childrenOf as g, START_SNAPSHOT as h, reflectionStatus as i, copyPreset as l, writeTimeline as m, memoryReflector as n, TimelineError as o, readTimeline as p, recordFailure as r, Timelines as s, dueReflection as t, presetStatus as u, snapshotOf as v };
|
|
1506
1507
|
|
|
1507
|
-
//# sourceMappingURL=reflection-
|
|
1508
|
+
//# sourceMappingURL=reflection-DqxoV9xE.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { m as parseSampling } from "./child-Bfj7-Iuo.js";
|
|
2
|
-
import {
|
|
2
|
+
import { p as parseSwitchboard } from "./narration-CUZIXzab.js";
|
|
3
3
|
import { a as VARIABLE_KINDS, n as atomicWrite, o as VARIABLE_SUBJECTS, s as VARIABLE_VISIBILITIES } from "./access-5vtPAT3O.js";
|
|
4
|
-
import { G as readDocument, J as errorMessage, K as Reader, X as LANGUAGE_TAG, Y as LANGUAGE_FOLDER, Z as PROMPTS_FOLDER, at as shippedPromptsDirectory, it as shippedLanguages, nt as listFiles, q as formatIssue, rt as promptProblem, tt as languageOf } from "./hooks-
|
|
4
|
+
import { G as readDocument, J as errorMessage, K as Reader, X as LANGUAGE_TAG, Y as LANGUAGE_FOLDER, Z as PROMPTS_FOLDER, at as shippedPromptsDirectory, it as shippedLanguages, nt as listFiles, q as formatIssue, rt as promptProblem, tt as languageOf } from "./hooks-DR-HqE50.js";
|
|
5
5
|
import { i as translator, r as languageOf$1 } from "./text-B-HsLdb-.js";
|
|
6
|
-
import { C as
|
|
6
|
+
import { C as mapLimit, D as uniqueKey, E as trOf, T as slug, w as norm } from "./gallery-BT5lf-T5.js";
|
|
7
7
|
import { dirname, join } from "node:path";
|
|
8
8
|
import { MAX_ROUTINE_WINDOWS, createSessionStore, dayTokenProblems, isTimeZone, parseInstant, valueIssue } from "@dsh-agentic-roleplay/state";
|
|
9
9
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
@@ -1950,11 +1950,13 @@ function parseChoices(value) {
|
|
|
1950
1950
|
index: raw["index"]
|
|
1951
1951
|
};
|
|
1952
1952
|
else if (raw?.["kind"] !== "none") problems.push("opening must be first, alternate with an index, or none");
|
|
1953
|
+
if (input["fetchPictures"] !== void 0 && typeof input["fetchPictures"] !== "boolean") problems.push("fetchPictures must be true or false");
|
|
1953
1954
|
if (problems.length > 0) throw new InvalidEditProblems(problems);
|
|
1954
1955
|
return {
|
|
1955
1956
|
name,
|
|
1956
1957
|
disabledEntries: [...new Set(disabled)],
|
|
1957
|
-
opening
|
|
1958
|
+
opening,
|
|
1959
|
+
...input["fetchPictures"] === false ? { fetchPictures: false } : {}
|
|
1958
1960
|
};
|
|
1959
1961
|
}
|
|
1960
1962
|
async function readJson(file) {
|
|
@@ -2870,7 +2872,28 @@ function parseStartQuestionsEdit(value, problems) {
|
|
|
2870
2872
|
}
|
|
2871
2873
|
const MAX_OPENING_TEXT = 2e4;
|
|
2872
2874
|
/** The words of an opening as one text: its parts, a blank line between. */
|
|
2873
|
-
const partsText = (parts) => parts.
|
|
2875
|
+
const partsText = (parts) => parts.flatMap((part) => part.type === "image" ? [] : [part.text]).join("\n\n");
|
|
2876
|
+
/** The folders of a world's `images/` that a story starts with a copy of; an opening may show a picture from any of them. */
|
|
2877
|
+
const IMAGE_FOLDERS = [
|
|
2878
|
+
"library",
|
|
2879
|
+
"characters",
|
|
2880
|
+
"locations",
|
|
2881
|
+
"items",
|
|
2882
|
+
"global"
|
|
2883
|
+
];
|
|
2884
|
+
/** Whether a path names a picture of a world's `images/` that its stories carry: relative, in one of the copied folders, with no dot segments and no backslashes. */
|
|
2885
|
+
function isImagePath(path) {
|
|
2886
|
+
const segments = path.split("/");
|
|
2887
|
+
const extension = /\.([a-z0-9]+)$/i.exec(path)?.[1]?.toLowerCase();
|
|
2888
|
+
const served = extension === "png" || segments[0] === "library" && [
|
|
2889
|
+
"jpg",
|
|
2890
|
+
"jpeg",
|
|
2891
|
+
"webp",
|
|
2892
|
+
"gif",
|
|
2893
|
+
"avif"
|
|
2894
|
+
].includes(extension ?? "");
|
|
2895
|
+
return path.length <= 300 && served && !path.includes("\\") && segments.length >= 2 && IMAGE_FOLDERS.includes(segments[0]) && segments.every((segment) => segment !== "" && segment !== "." && segment !== "..");
|
|
2896
|
+
}
|
|
2874
2897
|
/** Whether any part is spoken by a character: an opening with none is only narration, which a plain text says as well. */
|
|
2875
2898
|
const hasSpeech = (parts) => parts.some((part) => part.type === "utterance");
|
|
2876
2899
|
/**
|
|
@@ -2891,8 +2914,17 @@ function parseOpeningParts(value, where, problems) {
|
|
|
2891
2914
|
}
|
|
2892
2915
|
const part = entry;
|
|
2893
2916
|
const type = part["type"] ?? "narration";
|
|
2894
|
-
if (type !== "narration" && type !== "utterance") {
|
|
2895
|
-
problems.push(`${at}.type must be "narration" or "
|
|
2917
|
+
if (type !== "narration" && type !== "utterance" && type !== "image") {
|
|
2918
|
+
problems.push(`${at}.type must be "narration", "utterance" or "image"`);
|
|
2919
|
+
continue;
|
|
2920
|
+
}
|
|
2921
|
+
if (type === "image") {
|
|
2922
|
+
const path = typeof part["path"] === "string" ? part["path"].trim() : "";
|
|
2923
|
+
if (!isImagePath(path)) problems.push(`${at}.path must name a picture of the library, like library/dock.png`);
|
|
2924
|
+
else parts.push({
|
|
2925
|
+
type,
|
|
2926
|
+
path
|
|
2927
|
+
});
|
|
2896
2928
|
continue;
|
|
2897
2929
|
}
|
|
2898
2930
|
if (typeof part["text"] !== "string") {
|
|
@@ -3191,7 +3223,21 @@ function readRules(reader) {
|
|
|
3191
3223
|
function readParts(reader, key) {
|
|
3192
3224
|
const parts = [];
|
|
3193
3225
|
for (const part of reader.objects(key)) {
|
|
3194
|
-
const type = part.oneOf("type", [
|
|
3226
|
+
const type = part.oneOf("type", [
|
|
3227
|
+
"narration",
|
|
3228
|
+
"utterance",
|
|
3229
|
+
"image"
|
|
3230
|
+
], "narration");
|
|
3231
|
+
if (type === "image") {
|
|
3232
|
+
const path = part.string("path", { required: true })?.trim();
|
|
3233
|
+
if (path === void 0) continue;
|
|
3234
|
+
if (!isImagePath(path)) part.fail("path", "must name a picture of the library, like library/dock.png");
|
|
3235
|
+
else parts.push({
|
|
3236
|
+
type,
|
|
3237
|
+
path
|
|
3238
|
+
});
|
|
3239
|
+
continue;
|
|
3240
|
+
}
|
|
3195
3241
|
const text = part.string("text", { required: true })?.trim();
|
|
3196
3242
|
if (text === void 0 || text === "") continue;
|
|
3197
3243
|
if (type === "narration") {
|
|
@@ -5369,4 +5415,4 @@ var SerialQueue = class {
|
|
|
5369
5415
|
};
|
|
5370
5416
|
export { sha as $, LOCATION_FILE_NAME as $t, routeVerdicts as A, openingText as At, questionView as B, parseThingEdit as Bt, ROLE_TABLE as C, itemise as Ct, mergeReports as D, ImportNotFoundError as Dt, askYesNo as E, IMPORT_FOLDER as Et, parseWorldInfoEdit as F, parseCharacterEdit as Ft, deletePreset as G, dialectOf as Gt, PRESET_FILE as H, importRequestOf as Ht, hasSpeech as I, parseFactionEdit as It, loadPreset as J, loadVariables as Jt, isPresetName as K, sourceSummary as Kt, parseOpeningParts as L, parseLoreEdit as Lt, WORLD_FILE_NAME as M, readImportFolder as Mt, parseWorldFile as N, writeChoices as Nt, modeFor as O, ImportStore as Ot, MAX_OPENING_CHARS as P, InvalidEditProblems as Pt, savePresetFromWorld as Q, parseLoreFile as Qt, partsText as R, parsePlaceEdit as Rt, ROLES as S, cleanText as St, announceProblem as T, withPlayer as Tt, createPresetFromGuidance as U, findPanel as Ut, startQuestionsToFile as V, IMPORT_COMMAND as Vt, createPresetFromShipped as W, splitPanels as Wt, readPreset as X, variableProblems as Xt, presetDirectory as Y, parseVariablesFile as Yt, reservePreset as Z, LORE_FILE_NAME as Zt, pruneRelationships as _, updateLorebookInfo as _t, characterDocument as a, FACTION_FILE_NAME as an, writeWorldPrompt as at, classifyItems as b, loadLore as bt, extractStyle as c, parseCharacterFile as cn, deleteLorebook as ct, inert as d, LORE_SCOPES as dn, isLorebookName as dt, parseLocationFile as en, updatePresetInfo as et, loreDocuments as f, WEEKDAY_NAMES as fn, listLorebooks as ft, pruneMembers as g, reserveLorebook as gt, pruneLoreSubjects as h, readLorebook as ht, asWritten as i, parseSlotsFile as in, readWorldPrompt as it, yesAt as j, parseChoices as jt, noAt as k, PICTURE_FILE as kt, extractStyleFrom as l, guarded as ln, deleteLorebookEntry as lt, pruneLinks as m, INTENT_STATUSES as mn, lorebookDirectory as mt, STANDING_PROMPT as n, SLOTS_FILE_NAME as nn, deleteWorldPrompt as nt, emptyExtracted as o, parseFactionFile as on, addLorebookEntries as ot, pruneKnowledge as p, DEFAULT_SLOTS as pn, loadLorebook as pt, listPresets as q, VARIABLES_FILE_NAME as qt, addLore as r, parseItemFile as rn, listWorldPrompts as rt, extractEntities as s, CHARACTER_FILE_NAME as sn, createLorebook as st, SerialQueue as t, ITEM_FILE_NAME as tn, PROSE_PROMPTS as tt, extractVariables as u, LORE_KINDS as un, entriesOf as ut, sourcesFor as v, writeLorebookEntry as vt, isLeftOut as w, partsOf as wt, findEntity as x, subfolders as xt, buildRoster as y, LORE_DIR as yt, combineAnswers as z, parseRelationEdit as zt };
|
|
5371
5417
|
|
|
5372
|
-
//# sourceMappingURL=serial-
|
|
5418
|
+
//# sourceMappingURL=serial-CS46qAvI.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { D as finishOf, E as cutOff } from "./child-Bfj7-Iuo.js";
|
|
2
|
-
import { r as guardRepeatedCalls } from "./hooks-
|
|
2
|
+
import { r as guardRepeatedCalls } from "./hooks-DR-HqE50.js";
|
|
3
3
|
import { ReasoningEffortId, createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
4
4
|
// src/host/authoring/turn-guard.ts
|
|
5
5
|
/**
|
|
@@ -49,4 +49,4 @@ function guardAuthoringTurns(ctx, prompts, languageOf, reasoning = () => "") {
|
|
|
49
49
|
}
|
|
50
50
|
export { guardAuthoringTurns as t };
|
|
51
51
|
|
|
52
|
-
//# sourceMappingURL=turn-guard-
|
|
52
|
+
//# sourceMappingURL=turn-guard-bZkxzRXJ.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-agentic-roleplay/core",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.7",
|
|
4
4
|
"description": "Core plugin of the agentic roleplay bundle for DeepSeek Harness: roleplay UI, orchestration and storage.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Firefox2100",
|
|
@@ -80,13 +80,14 @@
|
|
|
80
80
|
"@deepseek-ai/schemastery": "^3.18.5"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@dsh-agentic-roleplay/state": "0.12.
|
|
83
|
+
"@dsh-agentic-roleplay/state": "0.12.7"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@deepseek-ai/cordis": "^4.1.0",
|
|
87
87
|
"@deepseek-ai/cordis-plugin-loader": "^1.1.0",
|
|
88
88
|
"@deepseek-ai/dsh-agent": ">=0.2.2-rc.3 <0.2.3",
|
|
89
89
|
"@deepseek-ai/dsh-agent-loop": ">=0.2.2-rc.3 <0.2.3",
|
|
90
|
+
"@deepseek-ai/dsh-attachment": ">=0.2.2-rc.3 <0.2.3",
|
|
90
91
|
"@deepseek-ai/dsh-client-locale": ">=0.2.2-rc.3 <0.2.3",
|
|
91
92
|
"@deepseek-ai/dsh-client-store": ">=0.2.2-rc.3 <0.2.3",
|
|
92
93
|
"@deepseek-ai/dsh-client-ui-chat": ">=0.2.2-rc.3 <0.2.3",
|
|
@@ -9,3 +9,5 @@ The import already turned the card's instructions about narration and behaviour
|
|
|
9
9
|
The report also says how many variables the card's panels and meters became (variables.json), how many of the card's other greetings the world offers as openings to choose from when a session starts, and whether the card's picture became the portrait of its character. Mention them briefly.
|
|
10
10
|
|
|
11
11
|
The report comes with `checks`: the checks the program runs on every import, already run and stored with the world (consistency of the world, comparison with the card, authoring quality). Read the findings. An error is for you to fix. A warning is a pointer: read the piece of the card with card_read, then fix what is wrong or say why you left it. An info is only worth a mention. The checks a model judges are not run yet. Run check_card with deep true when the card was long or many of its pieces were rewritten into lore, or when the quick findings show facts lost or made up; run check_quality with deep true when the cast has bare sheets or the world looks thin. After fixing, run the tool again to see that the finding is gone. Do not run them just to run them, and do not fill a gap with something the card does not say.
|
|
12
|
+
|
|
13
|
+
The pictures the card's addresses pointed to were downloaded into the world's image library, and each carries the addresses it came from and the card pieces that held them. Call list_world_images. For a picture that has no description, or whose card piece says who it shows, read that piece with card_read (the text around the address) and put the facts you can verify there into the picture: describe_world_image with that text as context writes the description and subjects, and edit_world_image corrects them. Name a character, place or thing only when the card text or the picture itself makes it clear; leave a picture you are unsure of as it is and say so. Never add what the card does not say.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
You decide whether one moment of an interactive story deserves a picture. You work only from the passage you are shown and never add a fact that is not in it.
|
|
2
|
+
|
|
3
|
+
A moment deserves a picture when something visual happens or is revealed: a new place is entered or seen for the first time, an important person or creature appears, something striking, beautiful, dramatic or dangerous takes place, or the scene changes in a way a reader would want to see. It does not deserve one when it is mostly conversation, thought, travel through already known ground, bookkeeping, a quiet repeat of the previous scene, or a passage with nothing to look at. When in doubt, it does not.
|
|
4
|
+
|
|
5
|
+
Give your reason in one short sentence first, then say whether the moment deserves a picture.
|
|
@@ -9,3 +9,5 @@
|
|
|
9
9
|
报告还会说明:角色卡的状态栏和数值面板变成了多少个变量(variables.json)、角色卡的其他开场白有多少个成为开始会话时可选的开场、以及角色卡的图片是否成为了对应角色的立绘。请简要提及。
|
|
10
10
|
|
|
11
11
|
报告附带 `checks`:程序对每次导入都会运行的检查,已经运行并存放在世界里(世界自身的一致性、与卡片的对照、创作质量)。请阅读这些发现。错误由你修复。警告只是线索:先用 card_read 读卡片的对应片段,再修正有误之处,或说明为什么不改。提示只需一提。由模型判断的检查还没有运行。卡片很长、或其中很多片段被改写成了背景条目、或者快速检查显示有事实丢失或被编造时,用 deep 为 true 运行 check_card;角色设定很空、或世界显得单薄时,用 deep 为 true 运行 check_quality。修正之后再运行一次,确认那条发现消失了。不要为了运行而运行,也不要用卡片没有写的内容去填补空缺。
|
|
12
|
+
|
|
13
|
+
卡片中的网址所指向的图片已下载到世界的图片库,每张图片都带着它的来源网址和包含该网址的卡片片段。请调用 list_world_images。对于没有描述的图片,或卡片片段说明了图中是谁的图片,用 card_read 读取该片段(网址周围的文字),再把你能够核实的事实写进图片:用 describe_world_image 并把那段文字作为上下文,来写描述和主体;用 edit_world_image 来修正。只有当卡片文字或图片本身足够清楚时,才写出角色、地点或物品的名字;拿不准的图片保持原样,并说明这一点。绝不添加卡片没有写的内容。
|
package/lib/gallery-D0h0X7Jy.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { n as atomicWrite } from "./access-5vtPAT3O.js";
|
|
2
|
-
import { _ as writeImageFileMetadata, a as LIBRARY_FOLDER, g as sidecarOf, h as readImageFileMetadata, m as mediaTypeOf, x as mapLimit } from "./library-CnWOHwQl.js";
|
|
3
|
-
import { join, sep } from "node:path";
|
|
4
|
-
import { lstat, readFile, readdir, realpath, stat } from "node:fs/promises";
|
|
5
|
-
// src/host/images/gallery.ts
|
|
6
|
-
const READ_AT_ONCE = 8;
|
|
7
|
-
const SEGMENT = /^[\p{L}\p{N}][\p{L}\p{N}\p{M}._-]{0,199}$/u;
|
|
8
|
-
const CACHE_FILE = ".index.json";
|
|
9
|
-
const CACHE_VERSION = 1;
|
|
10
|
-
/** The images of the folder: every PNG, and the other raster formats inside the library, whose metadata is beside them. */
|
|
11
|
-
async function imageFiles(images, prefix = "") {
|
|
12
|
-
let entries;
|
|
13
|
-
try {
|
|
14
|
-
entries = await readdir(join(images, prefix), { withFileTypes: true });
|
|
15
|
-
} catch (error) {
|
|
16
|
-
if (error.code === "ENOENT") return [];
|
|
17
|
-
throw error;
|
|
18
|
-
}
|
|
19
|
-
const found = [];
|
|
20
|
-
for (const entry of entries) {
|
|
21
|
-
if (entry.isSymbolicLink()) continue;
|
|
22
|
-
const path = `${prefix}${entry.name}`;
|
|
23
|
-
if (entry.isDirectory()) found.push(...await imageFiles(images, `${path}/`));
|
|
24
|
-
else if (entry.isFile() && (entry.name.toLowerCase().endsWith(".png") || path.startsWith(`library/`) && mediaTypeOf(entry.name) !== void 0)) found.push(path);
|
|
25
|
-
}
|
|
26
|
-
return found;
|
|
27
|
-
}
|
|
28
|
-
async function factsOf(images, path) {
|
|
29
|
-
const file = join(images, ...path.split("/"));
|
|
30
|
-
const info = await lstat(file);
|
|
31
|
-
const beside = path.toLowerCase().endsWith(".png") ? void 0 : await stat(sidecarOf(file)).then((value) => value.mtimeMs, () => 0);
|
|
32
|
-
return {
|
|
33
|
-
path,
|
|
34
|
-
signature: `${info.mtimeMs}:${info.size}:${beside ?? ""}`
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
async function describe(images, path) {
|
|
38
|
-
const file = join(images, ...path.split("/"));
|
|
39
|
-
const { mtime } = await lstat(file);
|
|
40
|
-
const library = path.startsWith(`${LIBRARY_FOLDER}/`);
|
|
41
|
-
const metadata = await readImageFileMetadata(file);
|
|
42
|
-
if (metadata === void 0 || typeof metadata !== "object") return library ? {
|
|
43
|
-
path,
|
|
44
|
-
purpose: "uploaded",
|
|
45
|
-
origin: "uploaded",
|
|
46
|
-
reusable: true,
|
|
47
|
-
createdAt: mtime.toISOString(),
|
|
48
|
-
tags: [],
|
|
49
|
-
subjects: [],
|
|
50
|
-
pending: true
|
|
51
|
-
} : {
|
|
52
|
-
path,
|
|
53
|
-
purpose: path.startsWith("scenes/") ? "transient" : "reference",
|
|
54
|
-
origin: "generated",
|
|
55
|
-
reusable: false,
|
|
56
|
-
createdAt: mtime.toISOString(),
|
|
57
|
-
tags: [],
|
|
58
|
-
subjects: [],
|
|
59
|
-
unreadable: true
|
|
60
|
-
};
|
|
61
|
-
const origin = metadata.origin ?? (library ? "uploaded" : "generated");
|
|
62
|
-
const purpose = metadata.purpose ?? (origin === "uploaded" ? "uploaded" : path.startsWith("scenes/") ? "transient" : "reference");
|
|
63
|
-
return {
|
|
64
|
-
path,
|
|
65
|
-
purpose,
|
|
66
|
-
origin,
|
|
67
|
-
reusable: origin === "uploaded" ? true : metadata.reusable ?? purpose === "reference",
|
|
68
|
-
createdAt: metadata.createdAt ?? mtime.toISOString(),
|
|
69
|
-
...metadata.prompt === void 0 ? {} : { prompt: metadata.prompt },
|
|
70
|
-
...metadata.revisedPrompt === void 0 ? {} : { revisedPrompt: metadata.revisedPrompt },
|
|
71
|
-
...metadata.description === void 0 ? {} : { description: metadata.description },
|
|
72
|
-
tags: metadata.tags ?? [],
|
|
73
|
-
...metadata.provider === void 0 ? {} : { provider: metadata.provider },
|
|
74
|
-
...metadata.model === void 0 ? {} : { model: metadata.model },
|
|
75
|
-
subjects: (metadata.subjects ?? []).map((subject) => ({
|
|
76
|
-
kind: subject.kind,
|
|
77
|
-
name: subject.name
|
|
78
|
-
})),
|
|
79
|
-
...metadata.source === void 0 ? {} : { source: metadata.source },
|
|
80
|
-
...metadata.originalName === void 0 ? {} : { originalName: metadata.originalName },
|
|
81
|
-
...origin === "uploaded" && metadata.description === void 0 ? { pending: true } : {}
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
async function describeGalleryImage(sessionFolder, path) {
|
|
85
|
-
return await describe(join(sessionFolder, "images"), path);
|
|
86
|
-
}
|
|
87
|
-
async function readCache(images) {
|
|
88
|
-
try {
|
|
89
|
-
const cache = JSON.parse(await readFile(join(images, CACHE_FILE), "utf8"));
|
|
90
|
-
if (cache.version === CACHE_VERSION && typeof cache.entries === "object" && cache.entries !== null) return cache;
|
|
91
|
-
} catch {}
|
|
92
|
-
return {
|
|
93
|
-
version: CACHE_VERSION,
|
|
94
|
-
entries: {}
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
async function writeCache(images, cache) {
|
|
98
|
-
await atomicWrite(join(images, CACHE_FILE), JSON.stringify(cache), { createDirectory: true });
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Every image of a session folder with what its file says, newest first. The files are the truth; `images/.index.json` only remembers what
|
|
102
|
-
* was read from each, keyed by its size and time, so that a listing reads just the files that are new or changed. It can be deleted at any time.
|
|
103
|
-
*/
|
|
104
|
-
async function listGallery(sessionFolder) {
|
|
105
|
-
const images = join(sessionFolder, "images");
|
|
106
|
-
const paths = await imageFiles(images);
|
|
107
|
-
if (paths.length === 0) return [];
|
|
108
|
-
const cache = await readCache(images);
|
|
109
|
-
const facts = await mapLimit(paths, READ_AT_ONCE, (path) => factsOf(images, path));
|
|
110
|
-
const entries = {};
|
|
111
|
-
let changed = Object.keys(cache.entries).length !== paths.length;
|
|
112
|
-
const described = await mapLimit(facts, READ_AT_ONCE, async ({ path, signature }) => {
|
|
113
|
-
const known = cache.entries[path];
|
|
114
|
-
if (known?.signature === signature) {
|
|
115
|
-
entries[path] = known;
|
|
116
|
-
return known.image;
|
|
117
|
-
}
|
|
118
|
-
changed = true;
|
|
119
|
-
const image = await describe(images, path);
|
|
120
|
-
entries[path] = {
|
|
121
|
-
signature,
|
|
122
|
-
image
|
|
123
|
-
};
|
|
124
|
-
return image;
|
|
125
|
-
});
|
|
126
|
-
if (changed) await writeCache(images, {
|
|
127
|
-
version: CACHE_VERSION,
|
|
128
|
-
entries
|
|
129
|
-
});
|
|
130
|
-
return described.sort((a, b) => b.createdAt.localeCompare(a.createdAt) || a.path.localeCompare(b.path));
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* The file of a gallery image by its path, which must be one the listing gives: a raster image inside the session's images, not reached through a link.
|
|
134
|
-
* @throws {Error} when the path names no such image.
|
|
135
|
-
*/
|
|
136
|
-
async function galleryFile(sessionFolder, path) {
|
|
137
|
-
const parts = path.split("/");
|
|
138
|
-
const mediaType = mediaTypeOf(path);
|
|
139
|
-
if (parts.length === 0 || mediaType === void 0 || mediaType !== "image/png" && parts[0] !== "library" || parts.some((part) => !SEGMENT.test(part) || part === "." || part === "..")) throw new Error("there is no such image");
|
|
140
|
-
const images = join(sessionFolder, "images");
|
|
141
|
-
const file = join(images, ...parts);
|
|
142
|
-
const info = await lstat(file).catch(() => void 0);
|
|
143
|
-
if (info === void 0 || !info.isFile()) throw new Error("there is no such image");
|
|
144
|
-
if (!(await realpath(file)).startsWith(`${await realpath(images)}${sep}`)) throw new Error("there is no such image");
|
|
145
|
-
return {
|
|
146
|
-
file,
|
|
147
|
-
size: info.size,
|
|
148
|
-
mediaType
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Changes what an image says about itself, in the file. An image the person brought is always reusable.
|
|
153
|
-
* @throws {Error} when the path names no image of the session, or an uploaded image is made not reusable.
|
|
154
|
-
*/
|
|
155
|
-
async function updateImage(sessionFolder, path, update) {
|
|
156
|
-
const { file } = await galleryFile(sessionFolder, path);
|
|
157
|
-
const current = await describe(join(sessionFolder, "images"), path);
|
|
158
|
-
if (update.reusable === false && current.origin === "uploaded") throw new Error("an image you brought is always reusable: otherwise it would only sit there");
|
|
159
|
-
const existing = await readImageFileMetadata(file);
|
|
160
|
-
const next = {
|
|
161
|
-
schema: "dsh-roleplay-image/v3",
|
|
162
|
-
purpose: current.purpose,
|
|
163
|
-
origin: current.origin,
|
|
164
|
-
reusable: current.reusable,
|
|
165
|
-
createdAt: current.createdAt,
|
|
166
|
-
tags: current.tags,
|
|
167
|
-
subjects: current.subjects.map((subject) => ({
|
|
168
|
-
kind: subject.kind,
|
|
169
|
-
localId: subject.name,
|
|
170
|
-
name: subject.name
|
|
171
|
-
})),
|
|
172
|
-
...existing,
|
|
173
|
-
schema: "dsh-roleplay-image/v3",
|
|
174
|
-
origin: current.origin,
|
|
175
|
-
...update.description === void 0 ? {} : { description: update.description },
|
|
176
|
-
...update.tags === void 0 ? {} : { tags: update.tags },
|
|
177
|
-
...update.subjects === void 0 ? {} : { subjects: update.subjects.map((subject) => ({
|
|
178
|
-
kind: subject.kind,
|
|
179
|
-
localId: subject.name,
|
|
180
|
-
name: subject.name
|
|
181
|
-
})) },
|
|
182
|
-
...update.reusable === void 0 ? {} : { reusable: update.reusable },
|
|
183
|
-
...update.interpretedBy === void 0 ? {} : { interpretedBy: update.interpretedBy }
|
|
184
|
-
};
|
|
185
|
-
await writeImageFileMetadata(file, next);
|
|
186
|
-
return await describe(join(sessionFolder, "images"), path);
|
|
187
|
-
}
|
|
188
|
-
export { updateImage as i, galleryFile as n, listGallery as r, describeGalleryImage as t };
|
|
189
|
-
|
|
190
|
-
//# sourceMappingURL=gallery-D0h0X7Jy.js.map
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { d as sceneImagePath, f as writeImage, u as referenceImagePath } from "./library-CnWOHwQl.js";
|
|
2
|
-
// src/host/images/generator.ts
|
|
3
|
-
const unique = (values) => [...new Set(values.map((value) => value.trim()).filter((value) => value !== ""))];
|
|
4
|
-
/** What a reference image shows: the subject and its stable look. */
|
|
5
|
-
function referenceDescription(request) {
|
|
6
|
-
return `${request.subject.name} (${request.subject.kind}): ${request.identity.description}`.trim();
|
|
7
|
-
}
|
|
8
|
-
/** What a scene image shows: the established moment, then how each subject looks in it. */
|
|
9
|
-
function transientDescription(request) {
|
|
10
|
-
return [request.scene.trim(), ...request.subjects.map((subject) => subject.transient.trim() === "" ? void 0 : `${subject.name}: ${subject.transient.trim()}`)].filter((part) => part !== void 0 && part !== "").join("\n");
|
|
11
|
-
}
|
|
12
|
-
function lines(parts) {
|
|
13
|
-
return parts.filter((part) => part !== void 0 && part.trim() !== "").join("\n");
|
|
14
|
-
}
|
|
15
|
-
function referencePrompt(request) {
|
|
16
|
-
const { subject, identity } = request;
|
|
17
|
-
return lines([
|
|
18
|
-
request.artDirection,
|
|
19
|
-
`Create a canonical reference image of the ${subject.kind} ${subject.name}.`,
|
|
20
|
-
identity.description,
|
|
21
|
-
identity.tags.length === 0 ? void 0 : `Stable visual traits: ${identity.tags.join(", ")}.`,
|
|
22
|
-
"Show the subject clearly and neutrally. Do not add story events or temporary changes.",
|
|
23
|
-
identity.negativeTags.length === 0 ? void 0 : `Avoid: ${identity.negativeTags.join(", ")}.`
|
|
24
|
-
]);
|
|
25
|
-
}
|
|
26
|
-
/** What one subject must not look like may well be what another in the same picture does look like, so a trait that any subject has is not avoided. */
|
|
27
|
-
function avoidedIn(subjects) {
|
|
28
|
-
const wanted = new Set(subjects.flatMap((subject) => subject.identity.tags.map((tag) => tag.trim().toLowerCase())));
|
|
29
|
-
const avoided = [...new Set(subjects.flatMap((subject) => subject.identity.negativeTags))].filter((tag) => !wanted.has(tag.trim().toLowerCase()));
|
|
30
|
-
return avoided.length === 0 ? void 0 : `Avoid: ${avoided.join(", ")}.`;
|
|
31
|
-
}
|
|
32
|
-
function transientPrompt(request) {
|
|
33
|
-
return lines([
|
|
34
|
-
request.artDirection,
|
|
35
|
-
`Illustrate this established story moment: ${request.scene}`,
|
|
36
|
-
...request.subjects.map((subject) => lines([
|
|
37
|
-
`${subject.kind} ${subject.name}: ${subject.identity.description}`,
|
|
38
|
-
subject.identity.tags.length === 0 ? void 0 : `Stable visual traits: ${subject.identity.tags.join(", ")}.`,
|
|
39
|
-
subject.transient === "" ? void 0 : `Current visible state: ${subject.transient}`
|
|
40
|
-
])),
|
|
41
|
-
"Preserve every canonical identity. Depict only the stated subjects, state and action; do not invent story facts.",
|
|
42
|
-
avoidedIn(request.subjects)
|
|
43
|
-
]);
|
|
44
|
-
}
|
|
45
|
-
async function firstPng(service, prompt, options = {}) {
|
|
46
|
-
const result = await service.generate(prompt, {
|
|
47
|
-
count: 1,
|
|
48
|
-
...options
|
|
49
|
-
});
|
|
50
|
-
const image = result.images[0];
|
|
51
|
-
if (image === void 0) throw new Error(`${service.provider} returned no image`);
|
|
52
|
-
if (image.mediaType !== "image/png") throw new Error(`${service.provider} returned ${image.mediaType}; roleplay image storage currently requires PNG`);
|
|
53
|
-
return {
|
|
54
|
-
data: new Uint8Array(await image.data.arrayBuffer()),
|
|
55
|
-
model: result.model,
|
|
56
|
-
...image.revisedPrompt === void 0 ? {} : { revisedPrompt: image.revisedPrompt }
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
/** Generates the stable reference.png of one entity. It is intentionally not registered in the live roleplay loop yet. */
|
|
60
|
-
async function generateReferenceImage(service, request) {
|
|
61
|
-
const prompt = referencePrompt(request);
|
|
62
|
-
const image = await firstPng(service, prompt, request.signal === void 0 ? {} : { signal: request.signal });
|
|
63
|
-
request.signal?.throwIfAborted();
|
|
64
|
-
const path = referenceImagePath(request.root, request.subject);
|
|
65
|
-
const metadata = {
|
|
66
|
-
schema: "dsh-roleplay-image/v3",
|
|
67
|
-
purpose: "reference",
|
|
68
|
-
origin: "generated",
|
|
69
|
-
reusable: true,
|
|
70
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
71
|
-
prompt,
|
|
72
|
-
description: referenceDescription(request),
|
|
73
|
-
tags: unique([request.subject.name, ...request.identity.tags]),
|
|
74
|
-
...image.revisedPrompt === void 0 ? {} : { revisedPrompt: image.revisedPrompt },
|
|
75
|
-
provider: service.provider,
|
|
76
|
-
model: image.model,
|
|
77
|
-
subjects: [{
|
|
78
|
-
...request.subject,
|
|
79
|
-
identityVersion: request.identity.version
|
|
80
|
-
}]
|
|
81
|
-
};
|
|
82
|
-
await writeImage(path, image.data, metadata, { replace: true });
|
|
83
|
-
return path;
|
|
84
|
-
}
|
|
85
|
-
const PNG_SIGNATURE = [
|
|
86
|
-
137,
|
|
87
|
-
80,
|
|
88
|
-
78,
|
|
89
|
-
71,
|
|
90
|
-
13,
|
|
91
|
-
10,
|
|
92
|
-
26,
|
|
93
|
-
10
|
|
94
|
-
];
|
|
95
|
-
/** Takes a picture the person brought as the stable reference.png of one entity, replacing the one there. Only PNG is stored, so any other format is refused. */
|
|
96
|
-
async function uploadReferenceImage(request) {
|
|
97
|
-
if (request.png.length < PNG_SIGNATURE.length || PNG_SIGNATURE.some((byte, index) => request.png[index] !== byte)) throw new Error("the portrait must be a PNG picture: convert it first");
|
|
98
|
-
const path = referenceImagePath(request.root, request.subject);
|
|
99
|
-
const metadata = {
|
|
100
|
-
schema: "dsh-roleplay-image/v3",
|
|
101
|
-
purpose: "reference",
|
|
102
|
-
origin: "uploaded",
|
|
103
|
-
reusable: true,
|
|
104
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
105
|
-
description: `${request.subject.name}, a picture brought by the author.`,
|
|
106
|
-
tags: [request.subject.name],
|
|
107
|
-
...request.originalName === void 0 ? {} : { originalName: request.originalName },
|
|
108
|
-
subjects: [request.subject]
|
|
109
|
-
};
|
|
110
|
-
await writeImage(path, request.png, metadata, { replace: true });
|
|
111
|
-
return path;
|
|
112
|
-
}
|
|
113
|
-
/** Generates one immutable scene image for a timeline node. It is intentionally not registered in the live roleplay loop yet. */
|
|
114
|
-
async function generateTransientImage(service, request) {
|
|
115
|
-
if (request.subjects.length === 0) throw new Error("a transient image needs at least one subject");
|
|
116
|
-
const prompt = transientPrompt(request);
|
|
117
|
-
const image = await firstPng(service, prompt, {
|
|
118
|
-
...request.references === void 0 ? {} : { references: request.references },
|
|
119
|
-
...request.signal === void 0 ? {} : { signal: request.signal }
|
|
120
|
-
});
|
|
121
|
-
request.signal?.throwIfAborted();
|
|
122
|
-
const path = sceneImagePath(request.root, request.timelineNode, request.serial);
|
|
123
|
-
const metadata = {
|
|
124
|
-
schema: "dsh-roleplay-image/v3",
|
|
125
|
-
purpose: "transient",
|
|
126
|
-
origin: "generated",
|
|
127
|
-
reusable: request.reusable === true,
|
|
128
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
129
|
-
prompt,
|
|
130
|
-
description: transientDescription(request),
|
|
131
|
-
tags: unique(request.subjects.flatMap((subject) => [subject.name, ...subject.identity.tags])),
|
|
132
|
-
...image.revisedPrompt === void 0 ? {} : { revisedPrompt: image.revisedPrompt },
|
|
133
|
-
provider: service.provider,
|
|
134
|
-
model: image.model,
|
|
135
|
-
subjects: request.subjects.map(({ identity, transient: _transient, ...subject }) => ({
|
|
136
|
-
...subject,
|
|
137
|
-
identityVersion: identity.version
|
|
138
|
-
})),
|
|
139
|
-
source: {
|
|
140
|
-
turn: request.turn,
|
|
141
|
-
timelineNode: request.timelineNode,
|
|
142
|
-
...request.segment === void 0 ? {} : { segment: request.segment }
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
await writeImage(path, image.data, metadata);
|
|
146
|
-
return path;
|
|
147
|
-
}
|
|
148
|
-
export { uploadReferenceImage as a, transientPrompt as i, generateTransientImage as n, referencePrompt as r, generateReferenceImage as t };
|
|
149
|
-
|
|
150
|
-
//# sourceMappingURL=generator-CAJkevKl.js.map
|