@rslsp1/fa-app-tools 7.4.0 → 9.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/szenen.d.ts CHANGED
@@ -656,6 +656,118 @@ declare function sceneOnlyCapabilities(scenePayload: unknown): {
656
656
  can_place: CapabilityFlag;
657
657
  };
658
658
 
659
+ /** Der einzige Subtyp, der in diesem Schritt automatisch gilt (Auftrag §1). */
660
+ declare const GENERAL_POLICY_SUBTYPE = "general";
661
+ /**
662
+ * Eine automatisch aufgeloeste Policy — mit vollstaendiger Provenienz (D-22).
663
+ *
664
+ * `chain_index` ist **nicht** Teil des `RendererInput`: Er ordnet, er ist kein
665
+ * Herkunftsnachweis der Regel. Die entstandene Reihenfolge friert der Lauf
666
+ * ohnehin woertlich ein.
667
+ */
668
+ interface ResolvedScenePolicy {
669
+ element_id: string;
670
+ version_id: string;
671
+ subtype: string;
672
+ rank: number;
673
+ text: string;
674
+ locale: string | null;
675
+ /** Glied der Kontextkette, auf dem das Element liegt. `0` = Arbeitskontext. */
676
+ chain_index: number;
677
+ }
678
+ /**
679
+ * Das Ergebnis der Aufloesung — drei Ausgaenge, drei Sachverhalte.
680
+ *
681
+ * `rejected` ist fachlich (ein Fork, ueber den jemand entscheiden muss),
682
+ * `error` technisch bzw. ein Datenfehler. Sie zusammenzulegen hiesse, einen
683
+ * Speicherdefekt als Normalzustand anzuzeigen.
684
+ */
685
+ type ScenePolicyResult = {
686
+ kind: 'ok';
687
+ policies: readonly ResolvedScenePolicy[];
688
+ } | {
689
+ kind: 'rejected';
690
+ message: string;
691
+ element_id: string;
692
+ heads: readonly string[];
693
+ } | {
694
+ kind: 'error';
695
+ message: string;
696
+ retryable: boolean;
697
+ };
698
+ /** Ein Lesevorgang der Momentaufnahme, so schmal wie moeglich beschrieben. */
699
+ interface SnapshotRead<T> {
700
+ kind: string;
701
+ message?: string;
702
+ value?: T;
703
+ }
704
+ /** Der Ausschnitt einer Momentaufnahme, den diese Aufloesung braucht. */
705
+ interface PolicySnapshot {
706
+ getElement(elementId: string): SnapshotRead<{
707
+ element: {
708
+ element_id: string;
709
+ type: string;
710
+ context_id?: string | null;
711
+ };
712
+ versions?: readonly {
713
+ version_id: string;
714
+ element_id: string;
715
+ payload: unknown;
716
+ }[];
717
+ preferredHeads?: readonly {
718
+ context_id: string | null;
719
+ version_id?: string;
720
+ }[];
721
+ } | null>;
722
+ /**
723
+ * Die Elemente eines Kettenglieds — **optional im Typ, nicht im Betrieb.**
724
+ *
725
+ * Optional, weil der Shot-Pfad dieselbe Momentaufnahme benutzt und dort
726
+ * keine Liste braucht. Fehlt sie im Szene-Direktlauf, ist das ein
727
+ * unvollstaendiger Hostadapter und wird laut gemeldet — nicht als „keine
728
+ * Policy vorhanden" ausgelegt (Grundsatzregel 4).
729
+ */
730
+ listElements?(filter: {
731
+ contextId: string | null;
732
+ type: string;
733
+ }): SnapshotRead<readonly {
734
+ element_id: string;
735
+ type: string;
736
+ }[]>;
737
+ }
738
+ /**
739
+ * Die deterministische Ordnung automatisch gefundener Policies (Auftrag §6).
740
+ *
741
+ * Eine automatisch entdeckte Menge hat keine gespeicherte Array-Reihenfolge;
742
+ * `rank` allein reicht deshalb nicht aus, sobald zwei Regeln denselben Rang
743
+ * tragen. Keine Deduplizierung nach `name`: verschiedene Elemente sind
744
+ * verschiedene Regeln.
745
+ */
746
+ declare function sortScenePolicies(policies: readonly ResolvedScenePolicy[]): readonly ResolvedScenePolicy[];
747
+ /**
748
+ * Der Vergleichswert zweier Aufloesungen — fuer die A/B-Stabilitaetspruefung.
749
+ *
750
+ * Verglichen wird Element **und** Version in der entstandenen Reihenfolge:
751
+ * Genau dann ist der Policy-Satz derselbe, den der Nutzer gesehen hat. Der
752
+ * Text gehoert nicht hinein — eine veroeffentlichte Version ist
753
+ * unveraenderlich, und ein abweichender Text bei gleicher Kennung waere ein
754
+ * Speicherdefekt, kein Wettlauf.
755
+ */
756
+ declare function scenePolicyFingerprint(policies: readonly ResolvedScenePolicy[]): string;
757
+ /**
758
+ * Die allgemeinen Policies, die fuer einen Szene-Direktlauf gelten.
759
+ *
760
+ * Ausgewertet wird die **vollstaendige** Kontextkette: Arbeitskontext, geerbte
761
+ * Kontexte, global. Je sichtbarem `prompt_policy`-Element wird die wirksame
762
+ * Version ausschliesslich mit der vorhandenen Preferred-Head-Logik bestimmt
763
+ * (D-36) — hier wird nichts neu ausgelegt und nichts geraten.
764
+ *
765
+ * Kein Netzzugriff: Gelesen wird genau die uebergebene Momentaufnahme. Das ist
766
+ * die Voraussetzung dafuer, dass die Auswahl in dieselbe Konsistenzgrenze
767
+ * faellt wie das Einfrieren der Szene (Gegenpruefung P2).
768
+ */
769
+ declare function resolveGeneralScenePolicies(snapshot: PolicySnapshot, contextChain: readonly (string | null)[]): ScenePolicyResult;
770
+
659
771
  /** Ein Beitrag zur Beschreibung eines Knotens, mit Herkunft (D-50). */
