@hugpy/video-intelligence-ui 0.1.0 → 0.3.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/package.json +1 -3
- package/src/config.ts +36 -0
- package/src/demo/assets/generate/cinema-cavern/movie.mp4 +0 -0
- package/src/demo/assets/generate/cinema-cavern/seg_00.mp4 +0 -0
- package/src/demo/assets/generate/clips/cat-lounge.mp4 +0 -0
- package/src/demo/assets/generate/clips/drone-city.mp4 +0 -0
- package/src/demo/assets/generate/clips/paper-sails.mp4 +0 -0
- package/src/demo/assets/generate/movie-galaxy/movie.mp4 +0 -0
- package/src/demo/assets/generate/movie-galaxy/seg_00.mp4 +0 -0
- package/src/demo/assets/generate/movie-galaxy/seg_01.mp4 +0 -0
- package/src/demo/assets/generate/movie-galaxy/seg_02.mp4 +0 -0
- package/src/demo/assets/generate/movie-galaxy/seg_03.mp4 +0 -0
- package/src/demo/assets/generate/movie-medow/movie.mp4 +0 -0
- package/src/demo/assets/generate/movie-medow/seg_00.mp4 +0 -0
- package/src/demo/assets/generate/movie-medow/seg_01.mp4 +0 -0
- package/src/demo/assets/generate/scene-desert/frame_00000.png +0 -0
- package/src/demo/assets/generate/scene-desert/frame_00001.png +0 -0
- package/src/demo/assets/generate/scene-desert/frame_00002.png +0 -0
- package/src/demo/assets/generate/scene-desert/frame_00003.png +0 -0
- package/src/demo/assets/generate/scene-desert/frame_00004.png +0 -0
- package/src/demo/assets/generate/scene-desert/frame_00005.png +0 -0
- package/src/demo/assets/generate/scene-desert/scene.mp4 +0 -0
- package/src/demo/assets/generate/scene-vintage/frame_00000.png +0 -0
- package/src/demo/assets/generate/scene-vintage/frame_00001.png +0 -0
- package/src/demo/assets/generate/scene-vintage/frame_00002.png +0 -0
- package/src/demo/assets/generate/scene-vintage/frame_00003.png +0 -0
- package/src/demo/assets/generate/scene-vintage/frame_00004.png +0 -0
- package/src/demo/assets/generate/scene-vintage/frame_00005.png +0 -0
- package/src/demo/assets/generate/scene-vintage/scene.mp4 +0 -0
- package/src/demo/assets/generate2/s0.png +0 -0
- package/src/demo/assets/generate2/s1.png +0 -0
- package/src/demo/assets/generate2/s10.png +0 -0
- package/src/demo/assets/generate2/s11.png +0 -0
- package/src/demo/assets/generate2/s12.png +0 -0
- package/src/demo/assets/generate2/s13.png +0 -0
- package/src/demo/assets/generate2/s14.png +0 -0
- package/src/demo/assets/generate2/s15.png +0 -0
- package/src/demo/assets/generate2/s16.png +0 -0
- package/src/demo/assets/generate2/s17.png +0 -0
- package/src/demo/assets/generate2/s18.png +0 -0
- package/src/demo/assets/generate2/s19.png +0 -0
- package/src/demo/assets/generate2/s2.png +0 -0
- package/src/demo/assets/generate2/s20.png +0 -0
- package/src/demo/assets/generate2/s21.mp4 +0 -0
- package/src/demo/assets/generate2/s22.mp4 +0 -0
- package/src/demo/assets/generate2/s23.mp4 +0 -0
- package/src/demo/assets/generate2/s24.mp4 +0 -0
- package/src/demo/assets/generate2/s25.mp4 +0 -0
- package/src/demo/assets/generate2/s26.mp4 +0 -0
- package/src/demo/assets/generate2/s27.mp4 +0 -0
- package/src/demo/assets/generate2/s28.mp4 +0 -0
- package/src/demo/assets/generate2/s29.mp4 +0 -0
- package/src/demo/assets/generate2/s3.png +0 -0
- package/src/demo/assets/generate2/s30.mp4 +0 -0
- package/src/demo/assets/generate2/s4.png +0 -0
- package/src/demo/assets/generate2/s5.png +0 -0
- package/src/demo/assets/generate2/s6.png +0 -0
- package/src/demo/assets/generate2/s7.png +0 -0
- package/src/demo/assets/generate2/s8.png +0 -0
- package/src/demo/assets/generate2/s9.png +0 -0
- package/src/demo/demoFetch.ts +126 -3
- package/src/demo/fixtures.ts +72 -4
- package/src/demo/promptAssist.ts +25 -0
- package/src/demo/sampleData.ts +960 -0
- package/src/demo/sampleSets.ts +172 -0
- package/src/stations/ActiveProcessesStation.tsx +18 -3
- package/src/stations/GenerateStation.tsx +1031 -364
- package/src/stations/GoalComposer.tsx +9 -1
- package/src/stations/ScriptFirstStation.tsx +1081 -0
- package/src/stations/ToksPanel.tsx +188 -0
- package/src/stations/WorkbenchDrawer.tsx +4 -3
- package/src/stations/WorkbenchSidebar.tsx +60 -12
- package/src/stations/oracle/DagPanel.tsx +391 -0
- package/src/stations/oracle/OracleStation.tsx +304 -0
- package/src/stations/oracle/SpatialTab.tsx +185 -0
- package/src/stations/oracle/StewardPanel.tsx +165 -0
- package/src/stations/oracle/oracle.css +467 -0
- package/src/stations/oracle/oracleShared.tsx +160 -0
- package/src/stations/oracle/oracleTypes.ts +304 -0
- package/src/stations/oracle/useOracle.ts +560 -0
- package/src/stations/registry.ts +37 -0
- package/src/stations/scriptFirst.css +350 -0
- package/src/stations/studio/IdentitiesStation.tsx +219 -292
- package/src/stations/studio/IdentityCreatePanel.tsx +390 -0
- package/src/stations/studio/StudioGenerateTab.tsx +162 -6
- package/src/stations/studio/StudioMovieComposer.tsx +763 -318
- package/src/stations/studio/{StudioMovieComposer.tsx.bak-sessions-20260812 → StudioMovieComposer.tsx.bak-declutter-20260813} +350 -48
- package/src/stations/studio/StudioPlane.tsx +35 -3
- package/src/stations/studio/StudioViewer.tsx +116 -14
- package/src/stations/studio/coordinationBadge.tsx +206 -0
- package/src/stations/studio/identityUpload.ts +66 -0
- package/src/stations/studio/promptCard.tsx +362 -59
- package/src/stations/studio/useIdentityCreateJob.ts +184 -0
- package/src/stations/studio/useIdentityProfiles.ts +66 -0
- package/src/stations/useScriptFirstRun.ts +596 -0
- package/src/style/app.css +176 -0
- package/src/video/LengthRow.tsx +189 -0
- package/src/video/LibraryGroups.tsx +81 -0
- package/src/video/UnnamedWarn.tsx +146 -0
- package/src/video/coordinationReport.ts +266 -0
- package/src/video/jobClock.ts +104 -0
- package/src/video/spreadAssist.ts +26 -0
- package/src/video/useMediaJobs.ts +26 -0
- package/src/video/useOperatorHistory.ts +105 -0
- package/src/video/useToks.ts +193 -0
- package/src/stations/ActiveProcessesStation.tsx.bak-sessions-20260812 +0 -228
- package/src/stations/GenerateStation.tsx.bak-tester-removal +0 -5170
- package/src/stations/studio/StudioMovieSessions.tsx.bak-sessions-20260812 +0 -417
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* or-k18 / k114 — wire types for the oracle surfaces, as the backend ACTUALLY
|
|
3
|
+
* returns them (routes/oracle_routes.py; oracle/steward.py HealthReport;
|
|
4
|
+
* oracle/selection.py SelectionDecision; oracle/recipes/video_performance.py
|
|
5
|
+
* VisualResult → the run manifest's `dag` block; oracle/contracts.py Scorecard).
|
|
6
|
+
*
|
|
7
|
+
* Everything optional is optional because the producing side can omit it (an
|
|
8
|
+
* older server, a disabled selector, a run that never reached the DAG). Nothing
|
|
9
|
+
* here is normalized into a friendlier shape — the UI reads the truth and says
|
|
10
|
+
* when a field is absent.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
// GET /api/oracle/steward (+ POST = apply bounded rebalancing)
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
export type FindingSeverity = "info" | "warn" | "alarm";
|
|
18
|
+
|
|
19
|
+
export interface StewardFinding {
|
|
20
|
+
kind: string; // calibration | streak | starvation | gap_rate | matrix_stale | cache | ok
|
|
21
|
+
severity: FindingSeverity | string;
|
|
22
|
+
capability: string | null;
|
|
23
|
+
message: string;
|
|
24
|
+
evidence: Record<string, unknown>;
|
|
25
|
+
action: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface StewardReport {
|
|
29
|
+
ok: boolean;
|
|
30
|
+
at?: string;
|
|
31
|
+
summary?: string;
|
|
32
|
+
findings?: StewardFinding[];
|
|
33
|
+
policy_changed?: boolean;
|
|
34
|
+
policy_after?: Record<string, unknown> | null;
|
|
35
|
+
applied?: boolean;
|
|
36
|
+
ledger_rows?: number;
|
|
37
|
+
selection_policy?: Record<string, unknown>;
|
|
38
|
+
/** 503 body: selection disabled / ledger unavailable. */
|
|
39
|
+
error?: string;
|
|
40
|
+
ledger_path?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
// POST /api/oracle/selection
|
|
45
|
+
// ---------------------------------------------------------------------------
|
|
46
|
+
|
|
47
|
+
export interface CandidateVerdict {
|
|
48
|
+
model_id: string;
|
|
49
|
+
selected: boolean;
|
|
50
|
+
score: number;
|
|
51
|
+
reasons: string[];
|
|
52
|
+
rejected_at: string | null;
|
|
53
|
+
evidence: Record<string, unknown>;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface SelectionDecision {
|
|
57
|
+
ok: boolean;
|
|
58
|
+
capability: string;
|
|
59
|
+
operation: string;
|
|
60
|
+
model_id: string | null;
|
|
61
|
+
fallback?: string | null;
|
|
62
|
+
rationale: string;
|
|
63
|
+
ranked: CandidateVerdict[];
|
|
64
|
+
rejected: CandidateVerdict[];
|
|
65
|
+
steps: string[];
|
|
66
|
+
candidate_index: number;
|
|
67
|
+
spread: boolean;
|
|
68
|
+
gap: boolean;
|
|
69
|
+
explored: boolean;
|
|
70
|
+
score: number | null;
|
|
71
|
+
error?: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface SelectionQuery {
|
|
75
|
+
capability: string;
|
|
76
|
+
quality?: "preview" | "balanced" | "best";
|
|
77
|
+
max_seconds?: number | null;
|
|
78
|
+
max_vram_gib?: number | null;
|
|
79
|
+
candidate_index?: number;
|
|
80
|
+
candidates?: number;
|
|
81
|
+
exclude?: string[];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// ---------------------------------------------------------------------------
|
|
85
|
+
// GET /api/oracle/producers?ref=… and GET /api/oracle/ledger/summary
|
|
86
|
+
// ---------------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
export interface ProducerRow {
|
|
89
|
+
ref: string;
|
|
90
|
+
capability: string;
|
|
91
|
+
model_id: string;
|
|
92
|
+
ts?: string | number | null;
|
|
93
|
+
worker?: string | null;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface ProducerLookup {
|
|
97
|
+
ok: boolean;
|
|
98
|
+
ref?: string;
|
|
99
|
+
producer?: ProducerRow | null;
|
|
100
|
+
error?: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/** Shape is the ledger's own `summary()` dict plus ok/remote; kept open. */
|
|
104
|
+
export interface LedgerSummary {
|
|
105
|
+
ok: boolean;
|
|
106
|
+
remote?: string | null;
|
|
107
|
+
error?: string;
|
|
108
|
+
ledger_path?: string;
|
|
109
|
+
[key: string]: unknown;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
// GET /api/oracle/capabilities
|
|
114
|
+
// ---------------------------------------------------------------------------
|
|
115
|
+
|
|
116
|
+
export interface CapabilityView {
|
|
117
|
+
name: string;
|
|
118
|
+
model_ids?: string[];
|
|
119
|
+
registry_version?: string | null;
|
|
120
|
+
[key: string]: unknown;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface CapabilitiesBody {
|
|
124
|
+
ok: boolean;
|
|
125
|
+
count?: number;
|
|
126
|
+
capabilities?: CapabilityView[];
|
|
127
|
+
registry_version?: string | null;
|
|
128
|
+
error?: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// ---------------------------------------------------------------------------
|
|
132
|
+
// The run manifest — GET /video/jobs/<id> → result.movie (performance_relay.py
|
|
133
|
+
// puts PerformanceResult.to_dict() there and adds `dag` = VisualResult.to_dict()
|
|
134
|
+
// when the visual stages ran on the durable DAG).
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
|
|
137
|
+
export interface Scorecard {
|
|
138
|
+
hard_pass: boolean;
|
|
139
|
+
checks?: Array<{
|
|
140
|
+
name: string;
|
|
141
|
+
kind: string;
|
|
142
|
+
value: unknown;
|
|
143
|
+
threshold: unknown;
|
|
144
|
+
passed: boolean;
|
|
145
|
+
detail?: unknown;
|
|
146
|
+
}>;
|
|
147
|
+
judge_results?: Array<{
|
|
148
|
+
judge: string;
|
|
149
|
+
verdict: string;
|
|
150
|
+
score: number | null;
|
|
151
|
+
rationale: string;
|
|
152
|
+
}>;
|
|
153
|
+
confidence?: number;
|
|
154
|
+
disagreements?: string[];
|
|
155
|
+
diagnosis?: string | null;
|
|
156
|
+
repair_code?: string | null;
|
|
157
|
+
recommended_repair?: string | null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface RepairPlan {
|
|
161
|
+
run_id: string;
|
|
162
|
+
failed_node: string;
|
|
163
|
+
code: string;
|
|
164
|
+
root: string | null;
|
|
165
|
+
path: string[];
|
|
166
|
+
strategy: string;
|
|
167
|
+
param_changes: Record<string, unknown>;
|
|
168
|
+
rationale: string;
|
|
169
|
+
repairable: boolean;
|
|
170
|
+
budget_left: number;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** A shot as the assemble node emits it (SeamExecutor._clip → "shot"). */
|
|
174
|
+
export interface DagShot {
|
|
175
|
+
segment_id: string;
|
|
176
|
+
clip_ref: string | null;
|
|
177
|
+
seconds: number | null;
|
|
178
|
+
keyframe_ref?: string | null;
|
|
179
|
+
scorecard?: Scorecard | null;
|
|
180
|
+
considered?: number;
|
|
181
|
+
[key: string]: unknown;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface DagRunRecord {
|
|
185
|
+
run_id: string;
|
|
186
|
+
graph_id: string;
|
|
187
|
+
goal_digest: string;
|
|
188
|
+
revision: number;
|
|
189
|
+
state: string; // running | paused | awaiting_approval | completed | failed | cancelled
|
|
190
|
+
repair_budget: number;
|
|
191
|
+
revisions_used: number;
|
|
192
|
+
created_at: string;
|
|
193
|
+
updated_at: string;
|
|
194
|
+
note: string | null;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface DagBlock {
|
|
198
|
+
run: DagRunRecord;
|
|
199
|
+
ok: boolean;
|
|
200
|
+
video_ref: string | null;
|
|
201
|
+
shots: DagShot[];
|
|
202
|
+
repairs: RepairPlan[];
|
|
203
|
+
failed_nodes: string[];
|
|
204
|
+
/** node_id → state (pending | awaiting_approval | leased | running | succeeded | failed | rejected | cancelled). */
|
|
205
|
+
nodes: Record<string, string>;
|
|
206
|
+
limitations: string[];
|
|
207
|
+
steward: StewardReport | null;
|
|
208
|
+
validation: Record<string, unknown> | null;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** PerformanceResult.shots[] — the linear journal's per-shot story. */
|
|
212
|
+
export interface ManifestShot {
|
|
213
|
+
segment_id: string;
|
|
214
|
+
index: number;
|
|
215
|
+
accepted: boolean;
|
|
216
|
+
keyframe_ref: string | null;
|
|
217
|
+
keyframe_seed: number | null;
|
|
218
|
+
keyframe_candidates: number;
|
|
219
|
+
keyframe_repaired: boolean;
|
|
220
|
+
keyframe_scorecard: Scorecard | null;
|
|
221
|
+
clip_ref: string | null;
|
|
222
|
+
clip_seconds: number | null;
|
|
223
|
+
clip_candidates: number;
|
|
224
|
+
clip_repaired: boolean;
|
|
225
|
+
scorecard: Scorecard | null;
|
|
226
|
+
repair_codes: string[];
|
|
227
|
+
diagnosis: string | null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface ManifestReceipt {
|
|
231
|
+
request?: Record<string, unknown>;
|
|
232
|
+
capability: string;
|
|
233
|
+
model_id: string;
|
|
234
|
+
worker: string | null;
|
|
235
|
+
started_at: string;
|
|
236
|
+
ended_at: string;
|
|
237
|
+
duration_s?: number;
|
|
238
|
+
retries?: number;
|
|
239
|
+
failure?: string | null;
|
|
240
|
+
artifacts?: Array<Record<string, unknown>>;
|
|
241
|
+
warnings?: string[];
|
|
242
|
+
log_excerpt?: string[];
|
|
243
|
+
registry_version?: string | null;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export interface RunManifest {
|
|
247
|
+
run_id: string;
|
|
248
|
+
ok: boolean;
|
|
249
|
+
goal_digest?: string;
|
|
250
|
+
stages?: Array<Record<string, unknown>>;
|
|
251
|
+
gap?: Record<string, unknown> | null;
|
|
252
|
+
stopped_after?: string | null;
|
|
253
|
+
registry_version?: string | null;
|
|
254
|
+
snapshot_digest?: string | null;
|
|
255
|
+
audio_master_digest?: string | null;
|
|
256
|
+
lock_digest?: string | null;
|
|
257
|
+
segment_digests?: string[];
|
|
258
|
+
validation?: Record<string, unknown> | null;
|
|
259
|
+
shots?: ManifestShot[];
|
|
260
|
+
video_ref?: string | null;
|
|
261
|
+
scorecard?: Scorecard | null;
|
|
262
|
+
receipts?: ManifestReceipt[];
|
|
263
|
+
artifact_refs?: string[];
|
|
264
|
+
limitations?: string[];
|
|
265
|
+
warnings?: string[];
|
|
266
|
+
state_path?: string;
|
|
267
|
+
/** Present only when the visual stages ran on the durable DAG. */
|
|
268
|
+
dag?: DagBlock | null;
|
|
269
|
+
[key: string]: unknown;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/** GET /video/jobs/<id> — media_bus.get's read-only view. */
|
|
273
|
+
export interface JobView {
|
|
274
|
+
job_id: string;
|
|
275
|
+
name: string | null;
|
|
276
|
+
status: string | null;
|
|
277
|
+
result: {
|
|
278
|
+
ok?: boolean;
|
|
279
|
+
error?: { code: string; message: string; retryable?: boolean } | null;
|
|
280
|
+
outputs?: unknown[];
|
|
281
|
+
movie?: RunManifest | null;
|
|
282
|
+
[key: string]: unknown;
|
|
283
|
+
} | null;
|
|
284
|
+
progress: Record<string, unknown> | null;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/** One derived row of the DAG state list. Every field says where it came from. */
|
|
288
|
+
export interface DagNodeRow {
|
|
289
|
+
nodeId: string;
|
|
290
|
+
/** "spatial" | "keyframe" | "clip" | "assemble" | "lock" | other prefix. */
|
|
291
|
+
kind: string;
|
|
292
|
+
segmentId: string | null;
|
|
293
|
+
state: string;
|
|
294
|
+
/** The ref this node produced, when the manifest carries one (shots[]). */
|
|
295
|
+
producedRef: string | null;
|
|
296
|
+
/** Producer model from the manifest's receipts/shots, else null (then the ledger is asked). */
|
|
297
|
+
producerModel: string | null;
|
|
298
|
+
producerSource: "receipt" | "ledger" | null;
|
|
299
|
+
/** The journal's lease fields are NOT exported in the manifest; always null here. */
|
|
300
|
+
lease: string | null;
|
|
301
|
+
scorecard: Scorecard | null;
|
|
302
|
+
repair: RepairPlan | null;
|
|
303
|
+
failed: boolean;
|
|
304
|
+
}
|