@rslsp1/fa-app-tools 2.0.87 → 4.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-ZVHEHQ7A.mjs → chunk-566GHYAT.mjs} +4442 -1635
- package/dist/{chunk-43TWCAG5.mjs → chunk-C5CGSPP3.mjs} +42 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4954 -2191
- package/dist/index.mjs +9 -5
- package/dist/{storeContract-B2BDgvhN.d.mts → storeContract-5vApx6VA.d.mts} +16 -0
- package/dist/{storeContract-D7vBM8nv.d.ts → storeContract-DNggXiZl.d.ts} +16 -0
- package/dist/szenen-contract.d.mts +1 -1
- package/dist/szenen-contract.d.ts +1 -1
- package/dist/szenen-contract.js +42 -3
- package/dist/szenen-contract.mjs +1 -1
- package/dist/szenen.d.mts +660 -79
- package/dist/szenen.d.ts +660 -79
- package/dist/szenen.js +4465 -1502
- package/dist/szenen.mjs +164 -35
- package/package.json +1 -1
package/dist/szenen.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
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-5vApx6VA.mjs';
|
|
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-5vApx6VA.mjs';
|
|
3
3
|
import { T as TextGenerationPort, Q as QueryResult, C as CommandResult } from './contracts-DdYOMBl9.mjs';
|
|
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.mjs';
|
|
5
5
|
import { g as HFStateSnapshot, F as FlowGenerateText } from './hfEventTypes-Dkfrcd_t.mjs';
|
|
@@ -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.
|
|
@@ -1391,6 +1664,49 @@ interface ImageGenerationStartedPayload {
|
|
|
1391
1664
|
aspect_ratio?: string;
|
|
1392
1665
|
seeds?: readonly number[];
|
|
1393
1666
|
callable_model_id: string;
|
|
1667
|
+
/**
|
|
1668
|
+
* Der Anbieter des ausgefuehrten Modells (D-132) — `google`, nicht `flow`.
|
|
1669
|
+
* Flow ist eine Umgebung, kein Anbieter.
|
|
1670
|
+
*
|
|
1671
|
+
* Optional, und das ist keine Nachlaessigkeit: Auftraege aus der Zeit vor
|
|
1672
|
+
* D-128 tragen das Feld nicht, und die Projektion darf es fuer sie nicht
|
|
1673
|
+
* erfinden (D-107).
|
|
1674
|
+
*/
|
|
1675
|
+
provider?: string;
|
|
1676
|
+
/** Das Zielmodell, mit dem die Pixel erzeugt wurden (D-131). */
|
|
1677
|
+
execution_target_model_key?: string;
|
|
1678
|
+
/** Dessen wirksame Version, sofern bekannt — nichts wird erfunden. */
|
|
1679
|
+
execution_target_model_version_id?: string;
|
|
1680
|
+
/** Das Ausfuehrungsprofil dieses Zielmodells, das gegolten hat. */
|
|
1681
|
+
execution_profile_id?: string;
|
|
1682
|
+
/** Die App-Umgebung, in der ausgefuehrt wurde (D-132). */
|
|
1683
|
+
environment_id?: string;
|
|
1684
|
+
/** Der technische Aufrufweg des Hosts. */
|
|
1685
|
+
execution_path?: string;
|
|
1686
|
+
/**
|
|
1687
|
+
* Exakt der Modellwert, mit dem der Aufrufweg gestartet wurde. Fuehrt
|
|
1688
|
+
* denselben Wert wie `callable_model_id`; letzteres bleibt, weil
|
|
1689
|
+
* Altauftraege und der Server es tragen.
|
|
1690
|
+
*/
|
|
1691
|
+
execution_model_id?: string;
|
|
1692
|
+
/**
|
|
1693
|
+
* Das Zielmodell, fuer das der Prompt formuliert wurde, oder `null`.
|
|
1694
|
+
* Zusammen mit `target_model_matched` bleibt die Abweichung
|
|
1695
|
+
* „optimiert fuer X, ausgefuehrt mit Y" dauerhaft nachvollziehbar (D-131).
|
|
1696
|
+
*/
|
|
1697
|
+
prompt_target_model_key?: string | null;
|
|
1698
|
+
/**
|
|
1699
|
+
* Ob das ausgefuehrte Zielmodell das Prompt-Zielmodell war. Getrennt vom
|
|
1700
|
+
* Schluessel, damit ein Leser die Abweichung nicht aus zwei verschiedenen
|
|
1701
|
+
* Kennungen erraten muss. Fehlt das Feld, ist **keine** Aussage getroffen.
|
|
1702
|
+
*/
|
|
1703
|
+
target_model_matched?: boolean;
|
|
1704
|
+
/**
|
|
1705
|
+
* Ob der negative Promptkanal wirklich mitgelaufen ist (D-130 §9) — nicht,
|
|
1706
|
+
* ob der Lauf einen traegt. Fehlt das Feld, kennt der Auftrag die Frage
|
|
1707
|
+
* nicht.
|
|
1708
|
+
*/
|
|
1709
|
+
negative_prompt_transmitted?: boolean;
|
|
1394
1710
|
};
|
|
1395
1711
|
created_at: string;
|
|
1396
1712
|
}
|
|
@@ -1649,45 +1965,162 @@ declare function differentialSteps(): readonly DifferentialStep[];
|
|
|
1649
1965
|
*/
|
|
1650
1966
|
declare function runStoreDifferential(left: () => Promise<SzenenElementStore> | SzenenElementStore, right: () => Promise<SzenenElementStore> | SzenenElementStore): Promise<DifferentialResult>;
|
|
1651
1967
|
|
|
1652
|
-
/**
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1968
|
+
/**
|
|
1969
|
+
* Ein Ausführungsprofil eines Zielmodells (D-130) — wie ein konkreter Host
|
|
1970
|
+
* dieses Modell wirklich aufruft.
|
|
1971
|
+
*/
|
|
1972
|
+
interface ImageExecutionProfile {
|
|
1973
|
+
/** Stabile Kennung **innerhalb** dieses Zielmodells. */
|
|
1974
|
+
profile_id: string;
|
|
1975
|
+
/** Auswählbar, oder bewusst abgeschaltet. */
|
|
1976
|
+
enabled: boolean;
|
|
1977
|
+
/** Umgebungen, in denen dieses Profil gilt. */
|
|
1978
|
+
environments: readonly string[];
|
|
1979
|
+
/** Der technische Aufrufweg, den der Host besitzen muss. */
|
|
1980
|
+
execution_path: string;
|
|
1981
|
+
/**
|
|
1982
|
+
* Exakt der Modellwert, den der vorhandene Aufrufweg als Eingabe erwartet
|
|
1983
|
+
* (D-132) — nicht zwingend die offizielle Endpunkt-ID des Anbieters. Was
|
|
1984
|
+
* hier steht, geht unverändert an den Adapter und in die Provenienz.
|
|
1985
|
+
*/
|
|
1986
|
+
execution_model_id: string;
|
|
1656
1987
|
max_images: number;
|
|
1988
|
+
/** Vom konkreten Pfad übertragene Seitenverhältnisse. Darf leer sein. */
|
|
1657
1989
|
aspect_ratios: readonly string[];
|
|
1658
|
-
|
|
1990
|
+
/** Ob ein Seed über diesen Pfad wirklich übertragen wird. */
|
|
1991
|
+
accepts_seed: boolean;
|
|
1992
|
+
/** Ob ein separater negativer Prompt wirklich übertragen wird. */
|
|
1993
|
+
accepts_negative_prompt: boolean;
|
|
1994
|
+
}
|
|
1995
|
+
/**
|
|
1996
|
+
* Was **dieser Host** kann (D-132).
|
|
1997
|
+
*
|
|
1998
|
+
* Bewusst nur zwei Angaben: in welcher Umgebung er läuft und welche Aufrufwege
|
|
1999
|
+
* er besitzt. Keine Modellliste — die kommt aus den Zielmodellen.
|
|
2000
|
+
*/
|
|
2001
|
+
interface ImageHostCapability {
|
|
2002
|
+
environment_id: string;
|
|
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;
|
|
1659
2019
|
}
|
|
1660
|
-
/**
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
2020
|
+
/** Ein Zielmodell, so wie die Auswahl es braucht. */
|
|
2021
|
+
interface ExecutionTargetModel {
|
|
2022
|
+
key: string;
|
|
2023
|
+
title: string;
|
|
2024
|
+
provider: string | null;
|
|
2025
|
+
/** Die wirksame Version, aus der die Profile stammen — für die Provenienz. */
|
|
2026
|
+
versionId?: string;
|
|
2027
|
+
/** Roh aus der Payload; wird hier gegen den Vertrag geprüft. */
|
|
2028
|
+
executionProfiles: readonly unknown[];
|
|
2029
|
+
}
|
|
2030
|
+
/** Eine wirklich ausführbare Kombination aus Zielmodell und Profil. */
|
|
2031
|
+
interface ExecutableImageModel {
|
|
2032
|
+
/** Kennung der Auswahl: Zielmodell **und** Profil, weil beides zählt. */
|
|
2033
|
+
selection_id: string;
|
|
1665
2034
|
target_model_key: string;
|
|
2035
|
+
target_model_version_id?: string;
|
|
2036
|
+
display_name: string;
|
|
1666
2037
|
provider: string;
|
|
1667
|
-
|
|
2038
|
+
profile_id: string;
|
|
2039
|
+
environment_id: string;
|
|
2040
|
+
execution_path: string;
|
|
2041
|
+
execution_model_id: string;
|
|
1668
2042
|
max_images: number;
|
|
1669
2043
|
aspect_ratios: readonly string[];
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
};
|
|
2044
|
+
accepts_seed: boolean;
|
|
2045
|
+
accepts_negative_prompt: boolean;
|
|
2046
|
+
/** Ob dieses Zielmodell das ist, für das der Prompt optimiert wurde (D-131). */
|
|
2047
|
+
is_prompt_target: boolean;
|
|
2048
|
+
}
|
|
1676
2049
|
/**
|
|
1677
|
-
*
|
|
1678
|
-
*
|
|
1679
|
-
*
|
|
2050
|
+
* Die Modellwahl für einen Lauf in einer konkreten Umgebung.
|
|
2051
|
+
*
|
|
2052
|
+
* `models` ist leer, wenn kein Zielmodell dieser Umgebung ein aktives,
|
|
2053
|
+
* vom Host ausführbares Profil trägt. Das ist kein Fehler und sperrt den Lauf
|
|
2054
|
+
* nicht — der externe Importpfad bleibt daneben stehen (D-104.5/D-133).
|
|
1680
2055
|
*/
|
|
1681
|
-
|
|
2056
|
+
interface ImageModelChoice {
|
|
2057
|
+
/** Das Zielmodell, für das der Prompt erzeugt wurde, oder `null` (D-103). */
|
|
2058
|
+
prompt_target_model_key: string | null;
|
|
2059
|
+
models: readonly ExecutableImageModel[];
|
|
2060
|
+
/**
|
|
2061
|
+
* Die Vorauswahl: das Profil des Prompt-Zielmodells, sonst das erste
|
|
2062
|
+
* ausführbare. `null` bei leerer Liste. Komfort, keine Festlegung (D-131).
|
|
2063
|
+
*/
|
|
2064
|
+
default_selection_id: string | null;
|
|
2065
|
+
/** Nur gesetzt, wenn `models` leer ist: warum es hier nichts zu wählen gibt. */
|
|
2066
|
+
reason?: string;
|
|
2067
|
+
/**
|
|
2068
|
+
* Profile, die den Vertrag verletzen — als Klartext, je Zielmodell.
|
|
2069
|
+
*
|
|
2070
|
+
* Sie werden **nicht** angeboten und **nicht** stillschweigend weggelassen:
|
|
2071
|
+
* Ein falsch gepflegtes Profil soll sichtbar sein, sonst sucht der Autor die
|
|
2072
|
+
* Ursache im Host (Regel 4/11).
|
|
2073
|
+
*/
|
|
2074
|
+
invalid_profiles: readonly string[];
|
|
2075
|
+
}
|
|
1682
2076
|
/**
|
|
1683
|
-
*
|
|
1684
|
-
* der Zugangsauskunft des Hosts entsteht `supported` oder `unsupported`.
|
|
2077
|
+
* Prüft ein rohes Profil gegen den Vertrag und liefert die Befunde als Klartext.
|
|
1685
2078
|
*
|
|
1686
|
-
*
|
|
1687
|
-
*
|
|
1688
|
-
* externen Importpfad (Teil D).
|
|
2079
|
+
* Exportiert, weil der Zielmodell-Editor dieselbe Prüfung vor dem Speichern
|
|
2080
|
+
* zeigen soll — eine Regel, eine Stelle.
|
|
1689
2081
|
*/
|
|
1690
|
-
declare function
|
|
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[])[];
|
|
2098
|
+
/**
|
|
2099
|
+
* Alle Bildmodelle, die dieser Host für diesen Lauf wirklich ausführen kann.
|
|
2100
|
+
*
|
|
2101
|
+
* Fünf Bedingungen, alle notwendig (D-130/D-132): Das Profil ist gültig, es ist
|
|
2102
|
+
* aktiviert, es gilt für die Umgebung dieses Hosts, der Host besitzt den
|
|
2103
|
+
* genannten Aufrufweg — und das Zielmodell trägt überhaupt ein Profil.
|
|
2104
|
+
*/
|
|
2105
|
+
declare function executableImageModels(promptTargetModelKey: string | null, targets: readonly ExecutionTargetModel[], capability: ImageHostCapability): ImageModelChoice;
|
|
2106
|
+
/** Eine Kombination aus einer Wahl, exakt über Zielmodell und Profil. */
|
|
2107
|
+
declare function findExecutableImageModel(choice: ImageModelChoice, targetModelKey: string, profileId: string): ExecutableImageModel | null;
|
|
2108
|
+
/** Die Parameter eines Bildauftrags, wie sie gegen ein Profil geprüft werden. */
|
|
2109
|
+
interface ImageModelParameters {
|
|
2110
|
+
imageCount: number;
|
|
2111
|
+
aspectRatio?: string;
|
|
2112
|
+
seeds?: readonly number[];
|
|
2113
|
+
}
|
|
2114
|
+
/**
|
|
2115
|
+
* Prüft Auftragsparameter gegen das **tatsächlich gewählte** Ausführungsprofil
|
|
2116
|
+
* (D-131) und liefert die Befunde als Klartext.
|
|
2117
|
+
*
|
|
2118
|
+
* Kein stilles Kürzen, kein Umrechnen: Ein Seitenverhältnis, das dieser
|
|
2119
|
+
* Aufrufweg nicht überträgt, wird abgelehnt und nicht auf das nächstliegende
|
|
2120
|
+
* gerundet (Regel 4). Die Meldungen nennen den konkreten Wert und die zulässige
|
|
2121
|
+
* Menge (Regel 11).
|
|
2122
|
+
*/
|
|
2123
|
+
declare function checkImageModelParameters(model: ExecutableImageModel, parameters: ImageModelParameters): readonly string[];
|
|
1691
2124
|
|
|
1692
2125
|
/** Ein tatsächlich vom Provider geliefertes Bild. */
|
|
1693
2126
|
interface GeneratedImage {
|
|
@@ -1700,7 +2133,18 @@ interface GeneratedImage {
|
|
|
1700
2133
|
}
|
|
1701
2134
|
/** Die Eingabe an den tatsächlichen Provideraufruf — abgeleitet aus dem eingefrorenen Lauf. */
|
|
1702
2135
|
interface ImageProviderInput {
|
|
1703
|
-
|
|
2136
|
+
/** Das Zielmodell, mit dem ausgeführt wird — die fachliche Kennung (D-131). */
|
|
2137
|
+
targetModelKey: string;
|
|
2138
|
+
/** Der Aufrufweg aus dem gewählten Profil; der Adapter prüft, ob er ihn hat. */
|
|
2139
|
+
executionPath: string;
|
|
2140
|
+
/**
|
|
2141
|
+
* Exakt der Modellwert, den dieser Aufrufweg erwartet — aus **demselben**
|
|
2142
|
+
* Profil (D-132). Der Adapter gibt ihn unverändert weiter und hält keine
|
|
2143
|
+
* eigene Mapping-Tabelle.
|
|
2144
|
+
*/
|
|
2145
|
+
executionModelId: string;
|
|
2146
|
+
/** Die Umgebung, in der ausgeführt wird (D-132). */
|
|
2147
|
+
environmentId: string;
|
|
1704
2148
|
provider: string;
|
|
1705
2149
|
positivePrompt: string;
|
|
1706
2150
|
negativePrompt?: string | null;
|
|
@@ -1734,6 +2178,16 @@ interface ImageGenerationBatchPersistence {
|
|
|
1734
2178
|
images: readonly GeneratedImage[];
|
|
1735
2179
|
}): Promise<CommandResult<PromptImageBatch>>;
|
|
1736
2180
|
}
|
|
2181
|
+
/**
|
|
2182
|
+
* Die Zielmodelle dieses Kontexts, wie der Port sie braucht (D-130).
|
|
2183
|
+
*
|
|
2184
|
+
* Der Host liefert sie — beim React- und Flow-Host über dieselbe
|
|
2185
|
+
* `selectableTargetModels()`-Auskunft, die auch der Editor benutzt. Damit gibt
|
|
2186
|
+
* es keine zweite Wahrheit darüber, welche Zielmodelle sichtbar sind.
|
|
2187
|
+
*/
|
|
2188
|
+
interface ImageExecutionTargetModelReader {
|
|
2189
|
+
listExecutionTargetModels(): Promise<QueryResult<readonly ExecutionTargetModel[]>>;
|
|
2190
|
+
}
|
|
1737
2191
|
/** Was der Auftragskanal (D-119) braucht — lesen und anhängen, wie `RunEventChannel`. */
|
|
1738
2192
|
interface ImageGenerationEventChannel {
|
|
1739
2193
|
appendEvent(type: string, payload: unknown): Promise<void>;
|
|
@@ -1742,6 +2196,18 @@ interface StartImageGenerationInput {
|
|
|
1742
2196
|
runId: string;
|
|
1743
2197
|
/** Vom Aufrufer VOR dem Aufruf gebildet (D-113) — deterministisch mit dem Lauf verknüpft. */
|
|
1744
2198
|
generationBatchId: string;
|
|
2199
|
+
/**
|
|
2200
|
+
* Das Zielmodell, mit dem tatsächlich ausgeführt wird, und sein Profil —
|
|
2201
|
+
* **beides verpflichtend** und explizit (D-131).
|
|
2202
|
+
*
|
|
2203
|
+
* Bewusst kein optionaler Parameter mit Rückfall auf das Prompt-Zielmodell:
|
|
2204
|
+
* Ein bezahlter Bildaufruf, dessen Modell nicht in der Eingabe steht, wäre
|
|
2205
|
+
* nach dem Auftrag nicht mehr von einer Vorauswahl zu unterscheiden. Die
|
|
2206
|
+
* Vorauswahl trifft die Ansicht sichtbar aus
|
|
2207
|
+
* `ImageModelChoice.default_selection_id`, nicht der Port stillschweigend.
|
|
2208
|
+
*/
|
|
2209
|
+
executionTargetModelKey: string;
|
|
2210
|
+
executionProfileId: string;
|
|
1745
2211
|
imageCount: number;
|
|
1746
2212
|
aspectRatio?: string;
|
|
1747
2213
|
/** Je Bild, wenn das Modell Seeds kennt. */
|
|
@@ -1768,7 +2234,14 @@ type ImageGenerationResult = {
|
|
|
1768
2234
|
message: string;
|
|
1769
2235
|
};
|
|
1770
2236
|
interface SzenenImageGenerationPort {
|
|
1771
|
-
|
|
2237
|
+
/**
|
|
2238
|
+
* Alle Modelle, die **diese Umgebung** für diesen Lauf ausführen kann, mit
|
|
2239
|
+
* Vorauswahl und der sichtbaren Optimierungsabsicht (D-128/D-129).
|
|
2240
|
+
*
|
|
2241
|
+
* Die frühere `capabilityForRun()` ist entfallen: Sie beantwortete die
|
|
2242
|
+
* 1:1-Frage aus dem Domänenkatalog, den es nicht mehr gibt.
|
|
2243
|
+
*/
|
|
2244
|
+
imageModelChoiceForRun(runId: string): Promise<QueryResult<ImageModelChoice>>;
|
|
1772
2245
|
startFromPromptRun(input: StartImageGenerationInput): Promise<ImageGenerationResult>;
|
|
1773
2246
|
}
|
|
1774
2247
|
interface CreateImageGenerationPortOptions {
|
|
@@ -1776,8 +2249,14 @@ interface CreateImageGenerationPortOptions {
|
|
|
1776
2249
|
provider: ImageGenerationProviderPort;
|
|
1777
2250
|
batches: ImageGenerationBatchPersistence;
|
|
1778
2251
|
events: ImageGenerationEventChannel;
|
|
1779
|
-
/**
|
|
1780
|
-
|
|
2252
|
+
/**
|
|
2253
|
+
* Die Zielmodelle, die in diesem Kontext sichtbar sind (D-130). Ihre
|
|
2254
|
+
* `execution_profiles` sind die einzige Quelle ausführbarer Bildmodelle —
|
|
2255
|
+
* der Port konstruiert keines und errät keine Verfügbarkeit.
|
|
2256
|
+
*/
|
|
2257
|
+
targetModels: ImageExecutionTargetModelReader;
|
|
2258
|
+
/** Was dieser Host wirklich kann: Umgebung und Aufrufwege (D-132). */
|
|
2259
|
+
capability: ImageHostCapability;
|
|
1781
2260
|
now?: () => Date;
|
|
1782
2261
|
}
|
|
1783
2262
|
/** Der gemeinsame Bildgenerierungs-Port. */
|
|
@@ -1835,6 +2314,33 @@ interface SzenenRunPort {
|
|
|
1835
2314
|
* Draft-Lauf hat keine, wäre dort also unauffindbar.
|
|
1836
2315
|
*/
|
|
1837
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;
|
|
1838
2344
|
}
|
|
1839
2345
|
/**
|
|
1840
2346
|
* Warum ein Draft-Lauf nicht zustande kam — **drei** verschiedene Auskünfte.
|
|
@@ -2554,7 +3060,14 @@ interface CreateMemoryViewPortOptions {
|
|
|
2554
3060
|
/** Simulierter Provideraufruf — Voreinstellung liefert `imageCount` Bilder. */
|
|
2555
3061
|
imageProvider?: ImageGenerationProviderPort;
|
|
2556
3062
|
/** Ob der simulierte Host Zugang zum katalogisierten Zielmodell hat. Default: immer. */
|
|
2557
|
-
|
|
3063
|
+
imageCapability?: ImageHostCapability;
|
|
3064
|
+
/**
|
|
3065
|
+
* Zielmodelle fuer die Bildauswahl. Vorgabe: die `target_model`-Elemente des
|
|
3066
|
+
* Bestands ueber `selectableTargetModels()` — derselbe Weg wie im echten
|
|
3067
|
+
* Host. Direkt setzbar, damit ein Test eine Auswahl stellen kann, ohne
|
|
3068
|
+
* Elemente anzulegen.
|
|
3069
|
+
*/
|
|
3070
|
+
imageTargetModels?: readonly ExecutionTargetModel[];
|
|
2558
3071
|
}
|
|
2559
3072
|
declare function createMemoryViewPort(options?: CreateMemoryViewPortOptions): SzenenViewPort;
|
|
2560
3073
|
|
|
@@ -2569,33 +3082,8 @@ type FlowGenerateImage = (params: FlowGenerateImageParams) => Promise<{
|
|
|
2569
3082
|
base64: string;
|
|
2570
3083
|
mediaId?: string;
|
|
2571
3084
|
}>;
|
|
2572
|
-
/**
|
|
2573
|
-
|
|
2574
|
-
* Flow-Display-Namen (`howto-flow-sdk.md` — bekannt sind "🍌 Nano Banana Pro",
|
|
2575
|
-
* "🍌 Nano Banana 2", "Imagen 4").
|
|
2576
|
-
*
|
|
2577
|
-
* Der genaue String für "Nano Banana Pro" ist real belegt, nicht nur
|
|
2578
|
-
* dokumentiert: `AvatarArchitectApp.tsx`s produktive Labs-Generierung
|
|
2579
|
-
* verwendet `'🍌 Nano Banana Pro'` als Vorgabewert und reicht ihn
|
|
2580
|
-
* unverändert als `modelDisplayName` an `Flow.generate.image()` durch
|
|
2581
|
-
* (`aiHelpers.ts#buildImageGenerationOptions`).
|
|
2582
|
-
*
|
|
2583
|
-
* "Imagen 4" bleibt katalogisiert, obwohl es im Modellwähler des
|
|
2584
|
-
* Flow-„Generieren"-Tabs am 2026-08-17 ausgegraut erschien (Screenshot,
|
|
2585
|
-
* nur "Nano Banana Pro"/"Nano Banana 2" wählbar) — das kann kontoabhängig
|
|
2586
|
-
* sein. Ein Aufruf schlägt dann mit der echten Flow-Fehlermeldung fehl,
|
|
2587
|
-
* statt einen stillen Fallback zu erzeugen (D-6.9.2-3).
|
|
2588
|
-
* `imagen-3.0-generate-001` bleibt bewusst draußen: Dafür ist kein
|
|
2589
|
-
* Flow-Display-Name dokumentiert oder belegt.
|
|
2590
|
-
*/
|
|
2591
|
-
declare const FLOW_MODEL_DISPLAY_NAMES: Readonly<Record<string, string>>;
|
|
2592
|
-
/**
|
|
2593
|
-
* Ob dieser Host tatsächlich Zugang zu einem katalogisierten Bildmodell hat
|
|
2594
|
-
* (D-115) — die Vorgabe für `hasAccess` in `createFlowSzenenViewPort()`.
|
|
2595
|
-
*/
|
|
2596
|
-
declare function flowImageProviderHasAccess(model: {
|
|
2597
|
-
callable_model_id: string;
|
|
2598
|
-
}): boolean;
|
|
3085
|
+
/** Der Aufrufweg, den dieser Adapter bedient (D-132). */
|
|
3086
|
+
declare const FLOW_EXECUTION_PATH = "google_flow";
|
|
2599
3087
|
/**
|
|
2600
3088
|
* Ein Provideraufruf je Bild — dieselbe Begründung wie beim React-Adapter
|
|
2601
3089
|
* (`reactImageProvider.ts`): Das SDK kennt keinen Mehrbild-Parameter
|
|
@@ -2643,10 +3131,28 @@ interface CreateFlowSzenenViewPortOptions {
|
|
|
2643
3131
|
/** Ein fertiger Bildprovider statt des Flow-SDK — für Tests. */
|
|
2644
3132
|
imageProvider?: ImageGenerationProviderPort;
|
|
2645
3133
|
/**
|
|
2646
|
-
*
|
|
2647
|
-
*
|
|
3134
|
+
* Was dieser Host beim Bilderzeugen wirklich kann (D-132): seine Umgebung
|
|
3135
|
+
* und seine Aufrufwege. **Keine** Modellliste — welche Modelle ausführbar
|
|
3136
|
+
* sind, steht in den `execution_profiles` der Zielmodelle (D-130).
|
|
3137
|
+
*
|
|
3138
|
+
* Vorgabe: `flow` mit dem einen Weg, den `createFlowImageProvider()` bedient.
|
|
2648
3139
|
*/
|
|
2649
|
-
|
|
3140
|
+
imageCapability?: ImageHostCapability;
|
|
3141
|
+
/**
|
|
3142
|
+
* Der Arbeitskontext, über dessen Vererbungskette die Zielmodelle sichtbar
|
|
3143
|
+
* werden — als **Getter**, nicht als Wert.
|
|
3144
|
+
*
|
|
3145
|
+
* Der Grund ist der Lebenszyklus: Der React-Host baut seinen Port je Kontext
|
|
3146
|
+
* neu (`SzenenTab.tsx`), der Flow-Host hält einen Port über die ganze
|
|
3147
|
+
* Sitzung. Ein Wert hier würde den Kontext einfrieren, und ein in einem
|
|
3148
|
+
* Kontext veröffentlichtes Zielmodell wäre im Bildmodell-Wähler unsichtbar,
|
|
3149
|
+
* obwohl der Editor es zeigt. Ein Getter liest ihn bei jeder Auskunft frisch,
|
|
3150
|
+
* ohne den HF-Elementspeicher samt seiner Materialisierung (D-125) bei jedem
|
|
3151
|
+
* Kontextwechsel wegzuwerfen.
|
|
3152
|
+
*
|
|
3153
|
+
* Vorgabe: der globale Kontext.
|
|
3154
|
+
*/
|
|
3155
|
+
imageContextId?: () => string | null;
|
|
2650
3156
|
/** Kennung je abgelegtem Batch-Bild. Ersetzbar, damit ein Test nicht würfelt. */
|
|
2651
3157
|
newBatchImageId?: (generationBatchId: string, position: number) => string;
|
|
2652
3158
|
}
|
|
@@ -2702,6 +3208,14 @@ interface PromptRunPersistencePort {
|
|
|
2702
3208
|
* unverändert.
|
|
2703
3209
|
*/
|
|
2704
3210
|
listForChain(chainId: string): Promise<QueryResult<readonly PromptRunRecord[]>>;
|
|
3211
|
+
/**
|
|
3212
|
+
* Die Läufe einer Szene, die direkt aus ihr entstanden sind — D-135.
|
|
3213
|
+
*
|
|
3214
|
+
* Ein solcher Lauf hat weder Shot-Version noch `chain_id`; ohne eigene
|
|
3215
|
+
* Abfrage waere er nach einem Reload verschwunden, obwohl er bezahlt wurde
|
|
3216
|
+
* (derselbe Befund wie D-102/A1 bei der Kette).
|
|
3217
|
+
*/
|
|
3218
|
+
listForScene(sceneElementId: string): Promise<QueryResult<readonly PromptRunRecord[]>>;
|
|
2705
3219
|
}
|
|
2706
3220
|
/** Was der Eventlog-Adapter vom Kanal braucht — lesen und anhängen. */
|
|
2707
3221
|
interface RunEventChannel {
|
|
@@ -2915,6 +3429,73 @@ interface CreateClientDerivationPortOptions {
|
|
|
2915
3429
|
}
|
|
2916
3430
|
declare function createClientDerivationPort(options: CreateClientDerivationPortOptions): SzenenDerivationPort;
|
|
2917
3431
|
|
|
3432
|
+
/** Der Lesezugriff, den diese Datei braucht — mehr nicht. */
|
|
3433
|
+
type VisibilityQueries = Pick<SzenenQueries, 'listElements' | 'getElement'>;
|
|
3434
|
+
/** Ein wählbares Zielmodell — der fachliche Key und woher er kommt. */
|
|
3435
|
+
interface SelectableTargetModel {
|
|
3436
|
+
/** Der Wert, der gespeichert wird: `payload.key` (6.10 §6.4). */
|
|
3437
|
+
key: string;
|
|
3438
|
+
title: string;
|
|
3439
|
+
elementId: string;
|
|
3440
|
+
/** Die wirksame Version, aus der der Key stammt. Anzeige, nicht Speicherwert. */
|
|
3441
|
+
versionId: string;
|
|
3442
|
+
provider: string | null;
|
|
3443
|
+
/**
|
|
3444
|
+
* Die Ausfuehrungsprofile dieser wirksamen Version (D-130), roh aus der
|
|
3445
|
+
* Payload. Leer, wenn das Zielmodell keines traegt — der Normalfall fuer ein
|
|
3446
|
+
* reines Prompt-Ziel (D-133). Die Auswahl der wirklich ausfuehrbaren
|
|
3447
|
+
* Kombinationen trifft `executableImageModels()`, nicht diese Datei.
|
|
3448
|
+
*/
|
|
3449
|
+
executionProfiles: readonly unknown[];
|
|
3450
|
+
/** Glied der Kette, auf dem der Treffer lag. `0` = Arbeitskontext. */
|
|
3451
|
+
chainIndex: number;
|
|
3452
|
+
}
|
|
3453
|
+
/** Ein Kandidat, der bewusst **nicht** angeboten wird, samt Grund. */
|
|
3454
|
+
interface UnselectableTargetModel {
|
|
3455
|
+
/** Der fachliche Key, der dadurch blockiert ist. */
|
|
3456
|
+
key: string;
|
|
3457
|
+
elementId: string;
|
|
3458
|
+
title: string;
|
|
3459
|
+
reason: 'fork' | 'ambiguous';
|
|
3460
|
+
message: string;
|
|
3461
|
+
}
|
|
3462
|
+
interface TargetModelChoices {
|
|
3463
|
+
selectable: readonly SelectableTargetModel[];
|
|
3464
|
+
unselectable: readonly UnselectableTargetModel[];
|
|
3465
|
+
}
|
|
3466
|
+
/**
|
|
3467
|
+
* Die Zielmodelle, die ein Autor wählen darf — **derselbe** Kandidatensatz, den
|
|
3468
|
+
* `resolveTargetModelOver()` später akzeptiert.
|
|
3469
|
+
*
|
|
3470
|
+
* Diese Funktion bildet den Resolver Schritt für Schritt nach, und zwar
|
|
3471
|
+
* absichtlich engmaschig: Der erste Anlauf bot „alle Keys aller Versionen" an,
|
|
3472
|
+
* der zweite nur die wirksame Version je Element — beide Male wich das Ergebnis
|
|
3473
|
+
* in einem Fall vom Resolver ab, und beide Male hat es ein Review gefunden.
|
|
3474
|
+
*
|
|
3475
|
+
* Die Regeln, alle drei aus `resolveTargetModelOver()`:
|
|
3476
|
+
*
|
|
3477
|
+
* 1. **Nur die wirksame Version** liefert den Key (`matchOf` arbeitet auf der
|
|
3478
|
+
* ausgewählten Version, nicht auf „irgendeiner veröffentlichten").
|
|
3479
|
+
* 2. **Das erste Kettenglied mit einem Treffer entscheidet — und beendet die
|
|
3480
|
+
* Suche.** Auch dann, wenn der Treffer blockierend ist. Genau hier lag der
|
|
3481
|
+
* zweite Review-Befund: Ein lokaler Fork, dessen einer Head `imagen_4`
|
|
3482
|
+
* trägt, ist für `imagen_4` ein **Fork-Treffer** auf dem näheren Glied; der
|
|
3483
|
+
* Resolver endet dort mit `fork` und greift nicht auf ein globales
|
|
3484
|
+
* `imagen_4` durch. Ein Picker, der den Key nach dem Fork weiterlaufen
|
|
3485
|
+
* lässt, bietet einen Wert an, den die Auflösung ablehnt.
|
|
3486
|
+
* 3. **Mehrere Treffer auf demselben Glied sind mehrdeutig** — auch wenn einer
|
|
3487
|
+
* davon ein Fork ist (`active.length > 1`). Es wird keiner gewählt.
|
|
3488
|
+
*
|
|
3489
|
+
* Blockierte Keys verschwinden nicht stillschweigend: Sie stehen mit Grund in
|
|
3490
|
+
* `unselectable`, sonst sieht ein Zielmodell mit offener Auswahl aus wie ein
|
|
3491
|
+
* nicht vorhandenes.
|
|
3492
|
+
*
|
|
3493
|
+
* Stillgelegte Elemente beenden die Kette **nicht** — der Resolver führt sie als
|
|
3494
|
+
* `shadowedRetired` und sucht weiter (E-7). Sie erscheinen hier gar nicht, weil
|
|
3495
|
+
* `listElements` sie ohne `includeRetired` nicht liefert.
|
|
3496
|
+
*/
|
|
3497
|
+
declare function selectableTargetModels(queries: VisibilityQueries, contextChain: readonly (string | null)[]): Promise<QueryResult<TargetModelChoices>>;
|
|
3498
|
+
|
|
2918
3499
|
interface CreateHfImageBatchPersistenceOptions {
|
|
2919
3500
|
namespace: string;
|
|
2920
3501
|
token: string;
|
|
@@ -3023,4 +3604,4 @@ interface SzenenViewProps {
|
|
|
3023
3604
|
}
|
|
3024
3605
|
declare const SzenenView: React__default.FC<SzenenViewProps>;
|
|
3025
3606
|
|
|
3026
|
-
export { type AttachLibraryItemInput, type AttachLibraryItemResult, AuthoritativeSzenenStore, CATALOGUE_TYPES,
|
|
3607
|
+
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 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 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, hasPlacementCapability, isKnownElementType, isSzenenItemId, itemIdForRun, 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 };
|