660
772
  interface NodeContribution {
661
773
  source: 'component' | 'node_semantic' | 'setup_override';
@@ -716,6 +828,14 @@ interface RendererInput {
716
828
  /** `null`, wenn der Shot keine auflösbare Kamera nennt. */
717
829
  camera_id: string | null;
718
830
  shot_concept: unknown | null;
831
+ /**
832
+ * Die wirksame Arbeitsanweisung dieses Shot-Laufs — unveraendert.
833
+ *
834
+ * Die **kanonische** Stelle ist seit Schritt 03 das gleichnamige Feld auf
835
+ * oberster Ebene; im Shot-Pfad tragen beide denselben Wert. Das Feld hier
836
+ * bleibt, weil Laeufe, Tests und der Vertrag es seit Stufe 3 fuehren, und
837
+ * weil dieser Auftrag am Auswahlverhalten des Shot-Pfads nichts aendert.
838
+ */
719
839
  user_instruction: string | null;
720
840
  text_override: string | null;
721
841
  } | null;
@@ -747,7 +867,23 @@ interface RendererInput {
747
867
  text: string;
748
868
  locale: string | null;
749
869
  }[];
870
+ /**
871
+ * Die wirksamen Prompt-Policies — mit vollstaendiger Provenienz (D-22).
872
+ *
873
+ * `element_id`/`version_id` gehoeren seit Schritt 03 dazu, und zwar auf
874
+ * **beiden** Wegen: bei den ausdruecklich referenzierten Shot-Policies
875
+ * ebenso wie bei den automatisch aufgeloesten allgemeinen Kontext-Policies
876
+ * des Szene-Direktlaufs. D-22 verlangt eingefrorenen Text **und** Herkunft;
877
+ * ohne die beiden Kennungen liesse sich spaeter nicht sagen, welche Regel in
878
+ * welcher Fassung gewirkt hat.
879
+ *
880
+ * Reihenfolge: erst die ausdruecklich referenzierten (Array-Reihenfolge nach
881
+ * `rank`), dann die automatisch aufgeloesten in ihrer deterministischen
882
+ * Ordnung. Sie wird woertlich eingefroren.
883
+ */
750
884
  policies: readonly {
885
+ element_id: string;
886
+ version_id: string;
751
887
  subtype: string;
752
888
  rank: number;
753
889
  text: string;
@@ -787,6 +923,19 @@ interface RendererInput {
787
923
  can_render_prompt: string;
788
924
  can_place: string;
789
925
  };
926
+ /**
927
+ * Die laufbezogene Arbeitsanweisung — die **kanonische** Stelle (Schritt 03 §7).
928
+ *
929
+ * Vorher stand sie ausschliesslich unter `shot.user_instruction`. Beim
930
+ * Szene-Direktlauf gibt es keinen Shot, und damit erreichte die Anweisung
931
+ * den Renderer nicht, obwohl der Vorgang sie speicherte — der belegte
932
+ * Fehler aus der Gegenpruefung P6. Hier steht sie jetzt fuer **jeden** Weg
933
+ * genau einmal.
934
+ *
935
+ * Sie ist **additiv** zu `policies` und ersetzt keine Regel; Policy-Text
936
+ * wird niemals hierher kopiert.
937
+ */
938
+ user_instruction: string | null;
790
939
  /** Die tatsächlich verwendete Kontextkette (§4.9.1). */
791
940
  context_chain: readonly (string | null)[];
792
941
  /** Wie das Zielmodell gefunden wurde (§4.9.1). `null` ohne Zielmodell. */
@@ -953,6 +1102,11 @@ interface ResolveScenePayloadInput {
953
1102
  resolver: ReferenceResolver;
954
1103
  contextChain: readonly (string | null)[];
955
1104
  userInstruction?: string | null;
1105
+ /**
1106
+ * Die allgemeinen Kontext-Policies dieses Laufs, bereits aufgeloest und
1107
+ * gegen die zweite Momentaufnahme bestaetigt (Schritt 03 §3).
1108
+ */
1109
+ autoPolicies?: readonly ResolvedScenePolicy[];
956
1110
  }
957
1111
  /**
958
1112
  * Löst eine **Szene allein** zur Renderer-Eingabe auf (D-135).
@@ -1184,6 +1338,15 @@ interface PromptRunRecord {
1184
1338
  source?: PromptRunSource;
1185
1339
  created_at: string;
1186
1340
  }
1341
+ /**
1342
+ * Die Herkunft eines Laufs, auch bei einem Satz von vor 6.6.
1343
+ *
1344
+ * Ein alter Lauf trug seine Herkunft flach in `shot_version_id` und
1345
+ * `scene_setup_version_id`; genau daraus entsteht hier die `published`-Form.
1346
+ * Damit muss kein Konsument zwei Datenformen kennen — und trotzdem wurde kein
1347
+ * einziges Ereignis angefasst.
1348
+ */
1349
+ declare function sourceOf(run: PromptRunRecord): PromptRunSource;
1187
1350
  /** Nutzlast des Ereignisses. Identisch mit dem Datensatz — ein Lauf ändert sich nie. */
1188
1351
  type PromptRunRecordedPayload = PromptRunRecord;
1189
1352
  /**
@@ -1197,6 +1360,129 @@ type PromptRunRecordedPayload = PromptRunRecord;
1197
1360
  declare function collectPromptRuns(events: readonly ElementEvent[]): readonly PromptRunRecord[];
1198
1361
  /** Ein einzelner Lauf aus dem Log, oder `null`. */
1199
1362
  declare function findPromptRun(events: readonly ElementEvent[], runId: string): PromptRunRecord | null;
1363
+ /**
1364
+ * Der fachliche Bezug, unter dem ein Lauf seine Geschwister findet.
1365
+ *
1366
+ * `unresolved` ist der bewusst sichtbare vierte Fall: Ein Lauf, dessen
1367
+ * Herkunft keine brauchbare Kennung trägt — etwa ein Altsatz, den `sourceOf()`
1368
+ * auf `published` normalisiert, der aber gar keine `shot_version_id` hat. Er
1369
+ * bekommt seine **eigene** Gruppe und wird nie mit fremden Läufen vermischt.
1370
+ * Das ist kein stiller Ersatz (Regel 4): Der Grund steht im Datensatz und wird
1371
+ * angezeigt, statt eine Zugehörigkeit zu behaupten, die niemand belegt.
1372
+ */
1373
+ type PromptRunGroup = {
1374
+ kind: 'published';
1375
+ key: string;
1376
+ shot_version_id: string;
1377
+ } | {
1378
+ kind: 'draft_chain';
1379
+ key: string;
1380
+ chain_id: string;
1381
+ } | {
1382
+ kind: 'scene_direct';
1383
+ key: string;
1384
+ scene_element_id: string;
1385
+ } | {
1386
+ kind: 'unresolved';
1387
+ key: string;
1388
+ reason: string;
1389
+ };
1390
+ /**
1391
+ * Die Bezugsgruppe eines Laufs.
1392
+ *
1393
+ * Abgelesen an `sourceOf()` — der einzigen Stelle, die Alt- und Neuform
1394
+ * zusammenführt. Es entsteht **kein** neues Herkunftsfeld am Lauf; die Gruppe
1395
+ * wird bei jedem Lesen aus dem berechnet, was ohnehin dasteht.
1396
+ */
1397
+ declare function groupOf(run: PromptRunRecord): PromptRunGroup;
1398
+ /** Nur der Schlüssel der Bezugsgruppe — für Vergleiche und Filter. */
1399
+ declare function groupKeyOf(run: PromptRunRecord): string;
1400
+ /**
1401
+ * Die Geschwister eines Laufs: alle Läufe **seiner** Bezugsgruppe.
1402
+ *
1403
+ * Reihenfolge unverändert aus der Eingabe — sie ist die autoritative
1404
+ * Anhängereihenfolge und trägt die Rundennummer (`roundOfRun`). Hier wird
1405
+ * nicht nachsortiert; eine zweite Sortierregel neben der fachlichen wäre eine
1406
+ * zweite Wahrheit.
1407
+ */
1408
+ declare function siblingsOf(run: PromptRunRecord, alle: readonly PromptRunRecord[]): readonly PromptRunRecord[];
1409
+ /**
1410
+ * Das Element, das einen Lauf **benennt** — oder `null`.
1411
+ *
1412
+ * Ein Lauf hat keinen eigenen Titel; benannt wird er über das Element, aus dem
1413
+ * er entstand. Vorrang hat die **Szene**: Sie sagt einem Menschen, worum es
1414
+ * geht, während der Shot nur den Ausschnitt benennt. Genau diese Reihenfolge
1415
+ * benutzt der Sync serverseitig schon, um einen Lauf zu beschriften
1416
+ * (`sceneSync.js`, `titelOf`) — hier steht sie ein zweites Mal in Code, aber
1417
+ * nicht ein zweites Mal als Regel.
1418
+ *
1419
+ * Bei `published` ist die Szene nur über die Setup-**Version** erreichbar, also
1420
+ * über eine Auflösung, die eine Liste nicht je Zeile fahren soll. Dort steht
1421
+ * das Shot-Element ein; das ist ehrlich und ohne Zusatzabfrage zu haben.
1422
+ *
1423
+ * `null` heisst: Es gibt kein benennbares Element. Dann bleibt es bei „Runde
1424
+ * n" — ein erfundener Titel wäre schlimmer als keiner (D-75).
1425
+ */
1426
+ declare function namingElementOf(run: PromptRunRecord): string | null;
1427
+ /**
1428
+ * Der Arbeitskontext, in dem ein Lauf entstanden ist.
1429
+ *
1430
+ * Ein Lauf trägt den Kontext **nicht** als eigenes Feld; er steht als erstes
1431
+ * Glied der eingefrorenen `context_chain` (`resolve.ts`), wo `null` „global"
1432
+ * bedeutet. `undefined` heißt hier etwas anderes als `null`: Der Lauf nennt
1433
+ * **gar keine** Kette — das ist bei einem alten oder fremd erzeugten Satz
1434
+ * möglich, und es wird nicht geraten (Regel 4).
1435
+ */
1436
+ declare function contextOfRun(run: PromptRunRecord): string | null | undefined;
1437
+ /**
1438
+ * Welcher Ausgang in der gemeinsamen Sicht erscheint.
1439
+ *
1440
+ * Vorgabe des Umsetzungsauftrags §4: Die Benutzeransicht zeigt standardmäßig
1441
+ * nur `succeeded`. Ein Fehllauf bleibt im Log und über `'failed'`/`'all'`
1442
+ * erreichbar — er ist ein Nachweis (D-23 §6), nur eben kein benutzbarer Prompt.
1443
+ */
1444
+ type PromptRunStatusFilter = 'succeeded' | 'failed' | 'all';
1445
+ interface PromptRunFilter {
1446
+ /**
1447
+ * Bezugsrahmen. **Weglassen** heißt „alle Kontexte"; ein ausdrückliches
1448
+ * `null` ist der globale Kontext und damit ein Wert, kein fehlendes Feld.
1449
+ */
1450
+ contextId?: string | null;
1451
+ /** Vorgabe `succeeded`. */
1452
+ status?: PromptRunStatusFilter;
1453
+ }
1454
+ /**
1455
+ * Das Ergebnis der gemeinsamen Sicht.
1456
+ *
1457
+ * Bewusst mehr als ein Array: Was ein Filter **weggelassen** hat, gehört zur
1458
+ * Auskunft. Sonst sähe eine kontextgefilterte Liste für den Nutzer aus wie der
1459
+ * vollständige Bestand, und ein Lauf ohne Kontextangabe wäre spurlos
1460
+ * verschwunden — genau der stille Verlust, den dieser Auftrag beheben soll.
1461
+ */
1462
+ interface PromptRunListing {
1463
+ runs: readonly PromptRunRecord[];
1464
+ /** Läufe, die der Statusfilter ausgeblendet hat. */
1465
+ hiddenByStatus: number;
1466
+ /**
1467
+ * Läufe, die einen anderen Kontext nennen als den gefragten.
1468
+ * `0`, wenn nicht nach Kontext gefiltert wurde.
1469
+ */
1470
+ hiddenByContext: number;
1471
+ /**
1472
+ * Läufe **ohne** eingefrorene Kontextkette. Sie werden bei einem
1473
+ * Kontextfilter nicht mitgezählt und nicht geraten — ihre Zahl steht hier,
1474
+ * damit die Ansicht sie benennen kann statt sie zu verschweigen.
1475
+ */
1476
+ withoutContext: number;
1477
+ }
1478
+ /**
1479
+ * Wendet den Bezugsrahmen auf eine bereits gelesene Laufmenge an.
1480
+ *
1481
+ * Reine Funktion, kein Speicherzugriff — dieselbe Regel läuft im Client und im
1482
+ * Server über dieselbe Faltung (`collectPromptRuns`). Die Reihenfolge der
1483
+ * Eingabe bleibt erhalten.
1484
+ */
1485
+ declare function selectPromptRuns(alle: readonly PromptRunRecord[], filter?: PromptRunFilter): PromptRunListing;
1200
1486
 
1201
1487
  /**
1202
1488
  * Ein Vorschlag, so wie er im Ereignis steht.
@@ -1441,6 +1727,7 @@ interface ChainSnapshot {
1441
1727
  version_id: string;
1442
1728
  element_id: string;
1443
1729
  payload: unknown;
1730
+ parents?: unknown;
1444
1731
  }[];
1445
1732
  preferredHeads?: readonly {
1446
1733
  context_id: string | null;
@@ -1448,6 +1735,30 @@ interface ChainSnapshot {
1448
1735
  }[];
1449
1736
  } | null;
1450
1737
  };
1738
+ /**
1739
+ * Die Elemente eines Kettenglieds — fuer die allgemeinen Kontext-Policies
1740
+ * des Szene-Direktlaufs (Schritt 03 §3).
1741
+ *
1742
+ * Optional im Typ, weil der Shot-Pfad dieselbe Momentaufnahme benutzt und
1743
+ * dort keine Liste braucht. Im Szene-Direktlauf ist sie **Pflicht**: Fehlt
1744
+ * sie, meldet die Policy-Aufloesung einen Fehler, statt „keine Policy"
1745
+ * zu behaupten (Grundsatzregel 4).
1746
+ *
1747
+ * Aus **derselben** Momentaufnahme wie `getElement` — genau das haelt die
1748
+ * Policy-Auswahl in der A/B-Konsistenzgrenze und verhindert einen dritten
1749
+ * Live-Leseweg (Gegenpruefung P2).
1750
+ */
1751
+ listElements?(filter: {
1752
+ contextId: string | null;
1753
+ type: string;
1754
+ }): {
1755
+ kind: string;
1756
+ message?: string;
1757
+ value?: readonly {
1758
+ element_id: string;
1759
+ type: string;
1760
+ }[];
1761
+ };
1451
1762
  }
1452
1763
  /**
1453
1764
  * Was das Einfrieren vom Elementspeicher braucht — bewusst schmal.
@@ -1497,6 +1808,14 @@ interface FreezeSceneSuccess {
1497
1808
  kind: 'ok';
1498
1809
  scene: FrozenSceneState;
1499
1810
  input: RendererInput;
1811
+ /**
1812
+ * Die automatisch aufgeloesten allgemeinen Kontext-Policies (Schritt 03).
1813
+ *
1814
+ * Redundant zu `input.policies` und trotzdem hier: Der Aufrufer sieht so den
1815
+ * Satz **mit** `chain_index`, ohne die Ordnung nachbauen zu muessen. Der
1816
+ * eingefrorene Lauf traegt weiterhin ausschliesslich `input`.
1817
+ */
1818
+ policies: readonly ResolvedScenePolicy[];
1500
1819
  }
