@rslsp1/fa-app-tools 3.0.0 → 5.0.0
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/{chunk-TCJ3CMCK.mjs → chunk-TW4IDHAN.mjs} +1660 -604
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1699 -693
- package/dist/index.mjs +9 -8
- package/dist/szenen.d.mts +501 -23
- package/dist/szenen.d.ts +501 -23
- package/dist/szenen.js +1905 -734
- package/dist/szenen.mjs +169 -29
- package/package.json +1 -1
package/dist/szenen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Z as PublishFinding, ac as SchemaError, Y as PublishCheckResult, aj as SzenenElementType, a2 as ReferenceResolver, ap as TargetModelResolution, I as ElementSnapshot, w as DerivationInputMode, M as ImageProvenance, s as DerivationFailure, n as DerivableType, N as NotDerivable, p as DerivationConflict, u as DerivationFollowUp, B as DraftChainMeta, q as DerivationDiagnostic, o as DerivationAssessment, h as ContextChainPort, a as AuthoritativeSzenenStore, ai as SzenenElementStore, v as DerivationImage, al as SzenenQueries, ah as SzenenCommands, ar as UnusableProposal } from './storeContract-DNggXiZl.js';
|
|
2
2
|
export { A as ALL_PUBLISH_RULES, C as CHAIN_EDGES, b as CHAIN_LINK_FIELDS, c as CatalogueEntry, d as ChainLinkField, e as ChainTarget, f as ChainVerdict, g as CompiledSchemas, i as ContractCheck, j as ContractCheckResult, k as ContractRunResult, l as ContractViolation, m as CreateElementInput, D as DERIVABLE_TYPES, r as DerivationEnvelope, t as DerivationFailureClass, x as DerivationPolicyPayload, y as DerivationProposal, z as DraftChainLink, E as DraftFork, F as DraftRecord, G as ElementMetadata, H as ElementRecord, J as ElementStoreContractHarness, K as ElementVersionValidation, L as FindingSeverity, O as OptionalCommand, P as PROBE_VERSION_ID, Q as ParentRelation, R as PreferredHeadOutcome, S as PreferredHeadResolution, T as PreferredHeadSelection, U as PreferredHeadSource, V as ProjectionState, W as ProjectionStatus, X as PublishCheckInput, _ as PublishRejected, $ as PublishVersionInput, a0 as PublishedVersion, a1 as REFERENCE_FIELD, a3 as ResolvePreferredHeadOptions, a4 as ResolvedVersion, a5 as ReviseMetadataInput, a6 as STYLE_PAYLOAD, a7 as STYLE_PAYLOAD_V2, a8 as SZENEN_ELEMENT_TYPES, a9 as SceneDerivationInput, aa as SceneDerivationOutcome, ab as SceneDerivationOutput, ad as SchemaValidationResult, ae as SetPreferredHeadInput, af as StoreAuthority, ag as SzenenCommandResult, ak as SzenenProjection, am as TargetModelCandidate, an as TargetModelQueries, ao as TargetModelQuery, aq as UnsupportedSchemaError, as as VersionDag, at as VersionDagError, au as VersionNode, av as VersionParentLink, aw as WriteConflict, ax as WriteDraftInput, ay as assessDerivationResponse, az as buildDerivationSystemInstruction, aA as buildDerivationUserPrompt, aB as buildVersionDag, aC as checkChainTargets, aD as checkDerivationResponse, aE as checkDraftChainMeta, aF as collectVersionRefs, aG as compileSchemas, aH as createSimulationSceneDerivationPort, aI as describeTargetModelFailure, aJ as elementStoreContractChecks, aK as formatSchemaErrors, aL as getSzenenSchemas, aM as isOk, aN as isProjectionCurrent, aO as linkFor, aP as parseDerivationResponse, aQ as preferredVersionId, aR as resolvePreferredHead, aS as resolveTargetModelOver, aT as resolverFromQueries, aU as runElementStoreContract, aV as runPublishChecks, aW as runSceneDerivation, aX as showChain, aY as validateAgainst, aZ as validateDerivationInput, a_ as validateElementVersion, a$ as validatePayload, b0 as withReference } from './storeContract-DNggXiZl.js';
|
|
3
3
|
import { T as TextGenerationPort, Q as QueryResult, C as CommandResult } from './contracts-DdYOMBl9.js';
|
|
4
4
|
export { S as SIMULATION_PROVIDER, c as TextGenerationRequest, d as TextGenerationResult, g as createFakeTextGenerationPort, h as createSimulationTextGenerationPort, s as simulatedAnswerFor } from './contracts-DdYOMBl9.js';
|
|
@@ -34,6 +34,86 @@ declare const ELEMENT_VERSION_SCHEMA_FILE = "element-version.schema.json";
|
|
|
34
34
|
*/
|
|
35
35
|
declare function hasPlacementCapability(setupPayload: unknown): boolean;
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Ein fachlicher Befund des Promptpfads, der den Lauf **nicht** verhindert hat.
|
|
39
|
+
*
|
|
40
|
+
* Er wird im Lauf mit eingefroren (D-22): Wer spaeter fragt, warum ein Prompt
|
|
41
|
+
* ohne Kameravorgabe entstand, findet die Antwort im Lauf und nicht in einem
|
|
42
|
+
* Logfile, das es nicht mehr gibt.
|
|
43
|
+
*/
|
|
44
|
+
interface PromptDiagnostic {
|
|
45
|
+
/** Regel-ID (`P-07`) oder Kennung einer Aufloesungsentscheidung. */
|
|
46
|
+
code: string;
|
|
47
|
+
/** Woher der Befund stammt. */
|
|
48
|
+
origin: 'rule' | 'schema' | 'resolution';
|
|
49
|
+
/** JSON-Pointer auf die betroffene Stelle, soweit bestimmbar. */
|
|
50
|
+
path: string;
|
|
51
|
+
message: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Was ein Regelbefund im **Promptpfad** bewirkt.
|
|
55
|
+
*
|
|
56
|
+
* `blocker` steht bewusst in keiner Zeile der Tabelle unten: Kein Befund aus
|
|
57
|
+
* P-01…P-17 verhindert fuer sich genommen einen Textauftrag. Die echten
|
|
58
|
+
* Prompt-Blocker sind keine Regelbefunde, sondern Zustaende — kein
|
|
59
|
+
* verwertbarer Inhalt, ein Revisionskonflikt, eine technisch unlesbare
|
|
60
|
+
* Eingabe, eine nicht endlich aufloesbare Pflichtstruktur. Sie stehen dort,
|
|
61
|
+
* wo sie entstehen (`resolve.ts`, `freezeDraftChain.ts`), nicht hier.
|
|
62
|
+
*/
|
|
63
|
+
type PromptEffect = 'diagnostic' | 'blocker' | 'not_applicable';
|
|
64
|
+
/**
|
|
65
|
+
* Die Zielrichtung aus Schritt 07 §6, als ausfuehrbare Tabelle.
|
|
66
|
+
*
|
|
67
|
+
* Vollstaendig ueber `ALL_PUBLISH_RULES` — ein Test wacht darueber. Eine neue
|
|
68
|
+
* Regel muss hier eingeordnet werden, sonst faellt sie im Promptpfad
|
|
69
|
+
* stillschweigend unter den Tisch, und genau das war der Fehler, den die
|
|
70
|
+
* positive Liste in `capabilities.ts` schon einmal verhindert hat.
|
|
71
|
+
*/
|
|
72
|
+
declare const PROMPT_RULE_EFFECT: Readonly<Record<string, PromptEffect>>;
|
|
73
|
+
/** Regeln, die weder eingeordnet noch als unzuständig benannt sind. */
|
|
74
|
+
declare function rulesWithoutPromptEffect(alleRegeln: readonly string[]): readonly string[];
|
|
75
|
+
/**
|
|
76
|
+
* Macht aus einem Publish-Befund einen Prompt-Diagnostic.
|
|
77
|
+
*
|
|
78
|
+
* Der Text des Befundes bleibt woertlich stehen. Ihn umzuformulieren hiesse,
|
|
79
|
+
* dieselbe Sache an zwei Stellen zu erklaeren — und die zweite Fassung waere
|
|
80
|
+
* irgendwann die falsche.
|
|
81
|
+
*/
|
|
82
|
+
declare function diagnosticOfFinding(finding: PublishFinding): PromptDiagnostic;
|
|
83
|
+
/** Macht aus einem Schemabefund einen Prompt-Diagnostic (Schritt 07 §7). */
|
|
84
|
+
declare function diagnosticOfSchemaError(error: SchemaError, where: string): PromptDiagnostic;
|
|
85
|
+
/**
|
|
86
|
+
* Alle Prompt-Diagnostics eines Prueflaufs.
|
|
87
|
+
*
|
|
88
|
+
* `advisory` und `blocking` werden hier **gleich** behandelt: Fuer den
|
|
89
|
+
* Promptlauf ist der Unterschied bedeutungslos, weil keiner von beiden ihn
|
|
90
|
+
* verhindert. Der Unterschied bleibt dort erhalten, wo er zaehlt — im
|
|
91
|
+
* Publish-Pfad, der `PublishCheckResult.ok` liest.
|
|
92
|
+
*/
|
|
93
|
+
declare function promptDiagnosticsOf(checks: PublishCheckResult): PromptDiagnostic[];
|
|
94
|
+
/**
|
|
95
|
+
* Der **einzige** inhaltliche Prompt-Blocker: Gibt dieser Arbeitsstand
|
|
96
|
+
* ueberhaupt etwas her, das sich beschreiben laesst?
|
|
97
|
+
*
|
|
98
|
+
* „Tolerant" heisst nicht „aus nichts wird ein Lauf" (Goal §5.3). Verwertbar
|
|
99
|
+
* ist eine Szene, wenn mindestens **eine** dieser Quellen Text traegt:
|
|
100
|
+
*
|
|
101
|
+
* * ein Knoten mit `semantic.description`,
|
|
102
|
+
* * ein Knoten mit mindestens einer Komponentenreferenz — der Text steht
|
|
103
|
+
* dann in der referenzierten Komponente,
|
|
104
|
+
* * ein Umgebungstext oder eine Umgebungsreferenz.
|
|
105
|
+
*
|
|
106
|
+
* Bewusst **nicht** die blosse Knotenzahl: Ein Knoten ohne jede Beschreibung
|
|
107
|
+
* ist ein Platzhalter, kein Inhalt, und ein Prompt daraus waere die leere
|
|
108
|
+
* Behauptung, die §5.3 ausschliesst.
|
|
109
|
+
*/
|
|
110
|
+
declare function describableContent(scenePayload: unknown): {
|
|
111
|
+
ok: true;
|
|
112
|
+
} | {
|
|
113
|
+
ok: false;
|
|
114
|
+
message: string;
|
|
115
|
+
};
|
|
116
|
+
|
|
37
117
|
/**
|
|
38
118
|
* Zustand einer Fähigkeit.
|
|
39
119
|
*
|
|
@@ -126,11 +206,20 @@ interface CapabilityReport {
|
|
|
126
206
|
* Stand die Modellregeln ein", sondern „ist das überhaupt ein Scene Setup".
|
|
127
207
|
*/
|
|
128
208
|
schemaErrors: readonly SchemaError[];
|
|
209
|
+
/**
|
|
210
|
+
* Was dem Promptpfad auffiel, ohne ihn zu verhindern (D-135).
|
|
211
|
+
*
|
|
212
|
+
* Dieselben Befunde, die `checks` fuehrt — nur in der Wirkung, die sie fuer
|
|
213
|
+
* **diese** Operation haben. Ein zweiter Prueflauf entsteht dabei nicht.
|
|
214
|
+
*/
|
|
215
|
+
promptDiagnostics: readonly PromptDiagnostic[];
|
|
129
216
|
}
|
|
130
217
|
/** Ein falscher Anker ist ein Aufruffehler, kein Befund. */
|
|
131
218
|
declare class CapabilityAnchorError extends Error {
|
|
132
219
|
}
|
|
133
220
|
type CapabilityScope = 'scene' | 'camera_rig' | 'placement' | 'global';
|
|
221
|
+
/** Die drei Flags des Berichts — als Name, nicht als Restmenge des Berichts. */
|
|
222
|
+
type CapabilityFlagName = 'can_describe_scene' | 'can_render_prompt' | 'can_place';
|
|
134
223
|
/**
|
|
135
224
|
* Welche Bereiche eine Regel beim Anker `scene_setup` abdeckt.
|
|
136
225
|
*
|
|
@@ -187,6 +276,29 @@ declare function capabilityReport(input: CapabilityReportInput): Promise<Capabil
|
|
|
187
276
|
* damit er gegen `ALL_PUBLISH_RULES` läuft und nicht gegen eine Kopie davon.
|
|
188
277
|
*/
|
|
189
278
|
declare function unclassifiedPublishRules(): readonly string[];
|
|
279
|
+
/**
|
|
280
|
+
* Der Fähigkeitsstand einer Szene, für die es **kein** Scene Setup gibt.
|
|
281
|
+
*
|
|
282
|
+
* Seit D-135 kann ein Promptlauf direkt aus einer Szene entstehen. Dann gibt
|
|
283
|
+
* es keinen Anker für `capabilityReport()` — der hängt am `scene_setup` (D-20)
|
|
284
|
+
* und wirft bei jedem anderen Typ. Trotzdem muss der Lauf drei Zustände
|
|
285
|
+
* einfrieren, und sie dürfen nicht geraten sein.
|
|
286
|
+
*
|
|
287
|
+
* Diese Funktion leitet sie aus **denselben Primitiven** ab, die der Bericht
|
|
288
|
+
* benutzt — Knotenzahl, `describableContent()`, `hasPlacementCapability()`.
|
|
289
|
+
* Sie ist deshalb keine zweite Fähigkeitsableitung (R-2), sondern dieselbe
|
|
290
|
+
* ohne den Setup-Teil.
|
|
291
|
+
*
|
|
292
|
+
* `can_place` ist hier immer `no`, und das ist keine Verlegenheit: Die
|
|
293
|
+
* Weltplatzierung liegt ausschließlich im Scene Setup (D-39), das
|
|
294
|
+
* `coordinate_system` ebenfalls (D-65). Ohne Setup gibt es keine belastbaren
|
|
295
|
+
* Koordinaten — nicht „unbekannt", sondern nachweislich keine.
|
|
296
|
+
*/
|
|
297
|
+
declare function sceneOnlyCapabilities(scenePayload: unknown): {
|
|
298
|
+
can_describe_scene: CapabilityFlag;
|
|
299
|
+
can_render_prompt: CapabilityFlag;
|
|
300
|
+
can_place: CapabilityFlag;
|
|
301
|
+
};
|
|
190
302
|
|
|
191
303
|
/** Ein Beitrag zur Beschreibung eines Knotens, mit Herkunft (D-50). */
|
|
192
304
|
interface NodeContribution {
|
|
@@ -218,6 +330,7 @@ interface ResolvedPlacement {
|
|
|
218
330
|
interface ResolvedCamera {
|
|
219
331
|
camera_id: string;
|
|
220
332
|
name: string | null;
|
|
333
|
+
/** `null`, wenn das Preset nicht auflösbar war — kein erfundenes Objektiv. */
|
|
221
334
|
preset: unknown;
|
|
222
335
|
placement: unknown;
|
|
223
336
|
orientation: unknown;
|
|
@@ -226,24 +339,51 @@ interface ResolvedCamera {
|
|
|
226
339
|
/** Aufgelöste Pattern-Version, falls die Platzierung eines benutzt. */
|
|
227
340
|
pattern: unknown | null;
|
|
228
341
|
}
|
|
229
|
-
/**
|
|
342
|
+
/**
|
|
343
|
+
* Die Renderer-Eingabe nach `prompt-derivation.md` §3a — seit D-135 in
|
|
344
|
+
* Normalform.
|
|
345
|
+
*
|
|
346
|
+
* `shot`, `setup`, `camera`, `target_model` und `target_model_resolution` sind
|
|
347
|
+
* **echt optional**: `null` heißt „gab es nicht", nicht „wurde durch einen
|
|
348
|
+
* Platzhalter ersetzt". Ein Dummy-Objekt an einer dieser Stellen wäre von
|
|
349
|
+
* einer echten Angabe nicht zu unterscheiden — genau der Einwand, den D-75
|
|
350
|
+
* gegen erfundene Kennungen führt.
|
|
351
|
+
*
|
|
352
|
+
* `scene` bleibt Pflicht. Sie ist der beschreibbare Inhalt, und ohne ihn gibt
|
|
353
|
+
* es nichts zu formulieren (Goal §5.3).
|
|
354
|
+
*/
|
|
230
355
|
interface RendererInput {
|
|
356
|
+
/** `null` bei einem Lauf ohne Shot (Szene-Direktpfad). */
|
|
231
357
|
shot: {
|
|
232
358
|
version_id: string;
|
|
233
359
|
element_id: string;
|
|
234
|
-
|
|
360
|
+
/** `null`, wenn der Shot keine auflösbare Kamera nennt. */
|
|
361
|
+
camera_id: string | null;
|
|
235
362
|
shot_concept: unknown | null;
|
|
236
363
|
user_instruction: string | null;
|
|
237
364
|
text_override: string | null;
|
|
238
|
-
};
|
|
365
|
+
} | null;
|
|
366
|
+
/**
|
|
367
|
+
* Das verwendete Scene Setup — Herkunft, nicht Inhalt (D-135).
|
|
368
|
+
*
|
|
369
|
+
* Der Inhalt des Setups steckt bereits in `nodes` (Overrides, Placements)
|
|
370
|
+
* und in `styles`. Was fehlte, war die Auskunft, **welches** Setup das war;
|
|
371
|
+
* bei einem Lauf ohne Setup steht hier ehrlich `null`.
|
|
372
|
+
*/
|
|
373
|
+
setup: {
|
|
374
|
+
version_id: string;
|
|
375
|
+
element_id: string;
|
|
376
|
+
} | null;
|
|
239
377
|
scene: {
|
|
378
|
+
element_id: string;
|
|
240
379
|
version_id: string;
|
|
241
380
|
nodes: readonly ResolvedNode[];
|
|
242
381
|
relations: readonly unknown[];
|
|
243
382
|
environment: unknown | null;
|
|
244
383
|
unit_system: unknown | null;
|
|
245
384
|
};
|
|
246
|
-
|
|
385
|
+
/** `null`, wenn der Lauf ohne konkrete Kamera entstand. */
|
|
386
|
+
camera: ResolvedCamera | null;
|
|
247
387
|
styles: readonly {
|
|
248
388
|
role: string;
|
|
249
389
|
rank: number;
|
|
@@ -263,7 +403,8 @@ interface RendererInput {
|
|
|
263
403
|
text: string;
|
|
264
404
|
locale: string | null;
|
|
265
405
|
}[];
|
|
266
|
-
|
|
406
|
+
/** `null` bei generischer Ableitung ohne Zielmodell. */
|
|
407
|
+
target_model: unknown | null;
|
|
267
408
|
/**
|
|
268
409
|
* Fälle, in denen die Zielsprache nicht verfügbar war (D-48).
|
|
269
410
|
*
|
|
@@ -275,6 +416,15 @@ interface RendererInput {
|
|
|
275
416
|
localization_notes: readonly unknown[];
|
|
276
417
|
/** Annahmen, unter denen diese Eingabe entstanden ist. */
|
|
277
418
|
assumptions: readonly string[];
|
|
419
|
+
/**
|
|
420
|
+
* Fachliche Befunde, die den Lauf **nicht** verhindert haben (D-135).
|
|
421
|
+
*
|
|
422
|
+
* Publish-Befunde, Schemabefunde und ausgelassene optionale Teile — jeder
|
|
423
|
+
* mit Regel-ID bzw. Kennung. Sie werden mit dem Lauf eingefroren: Wer später
|
|
424
|
+
* fragt, warum ein Prompt ohne Kameravorgabe entstand, findet die Antwort im
|
|
425
|
+
* Lauf.
|
|
426
|
+
*/
|
|
427
|
+
diagnostics: readonly PromptDiagnostic[];
|
|
278
428
|
/** Die Fähigkeiten, die die Auflösung gesehen hat — eingefroren (D-22). */
|
|
279
429
|
capabilities: {
|
|
280
430
|
can_describe_scene: string;
|
|
@@ -283,7 +433,7 @@ interface RendererInput {
|
|
|
283
433
|
};
|
|
284
434
|
/** Die tatsächlich verwendete Kontextkette (§4.9.1). */
|
|
285
435
|
context_chain: readonly (string | null)[];
|
|
286
|
-
/** Wie das Zielmodell gefunden wurde (§4.9.1). */
|
|
436
|
+
/** Wie das Zielmodell gefunden wurde (§4.9.1). `null` ohne Zielmodell. */
|
|
287
437
|
target_model_resolution: {
|
|
288
438
|
element_id: string;
|
|
289
439
|
version_id: string;
|
|
@@ -293,7 +443,7 @@ interface RendererInput {
|
|
|
293
443
|
element_id: string;
|
|
294
444
|
context_id: string | null;
|
|
295
445
|
}[];
|
|
296
|
-
};
|
|
446
|
+
} | null;
|
|
297
447
|
}
|
|
298
448
|
/**
|
|
299
449
|
* Warum eine Auflösung nicht zustande kam.
|
|
@@ -301,6 +451,12 @@ interface RendererInput {
|
|
|
301
451
|
* Alles hier ist **fachlich**. Technische Lesefehler werfen und werden nie zu
|
|
302
452
|
* einer dieser Klassen — sonst entstünde aus einer kränkelnden Datenbank eine
|
|
303
453
|
* Aussage über den Bestand (Grundsatzregel 5).
|
|
454
|
+
*
|
|
455
|
+
* Die Liste ist mit D-135 **kürzer geworden**, nicht länger: `schema` gilt nur
|
|
456
|
+
* noch für eine Payload, die technisch nicht lesbar ist, und
|
|
457
|
+
* `capability_blocked`/`capability_undetermined` entstehen im Promptpfad nicht
|
|
458
|
+
* mehr. Sie bleiben als Typen erhalten, weil `capabilityGate()` sie weiterhin
|
|
459
|
+
* für Aufrufer bildet, die eine Fähigkeit ausdrücklich als Tor benutzen wollen.
|
|
304
460
|
*/
|
|
305
461
|
type ResolveFailure = {
|
|
306
462
|
class: 'not_a_shot';
|
|
@@ -313,8 +469,13 @@ type ResolveFailure = {
|
|
|
313
469
|
} | {
|
|
314
470
|
class: 'schema';
|
|
315
471
|
message: string;
|
|
316
|
-
where: 'shot' | 'scene_setup';
|
|
472
|
+
where: 'shot' | 'scene_setup' | 'scene';
|
|
317
473
|
errors: readonly SchemaError[];
|
|
474
|
+
}
|
|
475
|
+
/** Kein verwertbarer beschreibbarer Inhalt (Schritt 05 §5.1, Goal §5.3). */
|
|
476
|
+
| {
|
|
477
|
+
class: 'no_content';
|
|
478
|
+
message: string;
|
|
318
479
|
} | {
|
|
319
480
|
class: 'capability_blocked';
|
|
320
481
|
message: string;
|
|
@@ -339,7 +500,7 @@ type ResolveFailure = {
|
|
|
339
500
|
type ResolveResult = {
|
|
340
501
|
kind: 'resolved';
|
|
341
502
|
input: RendererInput;
|
|
342
|
-
report: CapabilityReport;
|
|
503
|
+
report: CapabilityReport | null;
|
|
343
504
|
} | {
|
|
344
505
|
kind: 'rejected';
|
|
345
506
|
failure: ResolveFailure;
|
|
@@ -398,9 +559,7 @@ interface ResolveShotPayloadInput {
|
|
|
398
559
|
* Zielmodell-Logik (Gate C0).
|
|
399
560
|
*
|
|
400
561
|
* Die `version_id` ist bei einem Draft leer — sie wird **nicht** erfunden
|
|
401
|
-
* (D-98/D-75).
|
|
402
|
-
* Zielmodell) bleiben veröffentlichungspflichtig: D-96 erlaubt genau zwei
|
|
403
|
-
* Draft-Kanten, nicht beliebige.
|
|
562
|
+
* (D-98/D-75).
|
|
404
563
|
*/
|
|
405
564
|
chain?: {
|
|
406
565
|
setup: {
|
|
@@ -423,13 +582,44 @@ interface ResolveShotPayloadInput {
|
|
|
423
582
|
* gebaut wurde („prüfen, bevor geschrieben wird"). Es wird nichts gespeichert
|
|
424
583
|
* und kein Modell gerufen.
|
|
425
584
|
*
|
|
426
|
-
*
|
|
427
|
-
*
|
|
585
|
+
* **Seit D-135 tolerant.** Ein Schemabefund am Shot oder am Setup beendet den
|
|
586
|
+
* Lauf nicht mehr; er wird als Diagnostic mitgeführt. Was noch beendet, ist
|
|
587
|
+
* eine Payload, die technisch nicht lesbar ist, und ein Inhaltsträger — Setup
|
|
588
|
+
* oder Szene —, dessen Referenz sich nicht auflösen lässt.
|
|
428
589
|
*/
|
|
429
590
|
declare function resolveShotPayload(input: ResolveShotPayloadInput): Promise<ResolveResult>;
|
|
591
|
+
interface ResolveScenePayloadInput {
|
|
592
|
+
/** Payload einer `scene` — Entwurf oder veröffentlichte Version. */
|
|
593
|
+
scenePayload: unknown;
|
|
594
|
+
sceneElementId: string;
|
|
595
|
+
/** Kennung der Version, falls es eine gibt. Bei einem Entwurf leer. */
|
|
596
|
+
sceneVersionId?: string;
|
|
597
|
+
resolver: ReferenceResolver;
|
|
598
|
+
contextChain: readonly (string | null)[];
|
|
599
|
+
userInstruction?: string | null;
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Löst eine **Szene allein** zur Renderer-Eingabe auf (D-135).
|
|
603
|
+
*
|
|
604
|
+
* Kein Shot, kein Scene Setup, keine Kamera, kein Zielmodell — und
|
|
605
|
+
* ausdrücklich keine erfundenen Ersatzobjekte dafür. Was hier entsteht, ist
|
|
606
|
+
* dieselbe Renderer-Eingabe wie beim vollständigen Shot-Pfad, nur mit `null`
|
|
607
|
+
* an den Stellen, die es in diesem Arbeitsstand nicht gibt.
|
|
608
|
+
*
|
|
609
|
+
* Die Zusammensetzung ist **dieselbe Funktion**: Beitragsreihenfolge (D-50),
|
|
610
|
+
* Sichtbarkeit (D-21), Annahmen und Diagnostics entstehen für beide Wege im
|
|
611
|
+
* selben Code. Ein zweiter Prompt-Stack wäre die zweite Wahrheit aus R-2.
|
|
612
|
+
*/
|
|
613
|
+
declare function resolveScenePayload(input: ResolveScenePayloadInput): Promise<ResolveResult>;
|
|
430
614
|
/**
|
|
431
615
|
* Prüft ein Fähigkeits-Flag als Torwächter.
|
|
432
616
|
*
|
|
617
|
+
* **Nicht mehr Teil des Promptpfads** (D-135): Ein Publish-Befund verhindert
|
|
618
|
+
* dort keinen Textversuch mehr. Die Funktion bleibt für Aufrufer, die eine
|
|
619
|
+
* Fähigkeit ausdrücklich als Bedingung ihrer **eigenen** Operation lesen —
|
|
620
|
+
* etwa ein späterer Blender-/Freeze-Pfad, der genau das darf (Schritt 07 §3
|
|
621
|
+
* D/E).
|
|
622
|
+
*
|
|
433
623
|
* `no` und `unknown` bekommen **verschiedene** Klassen. Die Ablehnung bei
|
|
434
624
|
* `unknown` sagt „das liess sich hier nicht feststellen", nicht „die Szene kann
|
|
435
625
|
* das nicht" — der Unterschied ist der ganze Grund, warum `unknown` in D-64 ein
|
|
@@ -787,6 +977,23 @@ type PromptRunSource = {
|
|
|
787
977
|
derivation_run_id?: string;
|
|
788
978
|
/** Gesetzt, wenn die Kette aus einer Recovery-Arbeitsfassung kam (D-99). */
|
|
789
979
|
derivation_recovery_id?: string;
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* Der Lauf entstand **direkt aus einer Szene** — Stufe 6.11 (D-135).
|
|
983
|
+
*
|
|
984
|
+
* Kein Shot, kein Scene Setup, keine Kette. Was eingefroren wurde, ist genau
|
|
985
|
+
* ein Arbeitsstand: entweder ein Entwurf (`draft_id` + `revision`) oder eine
|
|
986
|
+
* veröffentlichte Version (`version_id`). Nie beides, und nie ein erfundener
|
|
987
|
+
* Ersatz für das jeweils andere (D-75/D-98).
|
|
988
|
+
*/
|
|
989
|
+
| {
|
|
990
|
+
kind: 'scene_direct';
|
|
991
|
+
scene: {
|
|
992
|
+
element_id: string;
|
|
993
|
+
draft_id: string | null;
|
|
994
|
+
revision: number | null;
|
|
995
|
+
version_id: string | null;
|
|
996
|
+
};
|
|
790
997
|
};
|
|
791
998
|
interface PromptRunRecord {
|
|
792
999
|
run_id: string;
|
|
@@ -798,9 +1005,14 @@ interface PromptRunRecord {
|
|
|
798
1005
|
* unterscheiden. Wer die Herkunft wissen will, liest `source`.
|
|
799
1006
|
*/
|
|
800
1007
|
shot_version_id: string;
|
|
1008
|
+
/**
|
|
1009
|
+
* Das Shot-Element. **Leer** bei einem Lauf, der ohne Shot entstand (D-135).
|
|
1010
|
+
*/
|
|
801
1011
|
shot_element_id: string;
|
|
802
1012
|
scene_setup_version_id: string;
|
|
1013
|
+
/** Leer, wenn der Lauf ohne konkrete Kamera entstand (D-135). */
|
|
803
1014
|
camera_id: string;
|
|
1015
|
+
/** Leer bei generischer Ableitung ohne Zielmodell (D-135). */
|
|
804
1016
|
target_model_version_id: string;
|
|
805
1017
|
provider: string;
|
|
806
1018
|
model_id: string;
|
|
@@ -1064,6 +1276,7 @@ interface ChainSnapshot {
|
|
|
1064
1276
|
element: {
|
|
1065
1277
|
element_id: string;
|
|
1066
1278
|
type: string;
|
|
1279
|
+
context_id?: string | null;
|
|
1067
1280
|
};
|
|
1068
1281
|
draft: {
|
|
1069
1282
|
draft_id: string;
|
|
@@ -1072,6 +1285,23 @@ interface ChainSnapshot {
|
|
|
1072
1285
|
chain?: DraftChainMeta;
|
|
1073
1286
|
} | null;
|
|
1074
1287
|
draftFork?: unknown | null;
|
|
1288
|
+
/**
|
|
1289
|
+
* Veröffentlichte Versionen — für den Szene-Direktpfad (D-135).
|
|
1290
|
+
*
|
|
1291
|
+
* Eine Draft-Kette friert ausschließlich Entwürfe ein; eine Szene kann
|
|
1292
|
+
* dagegen längst veröffentlicht sein und gar keinen Entwurf mehr haben.
|
|
1293
|
+
* Beide Hosts liefern die Liste bereits mit (`ElementSnapshot`), sie war
|
|
1294
|
+
* hier nur nicht deklariert.
|
|
1295
|
+
*/
|
|
1296
|
+
versions?: readonly {
|
|
1297
|
+
version_id: string;
|
|
1298
|
+
element_id: string;
|
|
1299
|
+
payload: unknown;
|
|
1300
|
+
}[];
|
|
1301
|
+
preferredHeads?: readonly {
|
|
1302
|
+
context_id: string | null;
|
|
1303
|
+
version_id?: string;
|
|
1304
|
+
}[];
|
|
1075
1305
|
} | null;
|
|
1076
1306
|
};
|
|
1077
1307
|
}
|
|
@@ -1106,6 +1336,49 @@ interface FreezeDraftChainInput {
|
|
|
1106
1336
|
* danach, ob er sie benutzt.
|
|
1107
1337
|
*/
|
|
1108
1338
|
declare function freezeDraftChain(input: FreezeDraftChainInput): Promise<FreezeResult>;
|
|
1339
|
+
/**
|
|
1340
|
+
* Was eingefroren wurde — **eines** von beidem, nie beides und nie erfunden.
|
|
1341
|
+
*
|
|
1342
|
+
* Ein Entwurf hat `draft_id` und `revision` und keine `version_id`; eine
|
|
1343
|
+
* veröffentlichte Version genau umgekehrt. Ein Feld, das ehrlich `null` ist,
|
|
1344
|
+
* ist besser als eine Kennung, die wie eine echte aussieht (D-75/D-98).
|
|
1345
|
+
*/
|
|
1346
|
+
interface FrozenSceneState {
|
|
1347
|
+
element_id: string;
|
|
1348
|
+
draft_id: string | null;
|
|
1349
|
+
revision: number | null;
|
|
1350
|
+
version_id: string | null;
|
|
1351
|
+
}
|
|
1352
|
+
interface FreezeSceneSuccess {
|
|
1353
|
+
kind: 'ok';
|
|
1354
|
+
scene: FrozenSceneState;
|
|
1355
|
+
input: RendererInput;
|
|
1356
|
+
}
|
|
1357
|
+
type FreezeSceneResult = FreezeSceneSuccess | FreezeFailure;
|
|
1358
|
+
interface FreezeSceneWorkingStateInput {
|
|
1359
|
+
/** Das Szenen-**Element**. Ob Entwurf oder Version, entscheidet der Bestand. */
|
|
1360
|
+
sceneElementId: string;
|
|
1361
|
+
store: ChainQueries;
|
|
1362
|
+
resolver: ReferenceResolver;
|
|
1363
|
+
contextChain: readonly (string | null)[];
|
|
1364
|
+
userInstruction?: string | null;
|
|
1365
|
+
}
|
|
1366
|
+
/**
|
|
1367
|
+
* Friert den Arbeitsstand **einer Szene** ein und baut die Renderer-Eingabe
|
|
1368
|
+
* (D-135).
|
|
1369
|
+
*
|
|
1370
|
+
* Dasselbe optimistische Zwei-Durchgang-Verfahren wie bei der Draft-Kette
|
|
1371
|
+
* (D-97): lesen, kopieren, frisch nachlesen, Revision vergleichen, und den
|
|
1372
|
+
* Snapshot aus den **kopierten** Inhalten bauen. Ein Konflikt bleibt ein
|
|
1373
|
+
* echter Blocker — **vor** dem kostenpflichtigen Provideraufruf. Dieser Goal
|
|
1374
|
+
* lockert daran nichts (Goal §8.1).
|
|
1375
|
+
*
|
|
1376
|
+
* Eine veröffentlichte Version ist unveränderlich; für sie kann Durchgang B
|
|
1377
|
+
* keinen Revisionskonflikt finden. Er läuft trotzdem: Verschwindet die Version
|
|
1378
|
+
* zwischen den Durchgängen aus der wirksamen Sicht — stillgelegt, ein anderer
|
|
1379
|
+
* Preferred Head —, ist der Stand nicht mehr der, den der Nutzer gesehen hat.
|
|
1380
|
+
*/
|
|
1381
|
+
declare function freezeSceneWorkingState(input: FreezeSceneWorkingStateInput): Promise<FreezeSceneResult>;
|
|
1109
1382
|
|
|
1110
1383
|
/**
|
|
1111
1384
|
* Wie brauchbar das Material einer Arbeitsfassung ist.
|
|
@@ -1727,7 +2000,22 @@ interface ImageExecutionProfile {
|
|
|
1727
2000
|
*/
|
|
1728
2001
|
interface ImageHostCapability {
|
|
1729
2002
|
environment_id: string;
|
|
1730
|
-
|
|
2003
|
+
/**
|
|
2004
|
+
* Die Aufrufwege dieses Hosts — je Weg **mit dem Anbieter, zu dem er
|
|
2005
|
+
* führt** (R-06.1).
|
|
2006
|
+
*
|
|
2007
|
+
* Der Anbieter steht hier und nicht als Tabelle in der Domain: Wer den Weg
|
|
2008
|
+
* besitzt, weiß auch, wo er endet. Ohne diese Angabe könnte ein falsch
|
|
2009
|
+
* gepflegtes Profil (`provider: artspace`, `execution_path: google_flow`)
|
|
2010
|
+
* den Google-Weg rufen und die Provenienz trotzdem `artspace` protokollieren
|
|
2011
|
+
* — der Auftrag würde etwas anderes behaupten als das, was passiert ist.
|
|
2012
|
+
*/
|
|
2013
|
+
execution_paths: readonly ImageExecutionRoute[];
|
|
2014
|
+
}
|
|
2015
|
+
/** Ein Aufrufweg des Hosts und der Anbieter, bei dem er landet. */
|
|
2016
|
+
interface ImageExecutionRoute {
|
|
2017
|
+
execution_path: string;
|
|
2018
|
+
provider: string;
|
|
1731
2019
|
}
|
|
1732
2020
|
/** Ein Zielmodell, so wie die Auswahl es braucht. */
|
|
1733
2021
|
interface ExecutionTargetModel {
|
|
@@ -1792,6 +2080,21 @@ interface ImageModelChoice {
|
|
|
1792
2080
|
* zeigen soll — eine Regel, eine Stelle.
|
|
1793
2081
|
*/
|
|
1794
2082
|
declare function checkImageExecutionProfile(profile: unknown): readonly string[];
|
|
2083
|
+
/**
|
|
2084
|
+
* Prüft die Profilliste **eines** Zielmodells und liefert die Befunde je Profil
|
|
2085
|
+
* (R-06.2).
|
|
2086
|
+
*
|
|
2087
|
+
* Zusätzlich zur Einzelprüfung: `profile_id` muss innerhalb eines Zielmodells
|
|
2088
|
+
* eindeutig sein — auch über deaktivierte Profile hinweg. Die Auswahl wird über
|
|
2089
|
+
* `zielmodell#profil` identifiziert; zweimal dieselbe Kennung wäre nicht mehr
|
|
2090
|
+
* eindeutig auflösbar, und die Laufzeit nähme stillschweigend das erste. Über
|
|
2091
|
+
* **verschiedene** Zielmodelle hinweg darf dieselbe Kennung vorkommen
|
|
2092
|
+
* (`nano_banana_pro#flow` und `imagen_4#flow` sind verschiedene Auswahlen).
|
|
2093
|
+
*
|
|
2094
|
+
* Exportiert, weil der Zielmodell-Editor dieselbe Prüfung zeigt — eine Regel,
|
|
2095
|
+
* eine Stelle.
|
|
2096
|
+
*/
|
|
2097
|
+
declare function checkImageExecutionProfiles(profiles: readonly unknown[]): readonly (readonly string[])[];
|
|
1795
2098
|
/**
|
|
1796
2099
|
* Alle Bildmodelle, die dieser Host für diesen Lauf wirklich ausführen kann.
|
|
1797
2100
|
*
|
|
@@ -2011,6 +2314,33 @@ interface SzenenRunPort {
|
|
|
2011
2314
|
* Draft-Lauf hat keine, wäre dort also unauffindbar.
|
|
2012
2315
|
*/
|
|
2013
2316
|
listRunsForChain(chainId: string): Promise<QueryResult<readonly PromptRunRecord[]>>;
|
|
2317
|
+
/**
|
|
2318
|
+
* Startet einen Lauf **direkt aus einer Szene** — D-135.
|
|
2319
|
+
*
|
|
2320
|
+
* Kein Shot, kein Scene Setup, keine Kamera, kein Zielmodell nötig. Intern
|
|
2321
|
+
* derselbe Weg wie die beiden anderen Einstiege: einfrieren (D-97), dann
|
|
2322
|
+
* dieselbe Ableitung, dieselbe Antwortprüfung, dieselbe Persistenz. Es
|
|
2323
|
+
* entsteht keine zweite Lauf-Architektur — nur ein dritter Einstieg in die
|
|
2324
|
+
* vorhandene.
|
|
2325
|
+
*
|
|
2326
|
+
* Dieselben drei Fehlausgänge wie beim Kettenlauf, und aus demselben Grund:
|
|
2327
|
+
* Konflikt, fachlicher Mangel und technischer Fehler sind verschiedene
|
|
2328
|
+
* Auskünfte. In **allen** Fehlerfällen gilt: Es wurde kein Modell gerufen.
|
|
2329
|
+
*/
|
|
2330
|
+
startRunFromScene(input: StartRunFromSceneInput): Promise<StartRunFromDraftResult>;
|
|
2331
|
+
/**
|
|
2332
|
+
* Die Läufe, die direkt aus dieser Szene entstanden sind (D-135).
|
|
2333
|
+
*
|
|
2334
|
+
* Sie tragen weder Shot-Version noch `chain_id` und wären über die beiden
|
|
2335
|
+
* bestehenden Abfragen unauffindbar.
|
|
2336
|
+
*/
|
|
2337
|
+
listRunsForScene(sceneElementId: string): Promise<QueryResult<readonly PromptRunRecord[]>>;
|
|
2338
|
+
}
|
|
2339
|
+
interface StartRunFromSceneInput {
|
|
2340
|
+
/** Das Szenen-**Element**. Ob Entwurf oder Version gilt, entscheidet der Bestand. */
|
|
2341
|
+
sceneElementId: string;
|
|
2342
|
+
userInstruction?: string;
|
|
2343
|
+
contextId?: string | null;
|
|
2014
2344
|
}
|
|
2015
2345
|
/**
|
|
2016
2346
|
* Warum ein Draft-Lauf nicht zustande kam — **drei** verschiedene Auskünfte.
|
|
@@ -2278,7 +2608,7 @@ interface DerivationPolicyOption {
|
|
|
2278
2608
|
inputModes: readonly DerivationInputMode[];
|
|
2279
2609
|
produces: readonly DerivableType[];
|
|
2280
2610
|
}
|
|
2281
|
-
/** Ein wählbares Bild aus dem Bestand. */
|
|
2611
|
+
/** Ein wählbares Bild aus dem Bestand — ein konkreter Galerieeintrag. */
|
|
2282
2612
|
interface LibraryImage {
|
|
2283
2613
|
/**
|
|
2284
2614
|
* Die **HF-Bildkennung** (D-93) — der Wert, unter dem das Bild als
|
|
@@ -2291,9 +2621,45 @@ interface LibraryImage {
|
|
|
2291
2621
|
mediaRef: string;
|
|
2292
2622
|
title: string;
|
|
2293
2623
|
mimeType: string;
|
|
2294
|
-
/**
|
|
2624
|
+
/**
|
|
2625
|
+
* Anzeigbare Quelle für die Kachel, sofern der Host sie **kostenlos** kennt.
|
|
2626
|
+
*
|
|
2627
|
+
* React kennt sie: Der Server liefert seinen Thumbnail-Pfad ohnehin mit der
|
|
2628
|
+
* Liste. Flow kennt sie nicht — dort liegt jedes Bild als Datei auf HF, und
|
|
2629
|
+
* eine Quelle entsteht erst durch einen Download. Deshalb bleibt das Feld
|
|
2630
|
+
* optional und wird **nicht** durch einen eifrigen Ladelauf gefüllt; wer
|
|
2631
|
+
* keine mitbringt, bietet stattdessen `loadPreview` an.
|
|
2632
|
+
*/
|
|
2295
2633
|
thumbUrl?: string | null;
|
|
2296
2634
|
}
|
|
2635
|
+
/**
|
|
2636
|
+
* Ein **Werk** des Bestands: die fachliche Gruppe über seinen Bildern.
|
|
2637
|
+
*
|
|
2638
|
+
* Warum das die Auskunftsform ist und nicht die flache Bildliste: Beide Hosts
|
|
2639
|
+
* kennen die Gruppe längst — React als `user_library`-Zeile mit
|
|
2640
|
+
* `metadata.gallery`, Flow über dieselbe Locator-Konvention (D-118), die der
|
|
2641
|
+
* Abgleich beim Hochladen vergibt. Die Auskunft hat sie bis zum 2026-08-22 nur
|
|
2642
|
+
* verworfen, bevor die Ansicht sie sehen konnte: Ein Item mit vierzehn Bildern
|
|
2643
|
+
* erschien als vierzehn gleichrangige Kacheln, und `limit: 8` lieferte
|
|
2644
|
+
* einundzwanzig davon (nachgemessen auf dev). Die Auswahl war damit nicht die
|
|
2645
|
+
* Auswahl eines Werkes, sondern eine ungeordnete Frameliste.
|
|
2646
|
+
*/
|
|
2647
|
+
interface LibraryImageItem {
|
|
2648
|
+
/**
|
|
2649
|
+
* Die **autoritative** Identität des Werkes bei diesem Host — die
|
|
2650
|
+
* `item_id` in React, dieselbe Kennung als Locator-Stamm in Flow.
|
|
2651
|
+
*
|
|
2652
|
+
* Ausdrücklich keine zweite Bildidentität und keine aus dem Prompt geratene
|
|
2653
|
+
* Gruppe: Zwei Werke mit demselben Prompt bleiben zwei Werke.
|
|
2654
|
+
*/
|
|
2655
|
+
itemRef: string;
|
|
2656
|
+
title: string;
|
|
2657
|
+
/**
|
|
2658
|
+
* Die Bilder des Werkes in stabiler Reihenfolge. Jedes trägt seinen
|
|
2659
|
+
* vorhandenen auflösbaren `mediaRef` — die Gruppierung ändert daran nichts.
|
|
2660
|
+
*/
|
|
2661
|
+
images: readonly LibraryImage[];
|
|
2662
|
+
}
|
|
2297
2663
|
/**
|
|
2298
2664
|
* Bilder wählen, auflösen und ablegen — **optional als Ganzes** (D-94).
|
|
2299
2665
|
*
|
|
@@ -2305,11 +2671,29 @@ interface LibraryImage {
|
|
|
2305
2671
|
* ein Library-Item mit dem Tag `hf-sync` an, das der bestehende Sync trägt.
|
|
2306
2672
|
*/
|
|
2307
2673
|
interface SzenenImageLibraryPort {
|
|
2308
|
-
/**
|
|
2309
|
-
|
|
2674
|
+
/**
|
|
2675
|
+
* Wählbare **Werke**, neueste zuerst; `search` und `limit` gelten auf
|
|
2676
|
+
* Item-Ebene.
|
|
2677
|
+
*
|
|
2678
|
+
* `limit: 60` heisst also sechzig Werke, nicht sechzig Bilder — sonst
|
|
2679
|
+
* verdrängte ein einziges mehrbildiges Werk den ganzen übrigen Bestand.
|
|
2680
|
+
*/
|
|
2681
|
+
listItems(query?: {
|
|
2310
2682
|
search?: string;
|
|
2311
2683
|
limit?: number;
|
|
2312
|
-
}): Promise<QueryResult<readonly
|
|
2684
|
+
}): Promise<QueryResult<readonly LibraryImageItem[]>>;
|
|
2685
|
+
/**
|
|
2686
|
+
* Eine anzeigbare Quelle für **ein** Bild nachladen — `<img src>`-fähig,
|
|
2687
|
+
* also eine URL oder ein `data:`-URI.
|
|
2688
|
+
*
|
|
2689
|
+
* Optional wie alles andere hier (R11): Ein Host, dessen Liste `thumbUrl`
|
|
2690
|
+
* schon mitbringt, braucht das nicht und lässt es weg. Ein Host, der seine
|
|
2691
|
+
* Bilder erst holen muss, bietet es an — und die Ansicht ruft es dann nur
|
|
2692
|
+
* für die Kacheln, die sie wirklich zeigt. Genau daran hängt, dass sich der
|
|
2693
|
+
* Wähler nicht beim Öffnen sechzig Vollauflösungen von HF zieht; die Dateien
|
|
2694
|
+
* dort sind real 3–22 MB gross.
|
|
2695
|
+
*/
|
|
2696
|
+
loadPreview?(mediaRef: string): Promise<QueryResult<string>>;
|
|
2313
2697
|
/**
|
|
2314
2698
|
* Base64 **ohne** `data:`-Präfix und der MIME-Typ — die Modelleingabe.
|
|
2315
2699
|
*
|
|
@@ -2627,6 +3011,23 @@ interface HfImageStore {
|
|
|
2627
3011
|
putWithId(id: string, base64: string, mimeType: string, titel?: string): Promise<void>;
|
|
2628
3012
|
/** Löst eine Kennung auf. `mimeType` ist ein Hinweis, kein Zwang. */
|
|
2629
3013
|
resolve(id: string, mimeType?: string | null): Promise<AufgeloestesBild>;
|
|
3014
|
+
/**
|
|
3015
|
+
* Eine **anzeigbare** Fassung als `data:`-URI — für die Kachel, nicht für das
|
|
3016
|
+
* Modell.
|
|
3017
|
+
*
|
|
3018
|
+
* Warum getrennt von `resolve()`: Der Bestand kennt zu vielen Bildern ein
|
|
3019
|
+
* fertiges Vorschaubild unter `thumbs/<filename>` (rund 25 KB gegenüber
|
|
3020
|
+
* 3–22 MB beim Original, nachgemessen im echten Bestand am 2026-08-22).
|
|
3021
|
+
* `resolve()` darf es nicht nehmen — es füttert das Modell, und ein
|
|
3022
|
+
* heruntergerechnetes Bild wäre dort eine andere Eingabe. Die Kachel darf es
|
|
3023
|
+
* nicht nur, sie muss: Ein Wähler, der sechzig Originale zieht, ist die
|
|
3024
|
+
* Download-Lawine, die §7.1 des Auftrags verbietet.
|
|
3025
|
+
*
|
|
3026
|
+
* Kennt der Bestand keins, fällt diese Auskunft auf `resolve()` zurück —
|
|
3027
|
+
* denselben Weg mit demselben Sitzungsspeicher und demselben Retry, nicht
|
|
3028
|
+
* einen zweiten daneben.
|
|
3029
|
+
*/
|
|
3030
|
+
preview(id: string): Promise<string>;
|
|
2630
3031
|
/** Der aktuelle Bestand — Schnappschuss plus die Ereignisse danach. */
|
|
2631
3032
|
bestand(): Promise<HFStateSnapshot>;
|
|
2632
3033
|
}
|
|
@@ -2663,6 +3064,59 @@ interface CreateHfImageLibraryOptions {
|
|
|
2663
3064
|
}
|
|
2664
3065
|
declare function createHfImageLibrary(options: CreateHfImageLibraryOptions): SzenenImageLibraryPort;
|
|
2665
3066
|
|
|
3067
|
+
interface LocatorTeile {
|
|
3068
|
+
/** Der Stamm — die `item_id` des Werkes, oder der ganze Locator. */
|
|
3069
|
+
stamm: string;
|
|
3070
|
+
/** Die Position innerhalb der Galerie; `null` bei einem Einbild-Locator. */
|
|
3071
|
+
position: number | null;
|
|
3072
|
+
}
|
|
3073
|
+
/** Zerlegt einen Locator in Werk und Position, ohne etwas zu raten. */
|
|
3074
|
+
declare function locatorTeile(mediaRef: string): LocatorTeile;
|
|
3075
|
+
/** Ein Bild, wie es aus dem Bestand kommt, plus das, was die Ordnung braucht. */
|
|
3076
|
+
interface GruppierbaresBild extends LibraryImage {
|
|
3077
|
+
/**
|
|
3078
|
+
* Der Zeitpunkt, an dem das Bild in den Bestand kam. Er ordnet die **Werke**
|
|
3079
|
+
* untereinander; innerhalb eines Werkes ordnet die Locator-Position, damit
|
|
3080
|
+
* „Bild 3" morgen dasselbe Bild ist wie heute.
|
|
3081
|
+
*/
|
|
3082
|
+
timestamp?: number;
|
|
3083
|
+
/**
|
|
3084
|
+
* Ein menschenlesbarer Werktitel, falls der Bestand einen kennt. Fehlt er,
|
|
3085
|
+
* gilt der Titel des ersten Bildes — und fehlt auch der, die Kennung. Ein
|
|
3086
|
+
* erfundener Name wäre schlechter als eine ehrliche UUID.
|
|
3087
|
+
*/
|
|
3088
|
+
itemTitle?: string | null;
|
|
3089
|
+
}
|
|
3090
|
+
/**
|
|
3091
|
+
* Gruppiert Bilder zu Werken.
|
|
3092
|
+
*
|
|
3093
|
+
* Reihenfolge: Werke nach ihrem jüngsten Bild absteigend — wer ein Referenzbild
|
|
3094
|
+
* sucht, sucht meist ein frisches. Bilder innerhalb eines Werkes nach ihrer
|
|
3095
|
+
* Locator-Position aufsteigend; die ist stabil, der Zeitstempel wäre es nicht.
|
|
3096
|
+
*/
|
|
3097
|
+
declare function gruppiereZuItems(bilder: readonly GruppierbaresBild[]): readonly LibraryImageItem[];
|
|
3098
|
+
|
|
3099
|
+
interface VorschauLauf {
|
|
3100
|
+
/** Wird `true`, sobald der Aufrufer das Ergebnis nicht mehr braucht. */
|
|
3101
|
+
abgebrochen: boolean;
|
|
3102
|
+
}
|
|
3103
|
+
interface LadeVorschauenOptionen {
|
|
3104
|
+
/** Wie viele Anfragen gleichzeitig laufen dürfen. */
|
|
3105
|
+
parallel?: number;
|
|
3106
|
+
/** Ob eine Quelle schon vorliegt — dann wird sie nicht erneut geholt. */
|
|
3107
|
+
hat?: (mediaRef: string) => boolean;
|
|
3108
|
+
lauf?: VorschauLauf;
|
|
3109
|
+
}
|
|
3110
|
+
/**
|
|
3111
|
+
* Lädt Vorschauen für die übergebenen Kennungen und meldet jede einzeln, sobald
|
|
3112
|
+
* sie da ist.
|
|
3113
|
+
*
|
|
3114
|
+
* Ein Fehlschlag beendet den Lauf **nicht**: Eine Kachel ohne Bild ist besser
|
|
3115
|
+
* als ein Wähler ohne Kacheln, und ob das Bild wirklich fehlt, entscheidet der
|
|
3116
|
+
* Lauf selbst über `resolveImage()`.
|
|
3117
|
+
*/
|
|
3118
|
+
declare function ladeVorschauen(port: SzenenImageLibraryPort, mediaRefs: readonly string[], fertig: (mediaRef: string, quelle: string) => void, optionen?: LadeVorschauenOptionen): Promise<void>;
|
|
3119
|
+
|
|
2666
3120
|
interface CreateMemoryViewPortOptions {
|
|
2667
3121
|
/**
|
|
2668
3122
|
* Ob der Port Items anbietet. `false` bildet Flow-Pure nach: das Feld fehlt
|
|
@@ -2680,8 +3134,24 @@ interface CreateMemoryViewPortOptions {
|
|
|
2680
3134
|
* Upload, und ein Folgelauf ohne Bild wird mit Grund abgelehnt.
|
|
2681
3135
|
*/
|
|
2682
3136
|
imageLibrary?: boolean;
|
|
2683
|
-
/**
|
|
3137
|
+
/**
|
|
3138
|
+
* Vorbelegte Bilder des Bestands — jedes für sich ein **Einbild-Werk**.
|
|
3139
|
+
*
|
|
3140
|
+
* Das ist der Normalfall eines Bestands und bleibt die knappe Schreibweise
|
|
3141
|
+
* für Tests, die die Gruppierung gar nicht brauchen. Mehrbildige Werke gehen
|
|
3142
|
+
* über `imageItems`.
|
|
3143
|
+
*/
|
|
2684
3144
|
images?: readonly LibraryImage[];
|
|
3145
|
+
/** Vorbelegte **Werke** mit ihren Galerien. */
|
|
3146
|
+
imageItems?: readonly LibraryImageItem[];
|
|
3147
|
+
/**
|
|
3148
|
+
* Ob dieser Bestand seine Vorschauen erst auf Anforderung liefert.
|
|
3149
|
+
*
|
|
3150
|
+
* `true` bildet den Flow-Host ab: `thumbUrl` bleibt leer, und die Ansicht
|
|
3151
|
+
* muss `loadPreview()` benutzen. Vorgabe ist der React-Fall — die Liste
|
|
3152
|
+
* bringt ihre Quellen mit, und `loadPreview` fehlt am Port (R11).
|
|
3153
|
+
*/
|
|
3154
|
+
imagePreviewLazy?: boolean;
|
|
2685
3155
|
/**
|
|
2686
3156
|
* Ob der Port die Rekonstruktion anbietet (Stufe 6.5).
|
|
2687
3157
|
*
|
|
@@ -2878,6 +3348,14 @@ interface PromptRunPersistencePort {
|
|
|
2878
3348
|
* unverändert.
|
|
2879
3349
|
*/
|
|
2880
3350
|
listForChain(chainId: string): Promise<QueryResult<readonly PromptRunRecord[]>>;
|
|
3351
|
+
/**
|
|
3352
|
+
* Die Läufe einer Szene, die direkt aus ihr entstanden sind — D-135.
|
|
3353
|
+
*
|
|
3354
|
+
* Ein solcher Lauf hat weder Shot-Version noch `chain_id`; ohne eigene
|
|
3355
|
+
* Abfrage waere er nach einem Reload verschwunden, obwohl er bezahlt wurde
|
|
3356
|
+
* (derselbe Befund wie D-102/A1 bei der Kette).
|
|
3357
|
+
*/
|
|
3358
|
+
listForScene(sceneElementId: string): Promise<QueryResult<readonly PromptRunRecord[]>>;
|
|
2881
3359
|
}
|
|
2882
3360
|
/** Was der Eventlog-Adapter vom Kanal braucht — lesen und anhängen. */
|
|
2883
3361
|
interface RunEventChannel {
|
|
@@ -3266,4 +3744,4 @@ interface SzenenViewProps {
|
|
|
3266
3744
|
}
|
|
3267
3745
|
declare const SzenenView: React__default.FC<SzenenViewProps>;
|
|
3268
3746
|
|
|
3269
|
-
export { type AttachLibraryItemInput, type AttachLibraryItemResult, AuthoritativeSzenenStore, CATALOGUE_TYPES, CapabilityAnchorError, type CapabilityFlag, type CapabilityReason, type CapabilityReport, type CapabilityReportInput, type CapabilityScope, type CapabilityState, type ChainQueries, type ClientDerivationChannel, type ClientDerivationStore, ContextChainPort, type CreateBrowserTextGenerationPortOptions, type CreateClientDerivationPortOptions, type CreateClientRunPortOptions, type CreateFlowSzenenViewPortOptions, type CreateHfElementStoreOptions, type CreateHfEventChannelOptions, type CreateHfImageBatchHistoryOptions, type CreateHfImageBatchPersistenceOptions, type CreateImageGenerationPortOptions, type CreateMemoryViewPortOptions, DerivableType, DerivationAssessment, DerivationConflict, DerivationDiagnostic, DerivationFailure, DerivationImage, DerivationInputMode, type DeriveItemInput, type DerivedItem, type DerivedLineage, type DerivedRelationship, type DerivedSzenenReference, type DifferentialResult, type DifferentialStep, type Divergence, DraftChainMeta, ELEMENT_VERSION_SCHEMA_FILE, type ElementEvent, type ElementEventChannel, ElementSnapshot, type ElementStoreState, type ExecutableImageModel, type ExecutionTargetModel, type ExistingSzenenItem, FLOW_EXECUTION_PATH, type FlowGenerateImage, type FlowGenerateImageParams, FlowGenerateText, type FreezeDraftChainInput, type FreezeFailure, type FreezeResult, type FreezeSuccess, type FrozenChainNode, type GeneratedImage, type HfImageStore, type HfImageStoreOptions, type IdFactory, type ImageBatchPersistedImage, type ImageBatchPersistedPayload, type ImageExecutionProfile, type ImageExecutionTargetModelReader, type ImageGenerationBatchPersistence, type ImageGenerationEventChannel, type ImageGenerationFinishedPayload, type ImageGenerationOrder, type ImageGenerationProviderPort, type ImageGenerationResult, type ImageGenerationRunReader, type ImageGenerationStartedPayload, type ImageHostCapability, type ImageModelChoice, type ImageModelParameters, ImageProvenance, type ImageProviderInput, type ImportBatchImageInput, type ImportBatchInput, type InMemoryEventChannel, type InputError, type IntegrityVerdict, type ItemDerivationFailure, type ItemDerivationFailureClass, type ItemDerivationResult, type ItemMedium, type LibraryImage, type NodeContribution, NotDerivable, type Notice, type NoticeTone, type PromptBatchImageRef, type PromptImageBatch, type PromptRunOutcome, type PromptRunOutput, type PromptRunPersistencePort, type PromptRunRecord, type PromptRunRecordedPayload, type ProviderCheckRecord, type ProviderCheckRecordedPayload, type ProviderCheckResult, PublishCheckResult, PublishFinding, RULES_WITHOUT_CAPABILITY_EFFECT, RULE_SCOPES, type RawSchema, type RecordedDerivationInput, type RecordedProposal, type RecoveryStatus, type ReducerFinding, ReferenceResolver, type RendererInput, type ResolveFailure, type ResolveResult, type ResolveShotInput, type ResolveShotPayloadInput, ResolveTechnicalError, type ResolvedCamera, type ResolvedNode, type ResolvedPlacement, type RunEventChannel, type RunFailure, type RunFailureClass, type RunItemReference, SZENEN_EVENT_PREFIX, SZENEN_EVENT_TYPES, SZENEN_ITEM_PREFIX, SZENEN_SCHEMAS, type SaveRunAsItemInput, type SceneDerivationPersistencePort, type SceneDerivationRecord, type SceneDerivationRecordedPayload, type SceneDerivationRecoveryRecord, type SceneDerivationRecoveryRecordedPayload, SchemaError, type SelectableTargetModel, type StartImageGenerationInput, type StartRunInput, type StepState, type SzenenArea, type SzenenAreaId, type SzenenBatchOrigin, type SzenenBatchOriginFailure, type SzenenBatchOriginVerdict, SzenenCommands, SzenenElementStore, SzenenElementType, type SzenenImageBatchHistoryPort, type SzenenImageBatchWritePort, type SzenenImageGenerationPort as SzenenImageGenerationPortContract, type SzenenImageLibraryPort, type SzenenItemPort, type SzenenMediaPort, SzenenQueries, type SzenenRunPort, SzenenView, type SzenenViewCapabilities, type SzenenViewPort, type SzenenViewProps, TargetModelResolution, TextGenerationPort, UNCHECKED_PUBLISH_RULES, type UnselectableTargetModel, UnusableProposal, type VersionMedium, type VisibilityNode, areasFor, batchesForPromptRun, bildPfad, buildSystemInstruction, buildUserPrompt, callOptional, capabilitiesOf, capabilityGate, capabilityReport, catalogueFor, checkCreateElementInput, checkElementType, checkImageExecutionProfile, checkImageModelParameters, checkOptionalId, checkParents, checkPayloadPresent, checkPromptRunRecord, checkPublishVersionInput, checkRequiredId, checkReviseMetadataInput, checkRevision, checkRunResponse, checkSceneDerivationRecord, checkSceneDerivationRecoveryRecord, checkSetPreferredHeadInput, checkSzenenBatchOrigin, checkTitle, checkWriteDraftInput, collectImageBatches, collectImageGenerationOrders, collectPromptRuns, collectProviderChecks, collectSceneDerivationRecoveries, collectSceneDerivations, createBrowserTextGenerationPort, createClientDerivationPort, createClientRunPort, createEventLogDerivationPersistence, createEventLogRunPersistence, createFlowImageProvider, createFlowSzenenViewPort, createHfElementStore, createHfEventChannel, createHfImageBatchHistory, createHfImageBatchWrite, createHfImageGenerationBatchPersistence, createHfImageLibrary, createHfImageStore, createImageGenerationPort, createInMemoryEventChannel, createMemoryViewPort, derivationPoliciesOf, deriveItemFromRun, deriveLineage, differentialSteps, draftRevisionOf, executableImageModels, findExecutableImageModel, findImageBatch, findImageGenerationOrder, findPromptRun, findProviderCheck, findSceneDerivation, findSceneDerivationRecovery, firstError, freezeDraftChain, hasPlacementCapability, isKnownElementType, isSzenenItemId, itemIdForRun, logRevisionOf, mergeSzenenBatchOrigin, noticeFor, ordersForPromptRun, parseRunResponse, preferredHeadRevisionOf, publishedHeadsOf, recoveriesForRun, recoveryStatusOf, reduceElementEvents, resolveArea, resolveShot, resolveShotPayload, roundOfRun, runPromptDerivation, runStoreDifferential, scopeOfPath, selectableTargetModels, totalModelCalls, typAusBytes, unclassifiedPublishRules, unsupportedReason };
|
|
3747
|
+
export { type AttachLibraryItemInput, type AttachLibraryItemResult, AuthoritativeSzenenStore, CATALOGUE_TYPES, CapabilityAnchorError, type CapabilityFlag, type CapabilityFlagName, type CapabilityReason, type CapabilityReport, type CapabilityReportInput, type CapabilityScope, type CapabilityState, type ChainQueries, type ClientDerivationChannel, type ClientDerivationStore, ContextChainPort, type CreateBrowserTextGenerationPortOptions, type CreateClientDerivationPortOptions, type CreateClientRunPortOptions, type CreateFlowSzenenViewPortOptions, type CreateHfElementStoreOptions, type CreateHfEventChannelOptions, type CreateHfImageBatchHistoryOptions, type CreateHfImageBatchPersistenceOptions, type CreateImageGenerationPortOptions, type CreateMemoryViewPortOptions, DerivableType, DerivationAssessment, DerivationConflict, DerivationDiagnostic, DerivationFailure, DerivationImage, DerivationInputMode, type DeriveItemInput, type DerivedItem, type DerivedLineage, type DerivedRelationship, type DerivedSzenenReference, type DifferentialResult, type DifferentialStep, type Divergence, DraftChainMeta, ELEMENT_VERSION_SCHEMA_FILE, type ElementEvent, type ElementEventChannel, ElementSnapshot, type ElementStoreState, type ExecutableImageModel, type ExecutionTargetModel, type ExistingSzenenItem, FLOW_EXECUTION_PATH, type FlowGenerateImage, type FlowGenerateImageParams, FlowGenerateText, type FreezeDraftChainInput, type FreezeFailure, type FreezeResult, type FreezeSceneResult, type FreezeSceneSuccess, type FreezeSceneWorkingStateInput, type FreezeSuccess, type FrozenChainNode, type FrozenSceneState, type GeneratedImage, type GruppierbaresBild, type HfImageStore, type HfImageStoreOptions, type IdFactory, type ImageBatchPersistedImage, type ImageBatchPersistedPayload, type ImageExecutionProfile, type ImageExecutionRoute, type ImageExecutionTargetModelReader, type ImageGenerationBatchPersistence, type ImageGenerationEventChannel, type ImageGenerationFinishedPayload, type ImageGenerationOrder, type ImageGenerationProviderPort, type ImageGenerationResult, type ImageGenerationRunReader, type ImageGenerationStartedPayload, type ImageHostCapability, type ImageModelChoice, type ImageModelParameters, ImageProvenance, type ImageProviderInput, type ImportBatchImageInput, type ImportBatchInput, type InMemoryEventChannel, type InputError, type IntegrityVerdict, type ItemDerivationFailure, type ItemDerivationFailureClass, type ItemDerivationResult, type ItemMedium, type LibraryImage, type LibraryImageItem, type NodeContribution, NotDerivable, type Notice, type NoticeTone, PROMPT_RULE_EFFECT, type PromptBatchImageRef, type PromptDiagnostic, type PromptEffect, type PromptImageBatch, type PromptRunOutcome, type PromptRunOutput, type PromptRunPersistencePort, type PromptRunRecord, type PromptRunRecordedPayload, type ProviderCheckRecord, type ProviderCheckRecordedPayload, type ProviderCheckResult, PublishCheckResult, PublishFinding, RULES_WITHOUT_CAPABILITY_EFFECT, RULE_SCOPES, type RawSchema, type RecordedDerivationInput, type RecordedProposal, type RecoveryStatus, type ReducerFinding, ReferenceResolver, type RendererInput, type ResolveFailure, type ResolveResult, type ResolveScenePayloadInput, type ResolveShotInput, type ResolveShotPayloadInput, ResolveTechnicalError, type ResolvedCamera, type ResolvedNode, type ResolvedPlacement, type RunEventChannel, type RunFailure, type RunFailureClass, type RunItemReference, SZENEN_EVENT_PREFIX, SZENEN_EVENT_TYPES, SZENEN_ITEM_PREFIX, SZENEN_SCHEMAS, type SaveRunAsItemInput, type SceneDerivationPersistencePort, type SceneDerivationRecord, type SceneDerivationRecordedPayload, type SceneDerivationRecoveryRecord, type SceneDerivationRecoveryRecordedPayload, SchemaError, type SelectableTargetModel, type StartImageGenerationInput, type StartRunFromSceneInput, type StartRunInput, type StepState, type SzenenArea, type SzenenAreaId, type SzenenBatchOrigin, type SzenenBatchOriginFailure, type SzenenBatchOriginVerdict, SzenenCommands, SzenenElementStore, SzenenElementType, type SzenenImageBatchHistoryPort, type SzenenImageBatchWritePort, type SzenenImageGenerationPort as SzenenImageGenerationPortContract, type SzenenImageLibraryPort, type SzenenItemPort, type SzenenMediaPort, SzenenQueries, type SzenenRunPort, SzenenView, type SzenenViewCapabilities, type SzenenViewPort, type SzenenViewProps, TargetModelResolution, TextGenerationPort, UNCHECKED_PUBLISH_RULES, type UnselectableTargetModel, UnusableProposal, type VersionMedium, type VisibilityNode, areasFor, batchesForPromptRun, bildPfad, buildSystemInstruction, buildUserPrompt, callOptional, capabilitiesOf, capabilityGate, capabilityReport, catalogueFor, checkCreateElementInput, checkElementType, checkImageExecutionProfile, checkImageExecutionProfiles, checkImageModelParameters, checkOptionalId, checkParents, checkPayloadPresent, checkPromptRunRecord, checkPublishVersionInput, checkRequiredId, checkReviseMetadataInput, checkRevision, checkRunResponse, checkSceneDerivationRecord, checkSceneDerivationRecoveryRecord, checkSetPreferredHeadInput, checkSzenenBatchOrigin, checkTitle, checkWriteDraftInput, collectImageBatches, collectImageGenerationOrders, collectPromptRuns, collectProviderChecks, collectSceneDerivationRecoveries, collectSceneDerivations, createBrowserTextGenerationPort, createClientDerivationPort, createClientRunPort, createEventLogDerivationPersistence, createEventLogRunPersistence, createFlowImageProvider, createFlowSzenenViewPort, createHfElementStore, createHfEventChannel, createHfImageBatchHistory, createHfImageBatchWrite, createHfImageGenerationBatchPersistence, createHfImageLibrary, createHfImageStore, createImageGenerationPort, createInMemoryEventChannel, createMemoryViewPort, derivationPoliciesOf, deriveItemFromRun, deriveLineage, describableContent, diagnosticOfFinding, diagnosticOfSchemaError, differentialSteps, draftRevisionOf, executableImageModels, findExecutableImageModel, findImageBatch, findImageGenerationOrder, findPromptRun, findProviderCheck, findSceneDerivation, findSceneDerivationRecovery, firstError, freezeDraftChain, freezeSceneWorkingState, gruppiereZuItems, hasPlacementCapability, isKnownElementType, isSzenenItemId, itemIdForRun, ladeVorschauen, locatorTeile, logRevisionOf, mergeSzenenBatchOrigin, noticeFor, ordersForPromptRun, parseRunResponse, preferredHeadRevisionOf, promptDiagnosticsOf, publishedHeadsOf, recoveriesForRun, recoveryStatusOf, reduceElementEvents, resolveArea, resolveScenePayload, resolveShot, resolveShotPayload, roundOfRun, rulesWithoutPromptEffect, runPromptDerivation, runStoreDifferential, sceneOnlyCapabilities, scopeOfPath, selectableTargetModels, totalModelCalls, typAusBytes, unclassifiedPublishRules, unsupportedReason };
|