@rslsp1/fa-app-tools 6.1.0 → 7.2.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-GHKN2VX3.mjs → chunk-5QA6DTJ6.mjs} +428 -15
- package/dist/{hfEventTypes-Dkfrcd_t.d.mts → hfEventTypes-BUztJySs.d.mts} +1 -11
- package/dist/{hfEventTypes-C_PX6RFR.d.ts → hfEventTypes-fAdA-0A9.d.ts} +1 -11
- package/dist/index.d.mts +18 -49
- package/dist/index.d.ts +18 -49
- package/dist/index.js +728 -1522
- package/dist/index.mjs +230 -723
- package/dist/szenen.d.mts +331 -221
- package/dist/szenen.d.ts +331 -221
- package/dist/szenen.js +121 -4
- package/dist/szenen.mjs +21 -4
- package/package.json +1 -1
- package/dist/chunk-NBUS7AWR.mjs +0 -418
- package/dist/chunk-UFXDXENC.mjs +0 -218
- package/dist/hfStateService-W7KO2FOH.mjs +0 -56
- package/dist/project-O4ORKXY5.mjs +0 -8
package/dist/szenen.d.mts
CHANGED
|
@@ -1,11 +1,314 @@
|
|
|
1
|
-
import { Z as PublishFinding, ac as SchemaError, Y as PublishCheckResult, aj as SzenenElementType, a2 as ReferenceResolver, ap as TargetModelResolution,
|
|
1
|
+
import { I as ElementSnapshot, Z as PublishFinding, ac as SchemaError, Y as PublishCheckResult, aj as SzenenElementType, a2 as ReferenceResolver, ap as TargetModelResolution, 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
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
|
-
import { g as HFStateSnapshot, F as FlowGenerateText } from './hfEventTypes-
|
|
6
|
-
export { C as CreateFlowTextGenerationPortOptions,
|
|
5
|
+
import { g as HFStateSnapshot, F as FlowGenerateText } from './hfEventTypes-BUztJySs.mjs';
|
|
6
|
+
export { C as CreateFlowTextGenerationPortOptions, r as createFlowTextGenerationPort } from './hfEventTypes-BUztJySs.mjs';
|
|
7
7
|
import React__default from 'react';
|
|
8
8
|
|
|
9
|
+
/** Präfix aller Events dieser Domain im gemeinsamen HF-Event-Kanal. */
|
|
10
|
+
declare const SZENEN_EVENT_PREFIX = "szenen.";
|
|
11
|
+
declare const SZENEN_EVENT_TYPES: {
|
|
12
|
+
readonly elementCreated: "szenen.element_created";
|
|
13
|
+
readonly elementRetired: "szenen.element_retired";
|
|
14
|
+
readonly metadataRevised: "szenen.element_metadata_revised";
|
|
15
|
+
readonly draftWritten: "szenen.element_draft_written";
|
|
16
|
+
readonly versionPublished: "szenen.element_version_published";
|
|
17
|
+
readonly preferredHeadSelected: "szenen.element_preferred_head_selected";
|
|
18
|
+
/**
|
|
19
|
+
* Ein Prompt-Ableitungslauf — Stufe 3, S6 (E-3b).
|
|
20
|
+
*
|
|
21
|
+
* Ein Lauf ist **kein Element**: keine Version, kein DAG, nicht
|
|
22
|
+
* referenzierbar. Er liegt trotzdem im selben autoritativen Log, weil er
|
|
23
|
+
* append-only und unveränderlich ist — genau die Form, die ein Ereignislog
|
|
24
|
+
* nativ trägt — und weil MySQL sonst zu einem zweiten fachlichen Speicher
|
|
25
|
+
* würde, den D-62 abgeschafft hat.
|
|
26
|
+
*
|
|
27
|
+
* Der Elementreducer ignoriert diesen Typ (`default:`-Zweig); die Läufe
|
|
28
|
+
* werden mit `collectPromptRuns` gelesen.
|
|
29
|
+
*/
|
|
30
|
+
readonly promptRunRecorded: "szenen.prompt_run_recorded";
|
|
31
|
+
/**
|
|
32
|
+
* Ein Szenen-Rekonstruktionslauf — Stufe 6.5 (D-71).
|
|
33
|
+
*
|
|
34
|
+
* Derselbe Bauplan und dieselbe Begründung wie beim Prompt-Lauf: append-only,
|
|
35
|
+
* unveränderlich, **kein Element** — keine Version, kein DAG, nicht
|
|
36
|
+
* referenzierbar. Er liegt im autoritativen Log, weil er genau die Form hat,
|
|
37
|
+
* die ein Ereignislog nativ trägt.
|
|
38
|
+
*
|
|
39
|
+
* Bewusst ein zweiter Lauftyp und **kein** gemeinsamer: Ein Prompt-Lauf geht
|
|
40
|
+
* von einer veröffentlichten Shot-Version aus, ein Rekonstruktionslauf von
|
|
41
|
+
* einer Referenz, die noch zu gar keinem Element gehört. Sie in einen Typ zu
|
|
42
|
+
* zwingen hieße, beiden ihre Herkunftsfelder zu nehmen.
|
|
43
|
+
*
|
|
44
|
+
* Der Elementreducer ignoriert auch diesen Typ (`default:`-Zweig).
|
|
45
|
+
*/
|
|
46
|
+
readonly sceneDerivationRecorded: "szenen.scene_derivation_recorded";
|
|
47
|
+
/**
|
|
48
|
+
* Ein ausdrücklich ausgelöster Lauf gegen den **echten** Provider.
|
|
49
|
+
*
|
|
50
|
+
* Er kostet Geld und wird deshalb nie beiläufig gefahren. Das Ereignis hält
|
|
51
|
+
* fest, was tatsächlich bezahlt wurde: wie viele Modellaufrufe, mit welchem
|
|
52
|
+
* Ausgang, in welcher Umgebung und von wem ausgelöst.
|
|
53
|
+
*
|
|
54
|
+
* Es ersetzt **nicht** die einzelnen Läufe — die werden regulär als
|
|
55
|
+
* `prompt_run_recorded` bzw. `scene_derivation_recorded` protokolliert. Es
|
|
56
|
+
* ist die Klammer darüber und der Grund, warum jemand später nachlesen kann,
|
|
57
|
+
* ob der Durchstich stattgefunden hat, ohne ihn erneut zu bezahlen.
|
|
58
|
+
*/
|
|
59
|
+
readonly providerCheckRecorded: "szenen.provider_check_recorded";
|
|
60
|
+
/**
|
|
61
|
+
* Eine geprüfte Arbeitsfassung eines fehlgeschlagenen Rekonstruktionslaufs —
|
|
62
|
+
* Stufe 6.6 (D-99).
|
|
63
|
+
*
|
|
64
|
+
* Sie ist **kein Lauf**: kein Provideraufruf, keine Kosten, kein Zielmodell.
|
|
65
|
+
* Sie ist die lokal geprüfte Korrektur eines bereits bezahlten Ergebnisses
|
|
66
|
+
* und zeigt über `run_id` auf ihren Ursprung. Der `raw_output` jenes Laufs
|
|
67
|
+
* bleibt unangetastet — deshalb ein eigenes Ereignis statt einer Änderung am
|
|
68
|
+
* bestehenden, das es ohnehin nicht geben dürfte (D-71).
|
|
69
|
+
*
|
|
70
|
+
* Mehrere Rettungen zum selben Lauf sind zulässig und erwartet: Jede
|
|
71
|
+
* Korrekturrunde ist nachvollziehbare Arbeit, kein Update der vorigen.
|
|
72
|
+
*
|
|
73
|
+
* Der Elementreducer ignoriert auch diesen Typ (`default:`-Zweig).
|
|
74
|
+
*/
|
|
75
|
+
readonly sceneDerivationRecoveryRecorded: "szenen.scene_derivation_recovery_recorded";
|
|
76
|
+
/**
|
|
77
|
+
* Ein bezahlter Bildgenerierungsauftrag beginnt — Stufe 6.7 (D-119).
|
|
78
|
+
*
|
|
79
|
+
* Append-only wie jedes andere Ereignis dieser Domain, geschrieben **vor**
|
|
80
|
+
* dem Provideraufruf. Es traegt **keine Bilddaten** — nur die Kennung, mit
|
|
81
|
+
* der die spaetere kanonische Batch-Persistenz (`saveGeneratedAssetBatch`,
|
|
82
|
+
* Teil C) wiedergefunden wird. Ein Crash zwischen diesem Ereignis und
|
|
83
|
+
* `imageGenerationFinished` loescht den Auftrag nicht: Er bleibt lesbar,
|
|
84
|
+
* ohne dass irgendein automatischer Retry darauf reagiert.
|
|
85
|
+
*
|
|
86
|
+
* Gilt nur fuer `generated_in_app` — ein externer Import (D-108/D-117)
|
|
87
|
+
* ruft keinen Provider und braucht deshalb kein `started`; sein Nachweis
|
|
88
|
+
* ist das gespeicherte Library-Item selbst.
|
|
89
|
+
*
|
|
90
|
+
* Der Elementreducer ignoriert auch diesen Typ (`default:`-Zweig); gelesen
|
|
91
|
+
* wird mit `collectImageGenerationOrders`.
|
|
92
|
+
*/
|
|
93
|
+
readonly imageGenerationStarted: "szenen.image_generation_started";
|
|
94
|
+
/**
|
|
95
|
+
* Derselbe Bildgenerierungsauftrag endet — Stufe 6.7 (D-119).
|
|
96
|
+
*
|
|
97
|
+
* Erscheint erst **nach** der kanonischen Batch-Persistenz: Ein technischer
|
|
98
|
+
* Fehler zwischen Provideraufruf und Speichern darf nie als `succeeded`
|
|
99
|
+
* protokolliert werden, nur weil der Provider geantwortet hat. Traegt
|
|
100
|
+
* ebenfalls keine Bilddaten — nur Status, Zaehlung und die Item-Kennung,
|
|
101
|
+
* falls eine entstand.
|
|
102
|
+
*/
|
|
103
|
+
readonly imageGenerationFinished: "szenen.image_generation_finished";
|
|
104
|
+
/**
|
|
105
|
+
* Ein Bild-Batch ist kanonisch gespeichert — Stufe 6.9.2, Gate D
|
|
106
|
+
* (D-6.9.2-6).
|
|
107
|
+
*
|
|
108
|
+
* Erscheint erst, **nachdem** jedes Bild des Batches im Bildbestand liegt
|
|
109
|
+
* (`hfUploadImage` + `image_added`, dieselbe Reihenfolge wie
|
|
110
|
+
* `hfImageLibrary.putImage`) — kein Bild gilt als vorhanden, bevor sein
|
|
111
|
+
* Upload bestätigt ist (R3). Trägt bewusst **keine Bilddaten**, nur den
|
|
112
|
+
* vollständigen Metadatennachweis, den `listBatchesForPromptRun()` /
|
|
113
|
+
* `getBatch()` ohne MySQL rekonstruieren können müssen: `item_id`,
|
|
114
|
+
* `prompt_run_id`, `generation_batch_id`, `source_kind`, je Bild
|
|
115
|
+
* `position`, `media_ref`, `asset_id`, `model`, `seed`, `width`/`height`.
|
|
116
|
+
*
|
|
117
|
+
* Additiv wie jedes Ereignis dieser Domain: ein zweiter Batch desselben
|
|
118
|
+
* Laufs ist ein **weiteres** Ereignis mit derselben `item_id`, nicht eine
|
|
119
|
+
* Änderung am ersten (D-113/D-121 — ein Lauf bleibt ein Item). Gilt für
|
|
120
|
+
* `generated_in_app` **und** `external_import` — nur `source_kind`
|
|
121
|
+
* unterscheidet die beiden Schreiber (D-116/D-117/D-120).
|
|
122
|
+
*
|
|
123
|
+
* Der Elementreducer ignoriert auch diesen Typ (`default:`-Zweig); gelesen
|
|
124
|
+
* wird mit `collectImageBatches` (`imageBatchStore.ts`).
|
|
125
|
+
*/
|
|
126
|
+
readonly imageBatchPersisted: "szenen.image_batch_persisted";
|
|
127
|
+
};
|
|
128
|
+
/** Ein einzelnes Bild innerhalb von `ImageBatchPersistedPayload` (D-6.9.2-6). */
|
|
129
|
+
interface ImageBatchPersistedImage {
|
|
130
|
+
position: number;
|
|
131
|
+
/** Im aktuellen Host auflösbarer Locator — hier die HF-Bildkennung (D-93). */
|
|
132
|
+
media_ref: string;
|
|
133
|
+
/** Fachlich stabile Identität, soweit bekannt — hier identisch mit `media_ref` (D-118). */
|
|
134
|
+
asset_id?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Der **bestätigte** MIME-Typ der abgelegten Datei — Review 2026-08-18 §5 P2.
|
|
137
|
+
*
|
|
138
|
+
* Additiv nachgetragen, weil der Batch ihn beim Schreiben kennt, ihn aber
|
|
139
|
+
* nicht führte: Der Lesepfad musste die Dateiendung deshalb über zwei
|
|
140
|
+
* Varianten erraten. Geraten wird nichts mehr — der Typ stammt aus den
|
|
141
|
+
* tatsächlichen Bildbytes (`typAusBytes`), nicht aus einer Annahme, und
|
|
142
|
+
* bestimmt den Pfad `images/<id>.<ext>`, unter dem die Datei liegt.
|
|
143
|
+
*
|
|
144
|
+
* Optional, weil ältere Ereignisse ihn nicht tragen; für die fällt der
|
|
145
|
+
* Lesepfad auf den Bestandseintrag zurück.
|
|
146
|
+
*/
|
|
147
|
+
mime_type?: string | null;
|
|
148
|
+
model?: string | null;
|
|
149
|
+
/** Nur gesetzt, wenn der Provider ihn tatsächlich zurückliefert (D-107). */
|
|
150
|
+
seed?: number | null;
|
|
151
|
+
width?: number | null;
|
|
152
|
+
height?: number | null;
|
|
153
|
+
}
|
|
154
|
+
/** Nutzlast von `imageBatchPersisted` — geschrieben nach bestätigtem Bild-Upload. */
|
|
155
|
+
interface ImageBatchPersistedPayload {
|
|
156
|
+
item_id: string;
|
|
157
|
+
prompt_run_id: string;
|
|
158
|
+
generation_batch_id: string;
|
|
159
|
+
source_kind: 'generated_in_app' | 'external_import';
|
|
160
|
+
title: string;
|
|
161
|
+
images: readonly ImageBatchPersistedImage[];
|
|
162
|
+
created_at: string;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Ein Event, wie der Reducer es sieht.
|
|
166
|
+
*
|
|
167
|
+
* Nur `type`, `payload` und `clientId` sind fachlich. `ts` dient allein der
|
|
168
|
+
* **Lesereihenfolge** des Logs und darf nie eine fachliche Vorrangfrage
|
|
169
|
+
* entscheiden — sonst wäre es `MAX(ts)` durch die Hintertür (§2.5, R-3).
|
|
170
|
+
*/
|
|
171
|
+
interface ElementEvent<P = unknown> {
|
|
172
|
+
type: string;
|
|
173
|
+
payload: P;
|
|
174
|
+
clientId: string;
|
|
175
|
+
ts: number;
|
|
176
|
+
}
|
|
177
|
+
/** Ein Befund beim Falten: etwas ist widersprüchlich, aber der Zustand bleibt lesbar. */
|
|
178
|
+
interface ReducerFinding {
|
|
179
|
+
code: 'unbekanntes_element' | 'version_doppelt' | 'version_veraendert' | 'draft_fork' | 'metadata_fork' | 'preferred_head_fork' | 'element_doppelt';
|
|
180
|
+
element_id: string;
|
|
181
|
+
message: string;
|
|
182
|
+
}
|
|
183
|
+
/** Abgeleiteter Zustand über alle Elemente. */
|
|
184
|
+
interface ElementStoreState {
|
|
185
|
+
elements: ReadonlyMap<string, ElementSnapshot>;
|
|
186
|
+
findings: readonly ReducerFinding[];
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Faltet den Event-Log zum Elementzustand.
|
|
190
|
+
*
|
|
191
|
+
* Der Reducer ist rein: gleiche Events, gleicher Zustand — unabhängig von der
|
|
192
|
+
* Eingabereihenfolge.
|
|
193
|
+
*
|
|
194
|
+
* @param events Alle bekannten Szenen-Events; fremde Typen werden übergangen.
|
|
195
|
+
*/
|
|
196
|
+
declare function reduceElementEvents(events: readonly ElementEvent[]): ElementStoreState;
|
|
197
|
+
/** Aktuelle Revision des Entwurfs. `0`, wenn keiner existiert. */
|
|
198
|
+
declare function draftRevisionOf(snapshot: ElementSnapshot | null | undefined): number;
|
|
199
|
+
/**
|
|
200
|
+
* Quellrevision eines gelesenen Event-Logs (D-62 §2.4, D-63 §1.1.2).
|
|
201
|
+
*
|
|
202
|
+
* Die Projektion darf sich nur dann `current` nennen, wenn sie belegen kann,
|
|
203
|
+
* **bis wohin** sie reicht. Dieser Beleg ist die Quellrevision, und sie muss
|
|
204
|
+
* zwei Eigenschaften haben: aus dem Log allein berechenbar (sonst wäre sie eine
|
|
205
|
+
* zweite Buchführung) und für zwei verschiedene Logstände verschieden.
|
|
206
|
+
*
|
|
207
|
+
* Beides leistet `Anzahl@größter-Zeitstempel`. Der Log ist append-only — es
|
|
208
|
+
* verschwindet nie ein Event —, also wächst die Anzahl bei jedem Schreibvorgang.
|
|
209
|
+
* Der Zeitstempel kommt dazu, weil er den Stand für einen Menschen lesbar macht;
|
|
210
|
+
* entscheidend ist die Anzahl.
|
|
211
|
+
*
|
|
212
|
+
* Bewusst **kein** Hash über die Payloads: der wäre teurer und würde
|
|
213
|
+
* Gleichheit über die Zeit versprechen, die der Log ohnehin schon garantiert.
|
|
214
|
+
* Und bewusst hier, nicht im Server: der Projektor rechnet damit, und wer den
|
|
215
|
+
* Stand prüfen will, soll dieselbe Rechnung fahren (R-2).
|
|
216
|
+
*/
|
|
217
|
+
declare function logRevisionOf(events: readonly ElementEvent[]): string;
|
|
218
|
+
/** Aktuelle Revision der Preferred-Head-Auswahl eines Kontexts. `0`, wenn keine existiert. */
|
|
219
|
+
declare function preferredHeadRevisionOf(events: readonly ElementEvent[], elementId: string, contextId: string): number;
|
|
220
|
+
|
|
221
|
+
/** Aktuelle Fassung des Dateiformats. */
|
|
222
|
+
declare const SZENEN_SNAPSHOT_SCHEMA_VERSION = 1;
|
|
223
|
+
/** Namenspräfix des Snapshots im Namensraum bzw. im Dateilog. */
|
|
224
|
+
declare const SZENEN_SNAPSHOT_PREFIX = "szenen-state-";
|
|
225
|
+
/** Dateiname des Snapshots in einem dateigestützten Log (dort gibt es nur einen). */
|
|
226
|
+
declare const SZENEN_SNAPSHOT_FILE = "szenen-state.json";
|
|
227
|
+
/**
|
|
228
|
+
* Was ein Snapshot über die von ihm aufgenommenen Ereignisse aussagt.
|
|
229
|
+
*
|
|
230
|
+
* Redundant zu `events` — und genau deshalb da: Stimmen `count` und `max_ts`
|
|
231
|
+
* nicht mit dem Inhalt überein, ist die Datei beschädigt, und das muss laut
|
|
232
|
+
* auffallen statt eine falsche Revision zu erzeugen (Regel 4).
|
|
233
|
+
*/
|
|
234
|
+
interface SzenenSnapshotConsumed {
|
|
235
|
+
count: number;
|
|
236
|
+
max_ts: number;
|
|
237
|
+
/**
|
|
238
|
+
* Die Dateinamen (ohne Verzeichnis), aus denen dieser Snapshot entstand.
|
|
239
|
+
*
|
|
240
|
+
* **Warum nicht der Zeitstempel als Schnitt.** Naheliegend waere „alles mit
|
|
241
|
+
* `ts > consumed.max_ts` ist neu" — dieselbe Regel, mit der die FA App gegen
|
|
242
|
+
* `consolidatedAt` filtert. Sie ist hier aber **falsch**: Beide Kanaele
|
|
243
|
+
* vergeben `ts = Math.max(wallTs, letzterTs)`, also *monoton*, aber nicht
|
|
244
|
+
* *streng* monoton. Zwei Ereignisse derselben Millisekunde tragen denselben
|
|
245
|
+
* Zeitstempel; getrennt werden sie ueber die laufende Nummer im Dateinamen.
|
|
246
|
+
* Nimmt der Lauf das eine auf und wird das andere unmittelbar danach
|
|
247
|
+
* geschrieben, verwuerfe ein `ts >`-Schnitt das zweite fuer immer — genau der
|
|
248
|
+
* stille Datenverlust, gegen den D-136 antritt. Gefunden vom Dateikanal-Test.
|
|
249
|
+
*
|
|
250
|
+
* Der Dateiname ist dagegen eindeutig, und er ist in beiden Kanaelen
|
|
251
|
+
* derselbe: `createFileEventChannel` schreibt ausdruecklich dieselben Namen
|
|
252
|
+
* wie `writeHFEvent` (`<ts>_<seq><uuid>.json`).
|
|
253
|
+
*/
|
|
254
|
+
paths: readonly string[];
|
|
255
|
+
}
|
|
256
|
+
interface SzenenSnapshot {
|
|
257
|
+
schema_version: number;
|
|
258
|
+
consumed: SzenenSnapshotConsumed;
|
|
259
|
+
events: readonly ElementEvent[];
|
|
260
|
+
}
|
|
261
|
+
/** Dateiname eines Snapshots, der bis `maxTs` reicht. */
|
|
262
|
+
declare function szenenSnapshotFilename(maxTs: number): string;
|
|
263
|
+
/** Erkennt einen Snapshot-Dateinamen — nicht den ganzen Pfad. */
|
|
264
|
+
declare function istSzenenSnapshotDatei(name: string): boolean;
|
|
265
|
+
/**
|
|
266
|
+
* Baut einen Snapshot aus dem bisherigen Snapshot und den neu aufgenommenen
|
|
267
|
+
* Ereignissen.
|
|
268
|
+
*
|
|
269
|
+
* Die Reihenfolge ist die Lesereihenfolge des Logs: erst das Ältere. Mehrere
|
|
270
|
+
* Faltungen entscheiden „der erste gilt" (`collectPromptRuns`,
|
|
271
|
+
* `collectImageGenerationOrders`), deshalb ist sie fachlich und nicht kosmetisch.
|
|
272
|
+
*/
|
|
273
|
+
declare function buildSzenenSnapshot(base: SzenenSnapshot | null, neue: readonly ElementEvent[], neuePfade?: readonly string[]): SzenenSnapshot;
|
|
274
|
+
/**
|
|
275
|
+
* Liest einen Snapshot aus geparstem JSON — laut, nie tolerant.
|
|
276
|
+
*
|
|
277
|
+
* Ein halb gelesener Snapshot wäre schlimmer als gar keiner: Er machte die
|
|
278
|
+
* Quellrevision kleiner, als sie ist, und damit liefe die monotone
|
|
279
|
+
* Projektionsschranke aus PR 341 rückwärts. Also `throw`, kein Default
|
|
280
|
+
* (Regel 4).
|
|
281
|
+
*/
|
|
282
|
+
declare function parseSzenenSnapshot(raw: unknown, herkunft: string): SzenenSnapshot;
|
|
283
|
+
/** Das Ergebnis eines Lesevorgangs „Snapshot + ausstehende Ereignisse". */
|
|
284
|
+
interface SzenenLeseErgebnis {
|
|
285
|
+
events: readonly ElementEvent[];
|
|
286
|
+
/**
|
|
287
|
+
* Ausstehende Ereignisse, die der Snapshot bereits enthaelt.
|
|
288
|
+
*
|
|
289
|
+
* Regelfall `0`. Groesser wird es, wenn ein Archivierungs-Batch scheiterte —
|
|
290
|
+
* der Lauf laesst solche Dateien ausdruecklich in `events/` liegen. Sie hier
|
|
291
|
+
* mitzuzaehlen ergaebe eine zu grosse Revision und Doppeleintraege in den
|
|
292
|
+
* Faltungen; deshalb werden sie am Schnitt verworfen und **gezaehlt**, damit
|
|
293
|
+
* eine unerwartete Zahl auffaellt statt zu verschwinden.
|
|
294
|
+
*/
|
|
295
|
+
bereitsImSnapshot: number;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Fuegt Snapshot und ausstehende Ereignisse zu dem zusammen, was ein Kanal
|
|
299
|
+
* zurueckgibt.
|
|
300
|
+
*
|
|
301
|
+
* **Der Schnitt liegt nicht hier**, sondern dort, wo die Dateinamen bekannt
|
|
302
|
+
* sind: Ein Leser siebt seine Dateien vorher ueber `istBereitsAufgenommen`
|
|
303
|
+
* bzw. `aufgenommeneDateien` aus. Diese Funktion setzt nur noch zusammen —
|
|
304
|
+
* Snapshot zuerst, denn das ist die Lesereihenfolge des Logs, und mehrere
|
|
305
|
+
* Faltungen entscheiden „der erste gilt".
|
|
306
|
+
*
|
|
307
|
+
* @param bereitsImSnapshot Wie viele ausstehende Ereignisse der Aufrufer beim
|
|
308
|
+
* Aussieben verworfen hat. Nur zur Meldung.
|
|
309
|
+
*/
|
|
310
|
+
declare function mergeSnapshotAndPending(snapshot: SzenenSnapshot | null, pending: readonly ElementEvent[], bereitsImSnapshot?: number): SzenenLeseErgebnis;
|
|
311
|
+
|
|
9
312
|
/** Rohes JSON-Schema, wie es in der Spezifikation steht. */
|
|
10
313
|
type RawSchema = Record<string, unknown>;
|
|
11
314
|
/** Alle Typschemas der Domain, geschluesselt nach Dateiname wie in der Quelle. */
|
|
@@ -726,218 +1029,6 @@ declare function runPromptDerivation(input: RendererInput, port: TextGenerationP
|
|
|
726
1029
|
system_prompt: string;
|
|
727
1030
|
}>;
|
|
728
1031
|
|
|
729
|
-
/** Präfix aller Events dieser Domain im gemeinsamen HF-Event-Kanal. */
|
|
730
|
-
declare const SZENEN_EVENT_PREFIX = "szenen.";
|
|
731
|
-
declare const SZENEN_EVENT_TYPES: {
|
|
732
|
-
readonly elementCreated: "szenen.element_created";
|
|
733
|
-
readonly elementRetired: "szenen.element_retired";
|
|
734
|
-
readonly metadataRevised: "szenen.element_metadata_revised";
|
|
735
|
-
readonly draftWritten: "szenen.element_draft_written";
|
|
736
|
-
readonly versionPublished: "szenen.element_version_published";
|
|
737
|
-
readonly preferredHeadSelected: "szenen.element_preferred_head_selected";
|
|
738
|
-
/**
|
|
739
|
-
* Ein Prompt-Ableitungslauf — Stufe 3, S6 (E-3b).
|
|
740
|
-
*
|
|
741
|
-
* Ein Lauf ist **kein Element**: keine Version, kein DAG, nicht
|
|
742
|
-
* referenzierbar. Er liegt trotzdem im selben autoritativen Log, weil er
|
|
743
|
-
* append-only und unveränderlich ist — genau die Form, die ein Ereignislog
|
|
744
|
-
* nativ trägt — und weil MySQL sonst zu einem zweiten fachlichen Speicher
|
|
745
|
-
* würde, den D-62 abgeschafft hat.
|
|
746
|
-
*
|
|
747
|
-
* Der Elementreducer ignoriert diesen Typ (`default:`-Zweig); die Läufe
|
|
748
|
-
* werden mit `collectPromptRuns` gelesen.
|
|
749
|
-
*/
|
|
750
|
-
readonly promptRunRecorded: "szenen.prompt_run_recorded";
|
|
751
|
-
/**
|
|
752
|
-
* Ein Szenen-Rekonstruktionslauf — Stufe 6.5 (D-71).
|
|
753
|
-
*
|
|
754
|
-
* Derselbe Bauplan und dieselbe Begründung wie beim Prompt-Lauf: append-only,
|
|
755
|
-
* unveränderlich, **kein Element** — keine Version, kein DAG, nicht
|
|
756
|
-
* referenzierbar. Er liegt im autoritativen Log, weil er genau die Form hat,
|
|
757
|
-
* die ein Ereignislog nativ trägt.
|
|
758
|
-
*
|
|
759
|
-
* Bewusst ein zweiter Lauftyp und **kein** gemeinsamer: Ein Prompt-Lauf geht
|
|
760
|
-
* von einer veröffentlichten Shot-Version aus, ein Rekonstruktionslauf von
|
|
761
|
-
* einer Referenz, die noch zu gar keinem Element gehört. Sie in einen Typ zu
|
|
762
|
-
* zwingen hieße, beiden ihre Herkunftsfelder zu nehmen.
|
|
763
|
-
*
|
|
764
|
-
* Der Elementreducer ignoriert auch diesen Typ (`default:`-Zweig).
|
|
765
|
-
*/
|
|
766
|
-
readonly sceneDerivationRecorded: "szenen.scene_derivation_recorded";
|
|
767
|
-
/**
|
|
768
|
-
* Ein ausdrücklich ausgelöster Lauf gegen den **echten** Provider.
|
|
769
|
-
*
|
|
770
|
-
* Er kostet Geld und wird deshalb nie beiläufig gefahren. Das Ereignis hält
|
|
771
|
-
* fest, was tatsächlich bezahlt wurde: wie viele Modellaufrufe, mit welchem
|
|
772
|
-
* Ausgang, in welcher Umgebung und von wem ausgelöst.
|
|
773
|
-
*
|
|
774
|
-
* Es ersetzt **nicht** die einzelnen Läufe — die werden regulär als
|
|
775
|
-
* `prompt_run_recorded` bzw. `scene_derivation_recorded` protokolliert. Es
|
|
776
|
-
* ist die Klammer darüber und der Grund, warum jemand später nachlesen kann,
|
|
777
|
-
* ob der Durchstich stattgefunden hat, ohne ihn erneut zu bezahlen.
|
|
778
|
-
*/
|
|
779
|
-
readonly providerCheckRecorded: "szenen.provider_check_recorded";
|
|
780
|
-
/**
|
|
781
|
-
* Eine geprüfte Arbeitsfassung eines fehlgeschlagenen Rekonstruktionslaufs —
|
|
782
|
-
* Stufe 6.6 (D-99).
|
|
783
|
-
*
|
|
784
|
-
* Sie ist **kein Lauf**: kein Provideraufruf, keine Kosten, kein Zielmodell.
|
|
785
|
-
* Sie ist die lokal geprüfte Korrektur eines bereits bezahlten Ergebnisses
|
|
786
|
-
* und zeigt über `run_id` auf ihren Ursprung. Der `raw_output` jenes Laufs
|
|
787
|
-
* bleibt unangetastet — deshalb ein eigenes Ereignis statt einer Änderung am
|
|
788
|
-
* bestehenden, das es ohnehin nicht geben dürfte (D-71).
|
|
789
|
-
*
|
|
790
|
-
* Mehrere Rettungen zum selben Lauf sind zulässig und erwartet: Jede
|
|
791
|
-
* Korrekturrunde ist nachvollziehbare Arbeit, kein Update der vorigen.
|
|
792
|
-
*
|
|
793
|
-
* Der Elementreducer ignoriert auch diesen Typ (`default:`-Zweig).
|
|
794
|
-
*/
|
|
795
|
-
readonly sceneDerivationRecoveryRecorded: "szenen.scene_derivation_recovery_recorded";
|
|
796
|
-
/**
|
|
797
|
-
* Ein bezahlter Bildgenerierungsauftrag beginnt — Stufe 6.7 (D-119).
|
|
798
|
-
*
|
|
799
|
-
* Append-only wie jedes andere Ereignis dieser Domain, geschrieben **vor**
|
|
800
|
-
* dem Provideraufruf. Es traegt **keine Bilddaten** — nur die Kennung, mit
|
|
801
|
-
* der die spaetere kanonische Batch-Persistenz (`saveGeneratedAssetBatch`,
|
|
802
|
-
* Teil C) wiedergefunden wird. Ein Crash zwischen diesem Ereignis und
|
|
803
|
-
* `imageGenerationFinished` loescht den Auftrag nicht: Er bleibt lesbar,
|
|
804
|
-
* ohne dass irgendein automatischer Retry darauf reagiert.
|
|
805
|
-
*
|
|
806
|
-
* Gilt nur fuer `generated_in_app` — ein externer Import (D-108/D-117)
|
|
807
|
-
* ruft keinen Provider und braucht deshalb kein `started`; sein Nachweis
|
|
808
|
-
* ist das gespeicherte Library-Item selbst.
|
|
809
|
-
*
|
|
810
|
-
* Der Elementreducer ignoriert auch diesen Typ (`default:`-Zweig); gelesen
|
|
811
|
-
* wird mit `collectImageGenerationOrders`.
|
|
812
|
-
*/
|
|
813
|
-
readonly imageGenerationStarted: "szenen.image_generation_started";
|
|
814
|
-
/**
|
|
815
|
-
* Derselbe Bildgenerierungsauftrag endet — Stufe 6.7 (D-119).
|
|
816
|
-
*
|
|
817
|
-
* Erscheint erst **nach** der kanonischen Batch-Persistenz: Ein technischer
|
|
818
|
-
* Fehler zwischen Provideraufruf und Speichern darf nie als `succeeded`
|
|
819
|
-
* protokolliert werden, nur weil der Provider geantwortet hat. Traegt
|
|
820
|
-
* ebenfalls keine Bilddaten — nur Status, Zaehlung und die Item-Kennung,
|
|
821
|
-
* falls eine entstand.
|
|
822
|
-
*/
|
|
823
|
-
readonly imageGenerationFinished: "szenen.image_generation_finished";
|
|
824
|
-
/**
|
|
825
|
-
* Ein Bild-Batch ist kanonisch gespeichert — Stufe 6.9.2, Gate D
|
|
826
|
-
* (D-6.9.2-6).
|
|
827
|
-
*
|
|
828
|
-
* Erscheint erst, **nachdem** jedes Bild des Batches im Bildbestand liegt
|
|
829
|
-
* (`hfUploadImage` + `image_added`, dieselbe Reihenfolge wie
|
|
830
|
-
* `hfImageLibrary.putImage`) — kein Bild gilt als vorhanden, bevor sein
|
|
831
|
-
* Upload bestätigt ist (R3). Trägt bewusst **keine Bilddaten**, nur den
|
|
832
|
-
* vollständigen Metadatennachweis, den `listBatchesForPromptRun()` /
|
|
833
|
-
* `getBatch()` ohne MySQL rekonstruieren können müssen: `item_id`,
|
|
834
|
-
* `prompt_run_id`, `generation_batch_id`, `source_kind`, je Bild
|
|
835
|
-
* `position`, `media_ref`, `asset_id`, `model`, `seed`, `width`/`height`.
|
|
836
|
-
*
|
|
837
|
-
* Additiv wie jedes Ereignis dieser Domain: ein zweiter Batch desselben
|
|
838
|
-
* Laufs ist ein **weiteres** Ereignis mit derselben `item_id`, nicht eine
|
|
839
|
-
* Änderung am ersten (D-113/D-121 — ein Lauf bleibt ein Item). Gilt für
|
|
840
|
-
* `generated_in_app` **und** `external_import` — nur `source_kind`
|
|
841
|
-
* unterscheidet die beiden Schreiber (D-116/D-117/D-120).
|
|
842
|
-
*
|
|
843
|
-
* Der Elementreducer ignoriert auch diesen Typ (`default:`-Zweig); gelesen
|
|
844
|
-
* wird mit `collectImageBatches` (`imageBatchStore.ts`).
|
|
845
|
-
*/
|
|
846
|
-
readonly imageBatchPersisted: "szenen.image_batch_persisted";
|
|
847
|
-
};
|
|
848
|
-
/** Ein einzelnes Bild innerhalb von `ImageBatchPersistedPayload` (D-6.9.2-6). */
|
|
849
|
-
interface ImageBatchPersistedImage {
|
|
850
|
-
position: number;
|
|
851
|
-
/** Im aktuellen Host auflösbarer Locator — hier die HF-Bildkennung (D-93). */
|
|
852
|
-
media_ref: string;
|
|
853
|
-
/** Fachlich stabile Identität, soweit bekannt — hier identisch mit `media_ref` (D-118). */
|
|
854
|
-
asset_id?: string;
|
|
855
|
-
/**
|
|
856
|
-
* Der **bestätigte** MIME-Typ der abgelegten Datei — Review 2026-08-18 §5 P2.
|
|
857
|
-
*
|
|
858
|
-
* Additiv nachgetragen, weil der Batch ihn beim Schreiben kennt, ihn aber
|
|
859
|
-
* nicht führte: Der Lesepfad musste die Dateiendung deshalb über zwei
|
|
860
|
-
* Varianten erraten. Geraten wird nichts mehr — der Typ stammt aus den
|
|
861
|
-
* tatsächlichen Bildbytes (`typAusBytes`), nicht aus einer Annahme, und
|
|
862
|
-
* bestimmt den Pfad `images/<id>.<ext>`, unter dem die Datei liegt.
|
|
863
|
-
*
|
|
864
|
-
* Optional, weil ältere Ereignisse ihn nicht tragen; für die fällt der
|
|
865
|
-
* Lesepfad auf den Bestandseintrag zurück.
|
|
866
|
-
*/
|
|
867
|
-
mime_type?: string | null;
|
|
868
|
-
model?: string | null;
|
|
869
|
-
/** Nur gesetzt, wenn der Provider ihn tatsächlich zurückliefert (D-107). */
|
|
870
|
-
seed?: number | null;
|
|
871
|
-
width?: number | null;
|
|
872
|
-
height?: number | null;
|
|
873
|
-
}
|
|
874
|
-
/** Nutzlast von `imageBatchPersisted` — geschrieben nach bestätigtem Bild-Upload. */
|
|
875
|
-
interface ImageBatchPersistedPayload {
|
|
876
|
-
item_id: string;
|
|
877
|
-
prompt_run_id: string;
|
|
878
|
-
generation_batch_id: string;
|
|
879
|
-
source_kind: 'generated_in_app' | 'external_import';
|
|
880
|
-
title: string;
|
|
881
|
-
images: readonly ImageBatchPersistedImage[];
|
|
882
|
-
created_at: string;
|
|
883
|
-
}
|
|
884
|
-
/**
|
|
885
|
-
* Ein Event, wie der Reducer es sieht.
|
|
886
|
-
*
|
|
887
|
-
* Nur `type`, `payload` und `clientId` sind fachlich. `ts` dient allein der
|
|
888
|
-
* **Lesereihenfolge** des Logs und darf nie eine fachliche Vorrangfrage
|
|
889
|
-
* entscheiden — sonst wäre es `MAX(ts)` durch die Hintertür (§2.5, R-3).
|
|
890
|
-
*/
|
|
891
|
-
interface ElementEvent<P = unknown> {
|
|
892
|
-
type: string;
|
|
893
|
-
payload: P;
|
|
894
|
-
clientId: string;
|
|
895
|
-
ts: number;
|
|
896
|
-
}
|
|
897
|
-
/** Ein Befund beim Falten: etwas ist widersprüchlich, aber der Zustand bleibt lesbar. */
|
|
898
|
-
interface ReducerFinding {
|
|
899
|
-
code: 'unbekanntes_element' | 'version_doppelt' | 'version_veraendert' | 'draft_fork' | 'metadata_fork' | 'preferred_head_fork' | 'element_doppelt';
|
|
900
|
-
element_id: string;
|
|
901
|
-
message: string;
|
|
902
|
-
}
|
|
903
|
-
/** Abgeleiteter Zustand über alle Elemente. */
|
|
904
|
-
interface ElementStoreState {
|
|
905
|
-
elements: ReadonlyMap<string, ElementSnapshot>;
|
|
906
|
-
findings: readonly ReducerFinding[];
|
|
907
|
-
}
|
|
908
|
-
/**
|
|
909
|
-
* Faltet den Event-Log zum Elementzustand.
|
|
910
|
-
*
|
|
911
|
-
* Der Reducer ist rein: gleiche Events, gleicher Zustand — unabhängig von der
|
|
912
|
-
* Eingabereihenfolge.
|
|
913
|
-
*
|
|
914
|
-
* @param events Alle bekannten Szenen-Events; fremde Typen werden übergangen.
|
|
915
|
-
*/
|
|
916
|
-
declare function reduceElementEvents(events: readonly ElementEvent[]): ElementStoreState;
|
|
917
|
-
/** Aktuelle Revision des Entwurfs. `0`, wenn keiner existiert. */
|
|
918
|
-
declare function draftRevisionOf(snapshot: ElementSnapshot | null | undefined): number;
|
|
919
|
-
/**
|
|
920
|
-
* Quellrevision eines gelesenen Event-Logs (D-62 §2.4, D-63 §1.1.2).
|
|
921
|
-
*
|
|
922
|
-
* Die Projektion darf sich nur dann `current` nennen, wenn sie belegen kann,
|
|
923
|
-
* **bis wohin** sie reicht. Dieser Beleg ist die Quellrevision, und sie muss
|
|
924
|
-
* zwei Eigenschaften haben: aus dem Log allein berechenbar (sonst wäre sie eine
|
|
925
|
-
* zweite Buchführung) und für zwei verschiedene Logstände verschieden.
|
|
926
|
-
*
|
|
927
|
-
* Beides leistet `Anzahl@größter-Zeitstempel`. Der Log ist append-only — es
|
|
928
|
-
* verschwindet nie ein Event —, also wächst die Anzahl bei jedem Schreibvorgang.
|
|
929
|
-
* Der Zeitstempel kommt dazu, weil er den Stand für einen Menschen lesbar macht;
|
|
930
|
-
* entscheidend ist die Anzahl.
|
|
931
|
-
*
|
|
932
|
-
* Bewusst **kein** Hash über die Payloads: der wäre teurer und würde
|
|
933
|
-
* Gleichheit über die Zeit versprechen, die der Log ohnehin schon garantiert.
|
|
934
|
-
* Und bewusst hier, nicht im Server: der Projektor rechnet damit, und wer den
|
|
935
|
-
* Stand prüfen will, soll dieselbe Rechnung fahren (R-2).
|
|
936
|
-
*/
|
|
937
|
-
declare function logRevisionOf(events: readonly ElementEvent[]): string;
|
|
938
|
-
/** Aktuelle Revision der Preferred-Head-Auswahl eines Kontexts. `0`, wenn keine existiert. */
|
|
939
|
-
declare function preferredHeadRevisionOf(events: readonly ElementEvent[], elementId: string, contextId: string): number;
|
|
940
|
-
|
|
941
1032
|
/** Ein protokollierter Lauf, so wie er im Ereignis steht. */
|
|
942
1033
|
/**
|
|
943
1034
|
* Woher die eingefrorene Eingabe eines Laufs stammt — Stufe 6.6 (D-98).
|
|
@@ -1829,14 +1920,24 @@ interface CreateHfEventChannelOptions {
|
|
|
1829
1920
|
namespace: string;
|
|
1830
1921
|
token: string;
|
|
1831
1922
|
/**
|
|
1832
|
-
* Nur Events ab diesem Zeitpunkt lesen. Vorgabe `0` —
|
|
1923
|
+
* Nur Events ab diesem Zeitpunkt lesen. Vorgabe `0` — ab dem Snapshot.
|
|
1833
1924
|
*
|
|
1834
|
-
*
|
|
1835
|
-
*
|
|
1836
|
-
*
|
|
1837
|
-
*
|
|
1925
|
+
* Seit D-136 Schritt B gibt es den Snapshot-Mechanismus, den diese Option
|
|
1926
|
+
* lange vorwegnahm: `szenen-state-<ts>.json` trägt die vom Verdichtungslauf
|
|
1927
|
+
* aufgenommenen Ereignisse, und der Kanal liest danach nur noch, was seither
|
|
1928
|
+
* dazukam. Ein ausdrücklich gesetztes `sinceTs` gilt zusätzlich — es kann den
|
|
1929
|
+
* Schnitt nur nach hinten schieben, nie vor den Snapshot zurück.
|
|
1838
1930
|
*/
|
|
1839
1931
|
sinceTs?: number;
|
|
1932
|
+
/**
|
|
1933
|
+
* Den Snapshot übergehen und den vollen `events/`-Bestand lesen.
|
|
1934
|
+
*
|
|
1935
|
+
* Für den Verdichtungslauf selbst und für Diagnosewerkzeuge. Im Normalbetrieb
|
|
1936
|
+
* **nicht** setzen: Nach einer Verdichtung liegt der grösste Teil des Logs
|
|
1937
|
+
* im Snapshot, und ohne ihn läse der Kanal einen unvollständigen Stand — also
|
|
1938
|
+
* eine zu kleine Quellrevision (D-62 §2.4).
|
|
1939
|
+
*/
|
|
1940
|
+
ohneSnapshot?: boolean;
|
|
1840
1941
|
}
|
|
1841
1942
|
/**
|
|
1842
1943
|
* Baut einen `ElementEventChannel` auf dem HF-Dataset.
|
|
@@ -1860,6 +1961,15 @@ interface CreateInMemoryEventChannelOptions {
|
|
|
1860
1961
|
now?: () => number;
|
|
1861
1962
|
/** Gemeinsamer Log, wenn mehrere Clients denselben Kanal teilen. */
|
|
1862
1963
|
shared?: ElementEvent[];
|
|
1964
|
+
/**
|
|
1965
|
+
* Ein bereits verdichteter Stand (D-136 Schritt B).
|
|
1966
|
+
*
|
|
1967
|
+
* Der Kanalvertrag lautet seither „Snapshot + ausstehende Ereignisse", und er
|
|
1968
|
+
* gilt für alle drei Implementierungen. Ohne diese Option liesse sich das
|
|
1969
|
+
* hier nicht prüfen — und der Contract-Test wäre genau an der Stelle blind,
|
|
1970
|
+
* an der ein Verdichtungslauf den Bestand verändert.
|
|
1971
|
+
*/
|
|
1972
|
+
snapshot?: SzenenSnapshot | null;
|
|
1863
1973
|
}
|
|
1864
1974
|
declare function createInMemoryEventChannel(options?: CreateInMemoryEventChannelOptions): InMemoryEventChannel;
|
|
1865
1975
|
|
|
@@ -3945,4 +4055,4 @@ interface SzenenViewProps {
|
|
|
3945
4055
|
}
|
|
3946
4056
|
declare const SzenenView: React__default.FC<SzenenViewProps>;
|
|
3947
4057
|
|
|
3948
|
-
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, 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 ImageModelChoice, type ImageModelParameters, ImageProvenance, type ImageProviderInput, type ImportBatchImageInput, type ImportBatchInput, type InMemoryEventChannel, type InputError, type IntegrityVerdict, type ItemDerivationFailure, type ItemDerivationFailureClass, type ItemDerivationResult, type ItemMedium, type LibraryImage, type LibraryImageItem, type NodeContribution, NotDerivable, type Notice, type NoticeTone, PROMPT_RULE_EFFECT, type PromptBatchImageRef, type PromptBatchOrigin, 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 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 SzenenImageLibraryPort, type SzenenItemPort, type SzenenMediaPort, SzenenQueries, type SzenenRunPort, type SzenenSeedTemplatePort, SzenenView, type SzenenViewCapabilities, type SzenenViewPort, type SzenenViewProps, TargetModelResolution, TextGenerationPort, UNCHECKED_PUBLISH_RULES, UPLOAD_MAX_BYTES, type UnselectableTargetModel, UnusableProposal, type VersionMedium, type VisibilityNode, type ZipBild, 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, formatSeedListe, freezeDraftChain, freezeSceneWorkingState, gesamtHerkunft, gruppiereZuItems, hasPlacementCapability, isKnownElementType, isSzenenItemId, istZipDatei, itemIdForRun, ladeVorschauen, leseBilderAusZip, locatorTeile, logRevisionOf, mergeSzenenBatchOrigin, mitDefaultVorlage, noticeFor, ordersForPromptRun, ordneSeedsZu, parseRunResponse, parseSeedListe, preferredHeadRevisionOf, promptDiagnosticsOf, publishedHeadsOf, recoveriesForRun, recoveryStatusOf, reduceElementEvents, resolveArea, resolveScenePayload, resolveShot, resolveShotPayload, roundOfRun, rulesWithoutPromptEffect, runPromptDerivation, runStoreDifferential, sceneOnlyCapabilities, scopeOfPath, seedFehlerText, selectableTargetModels, totalModelCalls, typAusBytes, unclassifiedPublishRules, unsupportedReason };
|
|
4058
|
+
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, 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 ImageModelChoice, type ImageModelParameters, ImageProvenance, type ImageProviderInput, type ImportBatchImageInput, type ImportBatchInput, type InMemoryEventChannel, type InputError, type IntegrityVerdict, type ItemDerivationFailure, type ItemDerivationFailureClass, type ItemDerivationResult, type ItemMedium, type LibraryImage, type LibraryImageItem, type NodeContribution, NotDerivable, type Notice, type NoticeTone, PROMPT_RULE_EFFECT, type PromptBatchImageRef, type PromptBatchOrigin, 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, 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 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, 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, 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, formatSeedListe, freezeDraftChain, freezeSceneWorkingState, gesamtHerkunft, gruppiereZuItems, hasPlacementCapability, isKnownElementType, isSzenenItemId, istSzenenSnapshotDatei, istZipDatei, itemIdForRun, ladeVorschauen, leseBilderAusZip, locatorTeile, logRevisionOf, mergeSnapshotAndPending, mergeSzenenBatchOrigin, mitDefaultVorlage, noticeFor, ordersForPromptRun, ordneSeedsZu, parseRunResponse, parseSeedListe, parseSzenenSnapshot, preferredHeadRevisionOf, promptDiagnosticsOf, publishedHeadsOf, recoveriesForRun, recoveryStatusOf, reduceElementEvents, resolveArea, resolveScenePayload, resolveShot, resolveShotPayload, roundOfRun, rulesWithoutPromptEffect, runPromptDerivation, runStoreDifferential, sceneOnlyCapabilities, scopeOfPath, seedFehlerText, selectableTargetModels, szenenSnapshotFilename, totalModelCalls, typAusBytes, unclassifiedPublishRules, unsupportedReason };
|