1501
1820
  type FreezeSceneResult = FreezeSceneSuccess | FreezeFailure;
1502
1821
  interface FreezeSceneWorkingStateInput {
@@ -2772,6 +3091,26 @@ interface SzenenRunPort {
2772
3091
  * bestehenden Abfragen unauffindbar.
2773
3092
  */
2774
3093
  listRunsForScene(sceneElementId: string): Promise<QueryResult<readonly PromptRunRecord[]>>;
3094
+ /**
3095
+ * Die **gemeinsame** Prompt-Sicht — P1-A, herkunftsübergreifend.
3096
+ *
3097
+ * Die drei Abfragen darüber sind Einstiege über einen Anker: eine
3098
+ * veröffentlichte Version, eine Draft-Kette, ein Szenen-Element. Wer keinen
3099
+ * dieser Anker kennt — oder wessen Anker seinen Zustand gewechselt hat —
3100
+ * findet den Lauf über keine von ihnen (Gegenprüfung 02, G1). Diese
3101
+ * Operation zählt ohne Vorwissen auf.
3102
+ *
3103
+ * Sie **ergänzt**; keine der drei bestehenden Abfragen ändert ihr Verhalten
3104
+ * und keine Herkunftsprüfung wird aufgeweicht.
3105
+ *
3106
+ * Ohne Angabe gilt `status: 'succeeded'` und kein Kontextfilter. Der
3107
+ * Rückgabewert nennt ausdrücklich, was weggefiltert wurde — sonst sähe eine
3108
+ * gefilterte Liste aus wie der vollständige Bestand.
3109
+ *
3110
+ * Optional: Ein Host ohne diese Operation meldet über `capabilitiesOf()`
3111
+ * `promptOverview: false`, und die Ansicht nennt den Grund (§8).
3112
+ */
3113
+ listAllRuns?(filter?: PromptRunFilter): Promise<QueryResult<PromptRunListing>>;
2775
3114
  }
2776
3115
  interface StartRunFromSceneInput {
2777
3116
  /** Das Szenen-**Element**. Ob Entwurf oder Version gilt, entscheidet der Bestand. */
@@ -3476,6 +3815,8 @@ interface SzenenViewCapabilities {
3476
3815
  imageGeneration: boolean;
3477
3816
  /** Bildauftraege aus dem Chat uebernehmen (Kette szenen-mcp-chatgpt-flow). */
3478
3817
  imageJobs: boolean;
3818
+ /** Die herkunftsuebergreifende Prompt-Sicht (P1-A) — Bereich `Prompts`. */
3819
+ promptOverview: boolean;
3479
3820
  }
3480
3821
  declare function capabilitiesOf(port: SzenenViewPort): SzenenViewCapabilities;
3481
3822
  /**
@@ -3714,8 +4055,8 @@ interface CreateMemoryViewPortOptions {
3714
4055
  /**
3715
4056
  * Ob der Port die Rekonstruktion anbietet (Stufe 6.5).
3716
4057
  *
3717
- * `false` bildet einen Host ohne Textgenerierungs-Port ab. Der Bereich
3718
- * „0 · Rekonstruktion" fehlt dann ganz, statt leer zu erscheinen (R11).
4058
+ * `false` bildet einen Host ohne Textgenerierungs-Port ab. Die Aktion
4059
+ * „Neu aus Bild/Text" fehlt dann ganz, statt leer zu erscheinen (R11).
3719
4060
  */
3720
4061
  derivation?: boolean;
3721
4062
  /** Vorbelegte Regeln, aus denen die Auswahl liest. */
@@ -3940,6 +4281,20 @@ interface PromptRunPersistencePort {
3940
4281
  * (derselbe Befund wie D-102/A1 bei der Kette).
3941
4282
  */
3942
4283
  listForScene(sceneElementId: string): Promise<QueryResult<readonly PromptRunRecord[]>>;
4284
+ /**
4285
+ * **Alle** Läufe des Bestands, herkunftsübergreifend — P1-A.
4286
+ *
4287
+ * Die drei Abfragen darüber setzen jeweils eine Kennung voraus, die der
4288
+ * Aufrufer erst kennen muss: eine veröffentlichte Version, eine noch
4289
+ * existierende Draft-Kette, ein Szenen-Element. Genau daran scheitert die
4290
+ * Auffindbarkeit, sobald ein Anker seinen Zustand wechselt (Gegenprüfung 02,
4291
+ * G1). Diese Operation zählt ohne Vorwissen auf.
4292
+ *
4293
+ * Optional, damit ein Host ohne sie weiterläuft: `capabilitiesOf()` meldet
4294
+ * dann `promptOverview: false`, und die Ansicht nennt den Grund, statt einen
4295
+ * leeren Bereich zu zeigen (§8).
4296
+ */
4297
+ listAll?(): Promise<QueryResult<readonly PromptRunRecord[]>>;
3943
4298
  }
3944
4299
  /** Was der Eventlog-Adapter vom Kanal braucht — lesen und anhängen. */
3945
4300
  interface RunEventChannel {
@@ -4484,7 +4839,7 @@ declare function istZipDatei(datei: {
4484
4839
  */
4485
4840
  declare function leseBilderAusZip(datei: File | Blob): Promise<readonly ZipBild[]>;
4486
4841
 
4487
- type SzenenAreaId = 'derive' | 'elements' | 'scene' | 'setup' | 'shot' | 'media';
4842
+ type SzenenAreaId = 'scene' | 'prompts' | 'elements' | 'advanced' | 'media';
4488
4843
  interface SzenenArea {
4489
4844
  id: SzenenAreaId;
4490
4845
  title: string;
@@ -4494,10 +4849,11 @@ interface SzenenArea {
4494
4849
  /**
4495
4850
  * Die Bereiche, die dieser Host trägt.
4496
4851
  *
4497
- * `media` und `derive` fallen weg, wenn der Port die zugehörige Fähigkeit nicht
4498
- * hat — die einzigen Stellen, an denen ein Bereich verschwinden kann, und beide
4499
- * lesen eine Fähigkeit, keinen Hostnamen. Alle anderen Bereiche gibt es immer:
4500
- * ein Host ohne Elementspeicher wäre kein Szenen-Host.
4852
+ * `media` fällt weg, wenn der Port die Fähigkeit nicht hat — die einzige Stelle,
4853
+ * an der ein Bereich verschwinden kann, und sie liest eine Fähigkeit, keinen
4854
+ * Hostnamen. Die Rekonstruktion ist seit D-135 kein eigener Bereich mehr; ihre
4855
+ * Fähigkeit entscheidet nur noch über die Aktion „Neu aus Bild/Text" innerhalb
4856
+ * von „Szenen".
4501
4857
  *
4502
4858
  * Ein leerer Bereich wäre die schlechtere Antwort: Er verspräche eine Aktion,
4503
4859
  * die dieser Host nicht ausführen kann, und der Nutzer suchte den Fehler bei
@@ -4538,4 +4894,4 @@ interface SzenenViewProps {
4538
4894
  }
4539
4895
  declare const SzenenView: React__default.FC<SzenenViewProps>;
4540
4896
 
4541
- export { type AttachLibraryItemInput, type AttachLibraryItemResult, AuthoritativeSzenenStore, type BestandsGalerieEintrag, type BestandsItem, CATALOGUE_TYPES, CapabilityAnchorError, type CapabilityFlag, type CapabilityFlagName, type CapabilityReason, type CapabilityReport, type CapabilityReportInput, type CapabilityScope, type CapabilityState, type ChainQueries, type ClaimAndRunResult, type ClientDerivationChannel, type ClientDerivationStore, type CompletePromptOperationInput, type CompletePromptOperationResult, ContextChainPort, type CreateBrowserTextGenerationPortOptions, type CreateClientDerivationPortOptions, type CreateClientRunPortOptions, type CreateFlowSzenenViewPortOptions, type CreateHfElementStoreOptions, type CreateHfEventChannelOptions, type CreateHfImageBatchHistoryOptions, type CreateHfImageBatchPersistenceOptions, type CreateImageGenerationPortOptions, type CreateImageJobPortOptions, type CreateMemoryViewPortOptions, DEFAULT_SEED_VORLAGE, 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 ImageJob, type ImageJobChannel, type ImageJobClaimedPayload, type ImageJobRequestedPayload, type ImageJobSettledPayload, 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, MCP_CLIENT_PROVIDER, type NodeContribution, NotDerivable, type Notice, type NoticeTone, PROMPT_RULE_EFFECT, type PreparePromptOperationInput, type PreparePromptOperationResult, type PreparedPromptOperation, type PromptBatchImageRef, type PromptBatchOrigin, type PromptDiagnostic, type PromptEffect, type PromptExecutionOrigin, type PromptImageBatch, type PromptOperationPreparedPayload, type PromptResponseContract, 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, SZENEN_SNAPSHOT_FILE, SZENEN_SNAPSHOT_PREFIX, SZENEN_SNAPSHOT_SCHEMA_VERSION, type SaveRunAsItemInput, type SceneDerivationPersistencePort, type SceneDerivationRecord, type SceneDerivationRecordedPayload, type SceneDerivationRecoveryRecord, type SceneDerivationRecoveryRecordedPayload, SchemaError, type SeedVorlage, type SeedZuordnung, type SeedZuordnungEintrag, type SelectableTargetModel, type StartImageGenerationInput, type StartRunFromSceneInput, type StartRunInput, type StepState, type SzenenArea, type SzenenAreaId, type SzenenBatchOrigin, type SzenenBatchOriginFailure, type SzenenBatchOriginVerdict, type SzenenBatchSourceKind, SzenenCommands, SzenenElementStore, SzenenElementType, type SzenenImageBatchHistoryPort, type SzenenImageBatchWritePort, type SzenenImageGenerationPort as SzenenImageGenerationPortContract, type SzenenImageJobPort, type SzenenImageLibraryPort, type SzenenItemPort, type SzenenLeseErgebnis, type SzenenMediaPort, SzenenQueries, type SzenenRunPort, type SzenenSeedTemplatePort, type SzenenSnapshot, SzenenView, type SzenenViewCapabilities, type SzenenViewPort, type SzenenViewProps, TargetModelResolution, TextGenerationPort, UNCHECKED_PUBLISH_RULES, UNVERIFIED_MODEL_ID, UPLOAD_MAX_BYTES, type UnselectableTargetModel, UnusableProposal, type VersionMedium, type VisibilityNode, type ZipBild, areasFor, batchesForPromptRun, bildPfad, buildSystemInstruction, buildSzenenSnapshot, 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, claimWon, collectImageBatches, collectImageGenerationOrders, collectImageJobs, collectPromptOperations, collectPromptRuns, collectProviderChecks, collectSceneDerivationRecoveries, collectSceneDerivations, completePromptOperation, createBrowserTextGenerationPort, createClientDerivationPort, createClientRunPort, createEventLogDerivationPersistence, createEventLogRunPersistence, createFlowImageProvider, createFlowSzenenViewPort, createHfElementStore, createHfEventChannel, createHfImageBatchHistory, createHfImageBatchWrite, createHfImageGenerationBatchPersistence, createHfImageLibrary, createHfImageStore, createImageGenerationPort, createImageJobPort, createInMemoryEventChannel, createMemoryViewPort, derivationPoliciesOf, deriveItemFromRun, deriveLineage, describableContent, diagnosticOfFinding, diagnosticOfSchemaError, differentialSteps, draftRevisionOf, executableImageModels, findExecutableImageModel, findImageBatch, findImageGenerationOrder, findImageJob, findPromptOperation, findPromptRun, findProviderCheck, findSceneDerivation, findSceneDerivationRecovery, firstError, formatSeedListe, freezeDraftChain, freezeSceneWorkingState, generationBatchIdOf, gesamtHerkunft, gruppiereZuItems, hasPlacementCapability, isKnownElementType, isSzenenItemId, istSzenenSnapshotDatei, istZipDatei, itemIdForRun, itemsAusBestand, jobsForPromptRun, ladeVorschauen, leseBilderAusZip, locatorAus, locatorTeile, logRevisionOf, mergeSnapshotAndPending, mergeSzenenBatchOrigin, mimeTypAus, mitDefaultVorlage, noticeFor, ordersForPromptRun, ordneSeedsZu, parseRunResponse, parseSeedListe, parseSzenenSnapshot, preferredHeadRevisionOf, preparePromptOperation, promptDiagnosticsOf, publishedHeadsOf, recoveriesForRun, recoveryStatusOf, reduceElementEvents, resolveArea, resolveScenePayload, resolveShot, resolveShotPayload, responseContractOf, roundOfRun, rulesWithoutPromptEffect, runOfOperation, runPromptDerivation, runStoreDifferential, sameResponseAs, sceneOnlyCapabilities, scopeOfPath, seedFehlerText, selectableTargetModels, szenenSnapshotFilename, totalModelCalls, typAusBytes, unclassifiedPublishRules, unsupportedReason };
4897
+ export { type AttachLibraryItemInput, type AttachLibraryItemResult, AuthoritativeSzenenStore, type BestandsGalerieEintrag, type BestandsItem, CATALOGUE_TYPES, CapabilityAnchorError, type CapabilityFlag, type CapabilityFlagName, type CapabilityReason, type CapabilityReport, type CapabilityReportInput, type CapabilityScope, type CapabilityState, type ChainQueries, type ClaimAndRunResult, type ClientDerivationChannel, type ClientDerivationStore, type CompletePromptOperationInput, type CompletePromptOperationResult, ContextChainPort, type CreateBrowserTextGenerationPortOptions, type CreateClientDerivationPortOptions, type CreateClientRunPortOptions, type CreateFlowSzenenViewPortOptions, type CreateHfElementStoreOptions, type CreateHfEventChannelOptions, type CreateHfImageBatchHistoryOptions, type CreateHfImageBatchPersistenceOptions, type CreateImageGenerationPortOptions, type CreateImageJobPortOptions, type CreateMemoryViewPortOptions, DEFAULT_SEED_VORLAGE, 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, GENERAL_POLICY_SUBTYPE, 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 ImageJob, type ImageJobChannel, type ImageJobClaimedPayload, type ImageJobRequestedPayload, type ImageJobSettledPayload, 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, MCP_CLIENT_PROVIDER, type NodeContribution, NotDerivable, type Notice, type NoticeTone, PROMPT_RULE_EFFECT, type PolicySnapshot, type PreparePromptOperationInput, type PreparePromptOperationResult, type PreparedPromptOperation, type PromptBatchImageRef, type PromptBatchOrigin, type PromptDiagnostic, type PromptEffect, type PromptExecutionOrigin, type PromptImageBatch, type PromptOperationPreparedPayload, type PromptResponseContract, type PromptRunFilter, type PromptRunGroup, type PromptRunListing, type PromptRunOutcome, type PromptRunOutput, type PromptRunPersistencePort, type PromptRunRecord, type PromptRunRecordedPayload, type PromptRunSource, type PromptRunStatusFilter, 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 ResolvedScenePolicy, type RunEventChannel, type RunFailure, type RunFailureClass, type RunItemReference, SZENEN_EVENT_PREFIX, SZENEN_EVENT_TYPES, SZENEN_ITEM_PREFIX, SZENEN_SCHEMAS, SZENEN_SNAPSHOT_FILE, SZENEN_SNAPSHOT_PREFIX, SZENEN_SNAPSHOT_SCHEMA_VERSION, type SaveRunAsItemInput, type SceneDerivationPersistencePort, type SceneDerivationRecord, type SceneDerivationRecordedPayload, type SceneDerivationRecoveryRecord, type SceneDerivationRecoveryRecordedPayload, type ScenePolicyResult, SchemaError, type SeedVorlage, type SeedZuordnung, type SeedZuordnungEintrag, type SelectableTargetModel, type StartImageGenerationInput, type StartRunFromSceneInput, type StartRunInput, type StepState, type SzenenArea, type SzenenAreaId, type SzenenBatchOrigin, type SzenenBatchOriginFailure, type SzenenBatchOriginVerdict, type SzenenBatchSourceKind, SzenenCommands, SzenenElementStore, SzenenElementType, type SzenenImageBatchHistoryPort, type SzenenImageBatchWritePort, type SzenenImageGenerationPort as SzenenImageGenerationPortContract, type SzenenImageJobPort, type SzenenImageLibraryPort, type SzenenItemPort, type SzenenLeseErgebnis, type SzenenMediaPort, SzenenQueries, type SzenenRunPort, type SzenenSeedTemplatePort, type SzenenSnapshot, SzenenView, type SzenenViewCapabilities, type SzenenViewPort, type SzenenViewProps, TargetModelResolution, TextGenerationPort, UNCHECKED_PUBLISH_RULES, UNVERIFIED_MODEL_ID, UPLOAD_MAX_BYTES, type UnselectableTargetModel, UnusableProposal, type VersionMedium, type VisibilityNode, type ZipBild, areasFor, batchesForPromptRun, bildPfad, buildSystemInstruction, buildSzenenSnapshot, 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, claimWon, collectImageBatches, collectImageGenerationOrders, collectImageJobs, collectPromptOperations, collectPromptRuns, collectProviderChecks, collectSceneDerivationRecoveries, collectSceneDerivations, completePromptOperation, contextOfRun, createBrowserTextGenerationPort, createClientDerivationPort, createClientRunPort, createEventLogDerivationPersistence, createEventLogRunPersistence, createFlowImageProvider, createFlowSzenenViewPort, createHfElementStore, createHfEventChannel, createHfImageBatchHistory, createHfImageBatchWrite, createHfImageGenerationBatchPersistence, createHfImageLibrary, createHfImageStore, createImageGenerationPort, createImageJobPort, createInMemoryEventChannel, createMemoryViewPort, derivationPoliciesOf, deriveItemFromRun, deriveLineage, describableContent, diagnosticOfFinding, diagnosticOfSchemaError, differentialSteps, draftRevisionOf, executableImageModels, findExecutableImageModel, findImageBatch, findImageGenerationOrder, findImageJob, findPromptOperation, findPromptRun, findProviderCheck, findSceneDerivation, findSceneDerivationRecovery, firstError, formatSeedListe, freezeDraftChain, freezeSceneWorkingState, generationBatchIdOf, gesamtHerkunft, groupKeyOf, groupOf, gruppiereZuItems, hasPlacementCapability, isKnownElementType, isSzenenItemId, istSzenenSnapshotDatei, istZipDatei, itemIdForRun, itemsAusBestand, jobsForPromptRun, ladeVorschauen, leseBilderAusZip, locatorAus, locatorTeile, logRevisionOf, mergeSnapshotAndPending, mergeSzenenBatchOrigin, mimeTypAus, mitDefaultVorlage, namingElementOf, noticeFor, ordersForPromptRun, ordneSeedsZu, parseRunResponse, parseSeedListe, parseSzenenSnapshot, preferredHeadRevisionOf, preparePromptOperation, promptDiagnosticsOf, publishedHeadsOf, recoveriesForRun, recoveryStatusOf, reduceElementEvents, resolveArea, resolveGeneralScenePolicies, resolveScenePayload, resolveShot, resolveShotPayload, responseContractOf, roundOfRun, rulesWithoutPromptEffect, runOfOperation, runPromptDerivation, runStoreDifferential, sameResponseAs, sceneOnlyCapabilities, scenePolicyFingerprint, scopeOfPath, seedFehlerText, selectPromptRuns, selectableTargetModels, siblingsOf, sortScenePolicies, sourceOf, szenenSnapshotFilename, totalModelCalls, typAusBytes, unclassifiedPublishRules, unsupportedReason };