@rslsp1/fa-app-tools 10.1.3 → 10.3.3
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/dist/StageEngine-O5I654LD.js +1243 -0
- package/dist/StageEngine-PYWITIIY.mjs +1243 -0
- package/dist/chunk-DDH2SGZM.js +311 -0
- package/dist/chunk-FTLEDU6C.js +157 -0
- package/dist/chunk-GKLCL2VQ.mjs +311 -0
- package/dist/chunk-QERFD7BY.js +1418 -0
- package/dist/{chunk-C5CGSPP3.mjs → chunk-RFTANBQ5.mjs} +80 -0
- package/dist/chunk-VSHSZEGV.js +26933 -0
- package/dist/{chunk-5SYVLULG.mjs → chunk-XLNA2BD6.mjs} +19108 -13258
- package/dist/{contracts-DdYOMBl9.d.mts → contracts-B3AbzYQ4.d.mts} +1 -1
- package/dist/{contracts-DdYOMBl9.d.ts → contracts-B3AbzYQ4.d.ts} +1 -1
- package/dist/{hfEventTypes-BUztJySs.d.mts → hfEventTypes-DQPjEP4T.d.mts} +12 -1
- package/dist/{hfEventTypes-fAdA-0A9.d.ts → hfEventTypes-DharkVsi.d.ts} +12 -1
- package/dist/index.d.mts +78 -6
- package/dist/index.d.ts +78 -6
- package/dist/index.js +1880 -22319
- package/dist/index.mjs +582 -401
- package/dist/{storeContract-CJi0fpCA.d.mts → storeContract-C-em5E61.d.ts} +140 -14
- package/dist/{storeContract-gc2dxews.d.ts → storeContract-Cc8tFavd.d.mts} +140 -14
- package/dist/szenen-contract.d.mts +2 -2
- package/dist/szenen-contract.d.ts +2 -2
- package/dist/szenen-contract.js +12 -1474
- package/dist/szenen-contract.mjs +1 -1
- package/dist/szenen.d.mts +1251 -566
- package/dist/szenen.d.ts +1251 -566
- package/dist/szenen.js +1373 -23637
- package/dist/szenen.mjs +141 -128
- package/package.json +4 -2
package/dist/szenen.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ALL_PUBLISH_RULES,
|
|
3
|
+
CAMERA_PREVIEW_ASSET_ROLE,
|
|
3
4
|
CATALOGUE_TYPES,
|
|
4
5
|
CHAIN_EDGES,
|
|
5
6
|
CHAIN_LINK_FIELDS,
|
|
@@ -16,17 +17,22 @@ import {
|
|
|
16
17
|
MANUAL_PROVIDER,
|
|
17
18
|
MANUAL_VISIBILITY_BASIS,
|
|
18
19
|
MAX_PROPOSAL_TITLE_LENGTH,
|
|
20
|
+
MCP_CLIENT_PROVIDER,
|
|
21
|
+
NODE_TYPES,
|
|
19
22
|
PAUSE_SEKUNDEN_OPTIONEN,
|
|
20
23
|
PAUSE_SEKUNDEN_VORGABE,
|
|
21
24
|
PROBE_VERSION_ID,
|
|
22
25
|
PROMPT_AUSZUG_ZEICHEN,
|
|
23
26
|
PROMPT_RULE_EFFECT,
|
|
24
27
|
PROMPT_RUN_DETAIL_FIELDS,
|
|
28
|
+
PROXY_PRIMITIVES,
|
|
25
29
|
REFERENCE_FIELD,
|
|
26
30
|
RULES_WITHOUT_CAPABILITY_EFFECT,
|
|
27
31
|
RULE_SCOPES,
|
|
28
32
|
ResolveTechnicalError,
|
|
29
33
|
SIMULATION_PROVIDER,
|
|
34
|
+
STAGE_MIGRATION_EVENT,
|
|
35
|
+
STAGE_MIGRATION_ID,
|
|
30
36
|
SZENEN_ELEMENT_TYPES,
|
|
31
37
|
SZENEN_EVENT_PREFIX,
|
|
32
38
|
SZENEN_EVENT_TYPES,
|
|
@@ -37,18 +43,23 @@ import {
|
|
|
37
43
|
SZENEN_SNAPSHOT_SCHEMA_VERSION,
|
|
38
44
|
SzenenView,
|
|
39
45
|
UNCHECKED_PUBLISH_RULES,
|
|
46
|
+
UNVERIFIED_MODEL_ID,
|
|
40
47
|
UPLOAD_MAX_BYTES,
|
|
41
48
|
UnsupportedSchemaError,
|
|
42
49
|
acceptProposalTitle,
|
|
43
50
|
annotateElementsFromEvents,
|
|
44
51
|
annotateRunsFromEvents,
|
|
52
|
+
annotatedElementsPageOver,
|
|
53
|
+
applyStageOperations,
|
|
45
54
|
areaForFokus,
|
|
46
55
|
areasFor,
|
|
47
56
|
assessDerivationResponse,
|
|
48
57
|
batchesForPromptRun,
|
|
49
58
|
bildPfad,
|
|
50
59
|
bilderDesLaufs,
|
|
60
|
+
buildCameraPreviewContext,
|
|
51
61
|
buildManualPromptRunRecord,
|
|
62
|
+
buildPromptRunVariantRecord,
|
|
52
63
|
buildSystemInstruction,
|
|
53
64
|
buildSystemInstruction2,
|
|
54
65
|
buildSzenenSnapshot,
|
|
@@ -78,17 +89,21 @@ import {
|
|
|
78
89
|
checkSetPreferredHeadInput,
|
|
79
90
|
checkSzenenBatchOrigin,
|
|
80
91
|
checkTitle,
|
|
92
|
+
checkVariantBlock,
|
|
93
|
+
checkVariantInputAssets,
|
|
81
94
|
checkWriteDraftInput,
|
|
82
95
|
claimWon,
|
|
83
96
|
collectImageBatches,
|
|
84
97
|
collectImageGenerationOrders,
|
|
85
98
|
collectImageJobs,
|
|
99
|
+
collectPromptOperations,
|
|
86
100
|
collectPromptRunTags,
|
|
87
101
|
collectPromptRuns,
|
|
88
102
|
collectSceneDerivationRecoveries,
|
|
89
103
|
collectSceneDerivations,
|
|
90
104
|
collectVersionRefs,
|
|
91
105
|
compileSchemas,
|
|
106
|
+
completePromptOperation,
|
|
92
107
|
contextOfRun,
|
|
93
108
|
createClientDerivationPort,
|
|
94
109
|
createClientRunPort,
|
|
@@ -118,14 +133,18 @@ import {
|
|
|
118
133
|
diagnosticOfFinding,
|
|
119
134
|
diagnosticOfSchemaError,
|
|
120
135
|
draftRevisionOf,
|
|
136
|
+
effectivePromptVocabulary,
|
|
137
|
+
elementsByActivity,
|
|
121
138
|
executableImageModels,
|
|
122
139
|
findExecutableImageModel,
|
|
123
140
|
findImageBatch,
|
|
124
141
|
findImageGenerationOrder,
|
|
125
142
|
findImageJob,
|
|
143
|
+
findPromptOperation,
|
|
126
144
|
findPromptRun,
|
|
127
145
|
findSceneDerivation,
|
|
128
146
|
findSceneDerivationRecovery,
|
|
147
|
+
findStageDraftChain,
|
|
129
148
|
firstError,
|
|
130
149
|
formatSchemaErrors,
|
|
131
150
|
formatSeedListe,
|
|
@@ -167,6 +186,7 @@ import {
|
|
|
167
186
|
mitDefaultVorlage,
|
|
168
187
|
namingElementOf,
|
|
169
188
|
noticeFor,
|
|
189
|
+
openStageDraftChain,
|
|
170
190
|
ordersForPromptRun,
|
|
171
191
|
ordneSeedsZu,
|
|
172
192
|
pageOf,
|
|
@@ -176,30 +196,42 @@ import {
|
|
|
176
196
|
parseRunResponse,
|
|
177
197
|
parseSeedListe,
|
|
178
198
|
parseSzenenSnapshot,
|
|
199
|
+
pinPreviewColors,
|
|
179
200
|
preferredHeadRevisionOf,
|
|
201
|
+
preparePromptDerivation,
|
|
202
|
+
preparePromptOperation,
|
|
203
|
+
prepareStageMigration,
|
|
204
|
+
previewColorNodes,
|
|
180
205
|
promptDiagnosticsOf,
|
|
181
206
|
promptRunPageForTransport,
|
|
182
207
|
promptRunPageFromTransport,
|
|
183
208
|
promptRunTagsOf,
|
|
209
|
+
promptTagGroup,
|
|
184
210
|
publishedHeadsOf,
|
|
185
211
|
recoveriesForRun,
|
|
186
212
|
recoveryStatusOf,
|
|
187
213
|
reduceElementEvents,
|
|
188
214
|
resolveArea,
|
|
189
215
|
resolveGeneralScenePolicies,
|
|
216
|
+
resolvePromptConstructionTags,
|
|
190
217
|
resolveScenePayload,
|
|
191
218
|
resolveShot,
|
|
192
219
|
resolveShotPayload,
|
|
193
220
|
resolveTargetModelOver,
|
|
194
221
|
resolverFromQueries,
|
|
222
|
+
responseContractOf,
|
|
195
223
|
roundOfRun,
|
|
196
224
|
roundsOf,
|
|
197
225
|
rulesWithoutPromptEffect,
|
|
226
|
+
runOfOperation,
|
|
198
227
|
runPromptDerivation,
|
|
199
228
|
runPublishChecks,
|
|
200
229
|
runSceneDerivation,
|
|
230
|
+
sameResponseAs,
|
|
231
|
+
sameVariantRequest,
|
|
201
232
|
sceneOnlyCapabilities,
|
|
202
233
|
scenePolicyFingerprint,
|
|
234
|
+
sceneVersionElementsOf,
|
|
203
235
|
scopeOfPath,
|
|
204
236
|
seedFehlerText,
|
|
205
237
|
selectImageJobs,
|
|
@@ -210,6 +242,7 @@ import {
|
|
|
210
242
|
simulatedAnswerFor,
|
|
211
243
|
sortScenePolicies,
|
|
212
244
|
sourceOf,
|
|
245
|
+
supportsCompositionReference,
|
|
213
246
|
szenenSnapshotFilename,
|
|
214
247
|
tagRefsAus,
|
|
215
248
|
typAusBytes,
|
|
@@ -219,21 +252,39 @@ import {
|
|
|
219
252
|
validateDerivationInput,
|
|
220
253
|
validateElementVersion,
|
|
221
254
|
validatePayload,
|
|
255
|
+
variantOf,
|
|
222
256
|
withReference
|
|
223
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-XLNA2BD6.mjs";
|
|
224
258
|
import {
|
|
225
259
|
ContractViolation,
|
|
226
260
|
STYLE_PAYLOAD,
|
|
227
261
|
STYLE_PAYLOAD_V2,
|
|
228
262
|
elementStoreContractChecks,
|
|
229
263
|
runElementStoreContract
|
|
230
|
-
} from "./chunk-
|
|
264
|
+
} from "./chunk-RFTANBQ5.mjs";
|
|
231
265
|
import {
|
|
232
266
|
VersionDagError,
|
|
233
267
|
buildVersionDag,
|
|
234
268
|
preferredVersionId,
|
|
235
269
|
resolvePreferredHead
|
|
236
270
|
} from "./chunk-FUY2OCVC.mjs";
|
|
271
|
+
import {
|
|
272
|
+
CAMERA_ASPECT_RATIOS,
|
|
273
|
+
PREVIEW_COLOR_MIN_DISTANCE,
|
|
274
|
+
STAGE_CATALOGUE,
|
|
275
|
+
cameraAspectRatioValue,
|
|
276
|
+
cameraPerspective,
|
|
277
|
+
checkCameraAspectRatioChanges,
|
|
278
|
+
dragPosition,
|
|
279
|
+
frozenCameraAspectRatio,
|
|
280
|
+
normalizePreviewColor,
|
|
281
|
+
previewColorConflicts,
|
|
282
|
+
previewColorDistance,
|
|
283
|
+
previewColorLegibility,
|
|
284
|
+
stageColors,
|
|
285
|
+
stageFrame,
|
|
286
|
+
stageNode
|
|
287
|
+
} from "./chunk-GKLCL2VQ.mjs";
|
|
237
288
|
|
|
238
289
|
// src/lib/szenen/providerCheckStore.ts
|
|
239
290
|
function collectProviderChecks(events) {
|
|
@@ -552,7 +603,8 @@ function simulierteRekonstruktion(input, runId) {
|
|
|
552
603
|
}
|
|
553
604
|
function createMemoryViewPort(options = {}) {
|
|
554
605
|
const ids = options.ids ?? defaultIds;
|
|
555
|
-
const
|
|
606
|
+
const elementChannel = createInMemoryEventChannel();
|
|
607
|
+
const elements = createHfElementStore({ channel: elementChannel });
|
|
556
608
|
const laeufe = [...options.runs ?? []];
|
|
557
609
|
const laufTags = new Map(
|
|
558
610
|
Object.entries(options.runTags ?? {}).map(
|
|
@@ -629,6 +681,7 @@ function createMemoryViewPort(options = {}) {
|
|
|
629
681
|
);
|
|
630
682
|
const lauf = {
|
|
631
683
|
...basis,
|
|
684
|
+
input_payload: { ...basis.input_payload, scene: { ...basis.input_payload.scene, element_id: input.sceneElementId, version_id: "" } },
|
|
632
685
|
shot_version_id: "",
|
|
633
686
|
shot_element_id: "",
|
|
634
687
|
scene_setup_version_id: "",
|
|
@@ -664,7 +717,7 @@ function createMemoryViewPort(options = {}) {
|
|
|
664
717
|
version_id: null
|
|
665
718
|
},
|
|
666
719
|
input: {
|
|
667
|
-
scene: { nodes: [] }
|
|
720
|
+
scene: { element_id: input.sceneElementId, version_id: "", nodes: [] }
|
|
668
721
|
},
|
|
669
722
|
promptText: input.promptText,
|
|
670
723
|
note: input.note ?? null,
|
|
@@ -707,6 +760,7 @@ function createMemoryViewPort(options = {}) {
|
|
|
707
760
|
try {
|
|
708
761
|
return ok(pagePromptRuns(laeufe, {
|
|
709
762
|
...input,
|
|
763
|
+
sceneVersionElements: sceneVersionElementsOf(reduceElementEvents(await elementChannel.readEvents())),
|
|
710
764
|
tags: input.tags ?? laufTags,
|
|
711
765
|
...annotationen.size > 0 && !input.annotations ? { annotations: annotationen } : {}
|
|
712
766
|
}));
|
|
@@ -773,6 +827,16 @@ function createMemoryViewPort(options = {}) {
|
|
|
773
827
|
return done({ removed: rest.length !== vorhanden.length });
|
|
774
828
|
}
|
|
775
829
|
};
|
|
830
|
+
const assetVorschauen = options.assetPreviews;
|
|
831
|
+
if (assetVorschauen) {
|
|
832
|
+
mediaPort.loadAssetPreview = async (assetId) => {
|
|
833
|
+
const quelle = assetVorschauen[assetId];
|
|
834
|
+
if (quelle === void 0) {
|
|
835
|
+
return { kind: "error", message: `Medien-Asset ${assetId} ist unbekannt.`, retryable: false };
|
|
836
|
+
}
|
|
837
|
+
return ok(quelle);
|
|
838
|
+
};
|
|
839
|
+
}
|
|
776
840
|
const rekonstruktionen = [];
|
|
777
841
|
const fassungen = [];
|
|
778
842
|
const uebernommen = /* @__PURE__ */ new Map();
|
|
@@ -1120,14 +1184,25 @@ function createMemoryViewPort(options = {}) {
|
|
|
1120
1184
|
const elementeMitAnnotationen = options.elementAnnotations ? {
|
|
1121
1185
|
...elements,
|
|
1122
1186
|
async listElementsPage(filter, page) {
|
|
1123
|
-
const
|
|
1124
|
-
|
|
1187
|
+
const vorbelegt = options.elementAnnotations;
|
|
1188
|
+
const alle = await elements.listElements(filter);
|
|
1189
|
+
if (alle.kind !== "ok") return alle;
|
|
1190
|
+
let seite;
|
|
1191
|
+
try {
|
|
1192
|
+
seite = pageOf(
|
|
1193
|
+
elementsByActivity(alle.value, (e) => vorbelegt[e.element_id]?.lastActivityAt ?? null),
|
|
1194
|
+
(e) => e.element_id,
|
|
1195
|
+
page ?? null
|
|
1196
|
+
);
|
|
1197
|
+
} catch (error) {
|
|
1198
|
+
return { kind: "error", message: error.message, retryable: false };
|
|
1199
|
+
}
|
|
1125
1200
|
const annotations = {};
|
|
1126
|
-
for (const element of seite.
|
|
1127
|
-
const annotation =
|
|
1201
|
+
for (const element of seite.items) {
|
|
1202
|
+
const annotation = vorbelegt[element.element_id];
|
|
1128
1203
|
if (annotation) annotations[element.element_id] = annotation;
|
|
1129
1204
|
}
|
|
1130
|
-
return ok({ ...seite
|
|
1205
|
+
return ok({ ...seite, annotations });
|
|
1131
1206
|
}
|
|
1132
1207
|
} : elements;
|
|
1133
1208
|
const port = {
|
|
@@ -1488,10 +1563,23 @@ function checkPromptRunRecord(candidate) {
|
|
|
1488
1563
|
}
|
|
1489
1564
|
const handeingabe = pruefeHandeingabe(record);
|
|
1490
1565
|
if (!handeingabe.ok) return handeingabe;
|
|
1566
|
+
const variante = checkVariantBlock(record);
|
|
1567
|
+
if (!variante.ok) return variante;
|
|
1491
1568
|
const eingabe = record.input_payload;
|
|
1492
1569
|
if (eingabe === null || typeof eingabe !== "object") {
|
|
1493
1570
|
return { ok: false, message: '"input_payload" fehlt \u2014 ohne sie ist der Lauf nicht pruefbar.' };
|
|
1494
1571
|
}
|
|
1572
|
+
if (record.camera_preview !== void 0) {
|
|
1573
|
+
const preview = record.camera_preview;
|
|
1574
|
+
const camera = eingabe.camera;
|
|
1575
|
+
if (!preview || preview.mime_type !== "image/png" || !/^[a-f0-9]{64}$/.test(preview.sha256) || !Number.isInteger(preview.width) || !Number.isInteger(preview.height) || preview.width <= 0 || preview.height <= 0 || preview.width > 2048 || preview.height > 2048 || !camera?.aspect_ratio || preview.camera_id !== camera.camera_id) {
|
|
1576
|
+
return { ok: false, message: "Das Kamera-Preview hat keinen g\xFCltigen Bezug zum eingefrorenen Kamerastand." };
|
|
1577
|
+
}
|
|
1578
|
+
const [width, height] = camera.aspect_ratio.split(":").map(Number);
|
|
1579
|
+
if (!Number.isFinite(width / height) || Math.abs(preview.width / preview.height - width / height) > 1e-9) {
|
|
1580
|
+
return { ok: false, message: "Preview-Abmessungen und eingefrorenes Kameraformat widersprechen sich." };
|
|
1581
|
+
}
|
|
1582
|
+
}
|
|
1495
1583
|
if (record.status === "failed") {
|
|
1496
1584
|
if (record.output !== null && record.output !== void 0) {
|
|
1497
1585
|
return {
|
|
@@ -1844,123 +1932,10 @@ function checkSceneDerivationRecoveryRecord(candidate) {
|
|
|
1844
1932
|
}
|
|
1845
1933
|
return { ok: true };
|
|
1846
1934
|
}
|
|
1847
|
-
|
|
1848
|
-
// src/lib/szenen/scenePromptOperation.ts
|
|
1849
|
-
var MCP_CLIENT_PROVIDER = "mcp_client";
|
|
1850
|
-
var UNVERIFIED_MODEL_ID = "mcp-client-unspecified";
|
|
1851
|
-
var istText2 = (wert) => typeof wert === "string" && wert.trim().length > 0;
|
|
1852
|
-
function collectPromptOperations(events) {
|
|
1853
|
-
const nachId = /* @__PURE__ */ new Map();
|
|
1854
|
-
for (const event of events) {
|
|
1855
|
-
if (event.type !== SZENEN_EVENT_TYPES.promptOperationPrepared) continue;
|
|
1856
|
-
const payload = event.payload;
|
|
1857
|
-
if (!payload || !istText2(payload.operation_id)) continue;
|
|
1858
|
-
if (nachId.has(payload.operation_id)) continue;
|
|
1859
|
-
nachId.set(payload.operation_id, payload);
|
|
1860
|
-
}
|
|
1861
|
-
return [...nachId.values()];
|
|
1862
|
-
}
|
|
1863
|
-
function findPromptOperation(events, operationId) {
|
|
1864
|
-
return collectPromptOperations(events).find((v) => v.operation_id === operationId) ?? null;
|
|
1865
|
-
}
|
|
1866
|
-
async function preparePromptOperation(input) {
|
|
1867
|
-
const now = input.now ?? (() => /* @__PURE__ */ new Date());
|
|
1868
|
-
const eingefroren = await freezeSceneWorkingState({
|
|
1869
|
-
sceneElementId: input.sceneElementId,
|
|
1870
|
-
store: input.store,
|
|
1871
|
-
resolver: input.resolver,
|
|
1872
|
-
contextChain: input.contextChain,
|
|
1873
|
-
userInstruction: input.userInstruction ?? null,
|
|
1874
|
-
targetModelElementId: input.targetModelElementId ?? null
|
|
1875
|
-
});
|
|
1876
|
-
if (eingefroren.kind !== "ok") return eingefroren;
|
|
1877
|
-
const rendererInput = eingefroren.input;
|
|
1878
|
-
return {
|
|
1879
|
-
kind: "ok",
|
|
1880
|
-
operation: {
|
|
1881
|
-
operation_id: input.operationId,
|
|
1882
|
-
scene: eingefroren.scene,
|
|
1883
|
-
context_id: input.contextId,
|
|
1884
|
-
user_instruction: input.userInstruction ?? null,
|
|
1885
|
-
renderer_input: rendererInput,
|
|
1886
|
-
renderer_instruction: buildSystemInstruction2(rendererInput),
|
|
1887
|
-
renderer_payload: buildUserPrompt2(rendererInput),
|
|
1888
|
-
response_contract: responseContractOf(rendererInput),
|
|
1889
|
-
prepared_by: input.preparedBy,
|
|
1890
|
-
created_at: now().toISOString()
|
|
1891
|
-
}
|
|
1892
|
-
};
|
|
1893
|
-
}
|
|
1894
|
-
function responseContractOf(input) {
|
|
1895
|
-
const model = input.target_model ?? {};
|
|
1896
|
-
return {
|
|
1897
|
-
format: "json",
|
|
1898
|
-
required_fields: ["positive", "negative", "feedback", "visibility", "notes"],
|
|
1899
|
-
negative_prompt_allowed: model.supports_negative_prompt === true,
|
|
1900
|
-
node_ids: input.scene.nodes.map((node) => node.node_id),
|
|
1901
|
-
prompt_language: typeof model.prompt_language === "string" ? model.prompt_language : "en"
|
|
1902
|
-
};
|
|
1903
|
-
}
|
|
1904
|
-
function completePromptOperation(input) {
|
|
1905
|
-
const now = input.now ?? (() => /* @__PURE__ */ new Date());
|
|
1906
|
-
const { operation } = input;
|
|
1907
|
-
const geparst = parseRunResponse(input.response);
|
|
1908
|
-
if (!geparst.ok) {
|
|
1909
|
-
return {
|
|
1910
|
-
kind: "rejected",
|
|
1911
|
-
message: `Die Antwort zu Vorgang ${operation.operation_id} ist nicht verwertbar: ${geparst.message}`
|
|
1912
|
-
};
|
|
1913
|
-
}
|
|
1914
|
-
const geprueft = checkRunResponse(geparst.value, operation.renderer_input);
|
|
1915
|
-
if (!geprueft.ok) {
|
|
1916
|
-
return {
|
|
1917
|
-
kind: "rejected",
|
|
1918
|
-
message: `Die Antwort zu Vorgang ${operation.operation_id} passt nicht zur eingefrorenen Eingabe: ${geprueft.message}`
|
|
1919
|
-
};
|
|
1920
|
-
}
|
|
1921
|
-
const origin = {
|
|
1922
|
-
host: "mcp",
|
|
1923
|
-
...istText2(input.declaredModelId) ? { declared_model_id: input.declaredModelId } : {},
|
|
1924
|
-
renderer_instruction_was_system_prompt: false
|
|
1925
|
-
};
|
|
1926
|
-
return {
|
|
1927
|
-
kind: "ok",
|
|
1928
|
-
record: {
|
|
1929
|
-
run_id: input.runId,
|
|
1930
|
-
// Keine fingierten Kennungen (D-98/D-75) — genau wie beim
|
|
1931
|
-
// Szene-Direktlauf des bestehenden Pfads.
|
|
1932
|
-
shot_version_id: "",
|
|
1933
|
-
shot_element_id: "",
|
|
1934
|
-
scene_setup_version_id: "",
|
|
1935
|
-
camera_id: "",
|
|
1936
|
-
target_model_version_id: operation.renderer_input.target_model_resolution?.version_id ?? "",
|
|
1937
|
-
provider: MCP_CLIENT_PROVIDER,
|
|
1938
|
-
model_id: UNVERIFIED_MODEL_ID,
|
|
1939
|
-
// Die Renderer-Anweisung, wie sie der Vorgang eingefroren hat — nicht
|
|
1940
|
-
// eine zweite, jetzt neu gebaute Fassung.
|
|
1941
|
-
system_prompt: operation.renderer_instruction,
|
|
1942
|
-
input_payload: operation.renderer_input,
|
|
1943
|
-
status: "succeeded",
|
|
1944
|
-
failure: null,
|
|
1945
|
-
output: geprueft.output,
|
|
1946
|
-
raw_output: input.response,
|
|
1947
|
-
source: { kind: "scene_direct", scene: operation.scene },
|
|
1948
|
-
operation_id: operation.operation_id,
|
|
1949
|
-
execution_origin: origin,
|
|
1950
|
-
created_at: now().toISOString()
|
|
1951
|
-
}
|
|
1952
|
-
};
|
|
1953
|
-
}
|
|
1954
|
-
function runOfOperation(runs, operationId) {
|
|
1955
|
-
return runs.find(
|
|
1956
|
-
(run) => run.operation_id === operationId
|
|
1957
|
-
) ?? null;
|
|
1958
|
-
}
|
|
1959
|
-
function sameResponseAs(run, response) {
|
|
1960
|
-
return (run.raw_output ?? "") === response;
|
|
1961
|
-
}
|
|
1962
1935
|
export {
|
|
1963
1936
|
ALL_PUBLISH_RULES,
|
|
1937
|
+
CAMERA_ASPECT_RATIOS,
|
|
1938
|
+
CAMERA_PREVIEW_ASSET_ROLE,
|
|
1964
1939
|
CATALOGUE_TYPES,
|
|
1965
1940
|
CHAIN_EDGES,
|
|
1966
1941
|
CHAIN_LINK_FIELDS,
|
|
@@ -1978,17 +1953,23 @@ export {
|
|
|
1978
1953
|
MANUAL_PROVIDER,
|
|
1979
1954
|
MANUAL_VISIBILITY_BASIS,
|
|
1980
1955
|
MCP_CLIENT_PROVIDER,
|
|
1956
|
+
NODE_TYPES,
|
|
1981
1957
|
PAUSE_SEKUNDEN_OPTIONEN,
|
|
1982
1958
|
PAUSE_SEKUNDEN_VORGABE,
|
|
1959
|
+
PREVIEW_COLOR_MIN_DISTANCE,
|
|
1983
1960
|
PROBE_VERSION_ID,
|
|
1984
1961
|
PROMPT_AUSZUG_ZEICHEN,
|
|
1985
1962
|
PROMPT_RULE_EFFECT,
|
|
1986
1963
|
PROMPT_RUN_DETAIL_FIELDS,
|
|
1964
|
+
PROXY_PRIMITIVES,
|
|
1987
1965
|
REFERENCE_FIELD,
|
|
1988
1966
|
RULES_WITHOUT_CAPABILITY_EFFECT,
|
|
1989
1967
|
RULE_SCOPES,
|
|
1990
1968
|
ResolveTechnicalError,
|
|
1991
1969
|
SIMULATION_PROVIDER,
|
|
1970
|
+
STAGE_CATALOGUE,
|
|
1971
|
+
STAGE_MIGRATION_EVENT,
|
|
1972
|
+
STAGE_MIGRATION_ID,
|
|
1992
1973
|
STYLE_PAYLOAD,
|
|
1993
1974
|
STYLE_PAYLOAD_V2,
|
|
1994
1975
|
SZENEN_ELEMENT_TYPES,
|
|
@@ -2007,24 +1988,31 @@ export {
|
|
|
2007
1988
|
VersionDagError,
|
|
2008
1989
|
annotateElementsFromEvents,
|
|
2009
1990
|
annotateRunsFromEvents,
|
|
1991
|
+
annotatedElementsPageOver,
|
|
1992
|
+
applyStageOperations,
|
|
2010
1993
|
areaForFokus,
|
|
2011
1994
|
areasFor,
|
|
2012
1995
|
assessDerivationResponse,
|
|
2013
1996
|
batchesForPromptRun,
|
|
2014
1997
|
bildPfad,
|
|
2015
1998
|
bilderDesLaufs,
|
|
2016
|
-
|
|
2017
|
-
|
|
1999
|
+
buildCameraPreviewContext,
|
|
2000
|
+
buildSystemInstruction2 as buildDerivationSystemInstruction,
|
|
2001
|
+
buildUserPrompt2 as buildDerivationUserPrompt,
|
|
2018
2002
|
buildManualPromptRunRecord,
|
|
2019
|
-
|
|
2003
|
+
buildPromptRunVariantRecord,
|
|
2004
|
+
buildSystemInstruction,
|
|
2020
2005
|
buildSzenenSnapshot,
|
|
2021
|
-
|
|
2006
|
+
buildUserPrompt,
|
|
2022
2007
|
buildVersionDag,
|
|
2023
2008
|
callOptional,
|
|
2009
|
+
cameraAspectRatioValue,
|
|
2010
|
+
cameraPerspective,
|
|
2024
2011
|
capabilitiesOf,
|
|
2025
2012
|
capabilityGate,
|
|
2026
2013
|
capabilityReport,
|
|
2027
2014
|
catalogueFor,
|
|
2015
|
+
checkCameraAspectRatioChanges,
|
|
2028
2016
|
checkChainTargets,
|
|
2029
2017
|
checkCreateElementInput,
|
|
2030
2018
|
checkDerivationResponse,
|
|
@@ -2047,6 +2035,8 @@ export {
|
|
|
2047
2035
|
checkSetPreferredHeadInput,
|
|
2048
2036
|
checkSzenenBatchOrigin,
|
|
2049
2037
|
checkTitle,
|
|
2038
|
+
checkVariantBlock,
|
|
2039
|
+
checkVariantInputAssets,
|
|
2050
2040
|
checkWriteDraftInput,
|
|
2051
2041
|
claimWon,
|
|
2052
2042
|
collectImageBatches,
|
|
@@ -2094,7 +2084,10 @@ export {
|
|
|
2094
2084
|
diagnosticOfSchemaError,
|
|
2095
2085
|
differentialSteps,
|
|
2096
2086
|
draftRevisionOf,
|
|
2087
|
+
dragPosition,
|
|
2088
|
+
effectivePromptVocabulary,
|
|
2097
2089
|
elementStoreContractChecks,
|
|
2090
|
+
elementsByActivity,
|
|
2098
2091
|
executableImageModels,
|
|
2099
2092
|
findExecutableImageModel,
|
|
2100
2093
|
findImageBatch,
|
|
@@ -2105,11 +2098,13 @@ export {
|
|
|
2105
2098
|
findProviderCheck,
|
|
2106
2099
|
findSceneDerivation,
|
|
2107
2100
|
findSceneDerivationRecovery,
|
|
2101
|
+
findStageDraftChain,
|
|
2108
2102
|
firstError,
|
|
2109
2103
|
formatSchemaErrors,
|
|
2110
2104
|
formatSeedListe,
|
|
2111
2105
|
freezeDraftChain,
|
|
2112
2106
|
freezeSceneWorkingState,
|
|
2107
|
+
frozenCameraAspectRatio,
|
|
2113
2108
|
fuehreQueueAus,
|
|
2114
2109
|
generationBatchIdOf,
|
|
2115
2110
|
gesamtHerkunft,
|
|
@@ -2145,7 +2140,9 @@ export {
|
|
|
2145
2140
|
mimeTypAus,
|
|
2146
2141
|
mitDefaultVorlage,
|
|
2147
2142
|
namingElementOf,
|
|
2143
|
+
normalizePreviewColor,
|
|
2148
2144
|
noticeFor,
|
|
2145
|
+
openStageDraftChain,
|
|
2149
2146
|
ordersForPromptRun,
|
|
2150
2147
|
ordneSeedsZu,
|
|
2151
2148
|
pageOf,
|
|
@@ -2155,13 +2152,21 @@ export {
|
|
|
2155
2152
|
parseRunResponse,
|
|
2156
2153
|
parseSeedListe,
|
|
2157
2154
|
parseSzenenSnapshot,
|
|
2155
|
+
pinPreviewColors,
|
|
2158
2156
|
preferredHeadRevisionOf,
|
|
2159
2157
|
preferredVersionId,
|
|
2158
|
+
preparePromptDerivation,
|
|
2160
2159
|
preparePromptOperation,
|
|
2160
|
+
prepareStageMigration,
|
|
2161
|
+
previewColorConflicts,
|
|
2162
|
+
previewColorDistance,
|
|
2163
|
+
previewColorLegibility,
|
|
2164
|
+
previewColorNodes,
|
|
2161
2165
|
promptDiagnosticsOf,
|
|
2162
2166
|
promptRunPageForTransport,
|
|
2163
2167
|
promptRunPageFromTransport,
|
|
2164
2168
|
promptRunTagsOf,
|
|
2169
|
+
promptTagGroup,
|
|
2165
2170
|
publishedHeadsOf,
|
|
2166
2171
|
recoveriesForRun,
|
|
2167
2172
|
recoveryStatusOf,
|
|
@@ -2169,6 +2174,7 @@ export {
|
|
|
2169
2174
|
resolveArea,
|
|
2170
2175
|
resolveGeneralScenePolicies,
|
|
2171
2176
|
resolvePreferredHead,
|
|
2177
|
+
resolvePromptConstructionTags,
|
|
2172
2178
|
resolveScenePayload,
|
|
2173
2179
|
resolveShot,
|
|
2174
2180
|
resolveShotPayload,
|
|
@@ -2185,8 +2191,10 @@ export {
|
|
|
2185
2191
|
runSceneDerivation,
|
|
2186
2192
|
runStoreDifferential,
|
|
2187
2193
|
sameResponseAs,
|
|
2194
|
+
sameVariantRequest,
|
|
2188
2195
|
sceneOnlyCapabilities,
|
|
2189
2196
|
scenePolicyFingerprint,
|
|
2197
|
+
sceneVersionElementsOf,
|
|
2190
2198
|
scopeOfPath,
|
|
2191
2199
|
seedFehlerText,
|
|
2192
2200
|
selectImageJobs,
|
|
@@ -2197,6 +2205,10 @@ export {
|
|
|
2197
2205
|
simulatedAnswerFor,
|
|
2198
2206
|
sortScenePolicies,
|
|
2199
2207
|
sourceOf,
|
|
2208
|
+
stageColors,
|
|
2209
|
+
stageFrame,
|
|
2210
|
+
stageNode,
|
|
2211
|
+
supportsCompositionReference,
|
|
2200
2212
|
szenenSnapshotFilename,
|
|
2201
2213
|
tagRefsAus,
|
|
2202
2214
|
totalModelCalls,
|
|
@@ -2207,5 +2219,6 @@ export {
|
|
|
2207
2219
|
validateDerivationInput,
|
|
2208
2220
|
validateElementVersion,
|
|
2209
2221
|
validatePayload,
|
|
2222
|
+
variantOf,
|
|
2210
2223
|
withReference
|
|
2211
2224
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rslsp1/fa-app-tools",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.3.3",
|
|
4
4
|
"description": "Shared tools and hooks for Fine Art flow apps",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -33,11 +33,12 @@
|
|
|
33
33
|
"mutation:runintegrity": "stryker run stryker.runintegrity.conf.mjs"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"react": "
|
|
36
|
+
"react": "^18.2.0 || ^19.0.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@huggingface/hub": "^2.13.0",
|
|
40
40
|
"jszip": "^3.10.1",
|
|
41
|
+
"three": "^0.186.1",
|
|
41
42
|
"zustand": "^5.0.14"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"@testing-library/dom": "^10.4.1",
|
|
47
48
|
"@testing-library/react": "^16.3.2",
|
|
48
49
|
"@types/react": "^19.0.0",
|
|
50
|
+
"@types/three": "^0.186.0",
|
|
49
51
|
"@vitest/coverage-v8": "2.1.9",
|
|
50
52
|
"@xyflow/react": "^12.10.2",
|
|
51
53
|
"jsdom": "^29.1.1",
|