@skyphusion-labs/vivijure-core 0.9.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/LICENSE +661 -0
- package/README.md +87 -0
- package/dist/audio-routing.d.ts +2 -0
- package/dist/audio-routing.d.ts.map +1 -0
- package/dist/audio-routing.js +4 -0
- package/dist/audio-routing.js.map +1 -0
- package/dist/audio-stage.d.ts +4 -0
- package/dist/audio-stage.d.ts.map +1 -0
- package/dist/audio-stage.js +25 -0
- package/dist/audio-stage.js.map +1 -0
- package/dist/beat-analyze.d.ts +22 -0
- package/dist/beat-analyze.d.ts.map +1 -0
- package/dist/beat-analyze.js +111 -0
- package/dist/beat-analyze.js.map +1 -0
- package/dist/beat-sync-types.d.ts +33 -0
- package/dist/beat-sync-types.d.ts.map +1 -0
- package/dist/beat-sync-types.js +4 -0
- package/dist/beat-sync-types.js.map +1 -0
- package/dist/bundle-assembler.d.ts +54 -0
- package/dist/bundle-assembler.d.ts.map +1 -0
- package/dist/bundle-assembler.js +376 -0
- package/dist/bundle-assembler.js.map +1 -0
- package/dist/bundle-durations.d.ts +5 -0
- package/dist/bundle-durations.d.ts.map +1 -0
- package/dist/bundle-durations.js +68 -0
- package/dist/bundle-durations.js.map +1 -0
- package/dist/bundle-storyboard.d.ts +11 -0
- package/dist/bundle-storyboard.d.ts.map +1 -0
- package/dist/bundle-storyboard.js +82 -0
- package/dist/bundle-storyboard.js.map +1 -0
- package/dist/captions.d.ts +25 -0
- package/dist/captions.d.ts.map +1 -0
- package/dist/captions.js +56 -0
- package/dist/captions.js.map +1 -0
- package/dist/cast-db.d.ts +61 -0
- package/dist/cast-db.d.ts.map +1 -0
- package/dist/cast-db.js +324 -0
- package/dist/cast-db.js.map +1 -0
- package/dist/cast-lora-train.d.ts +18 -0
- package/dist/cast-lora-train.d.ts.map +1 -0
- package/dist/cast-lora-train.js +215 -0
- package/dist/cast-lora-train.js.map +1 -0
- package/dist/cast-loras.d.ts +21 -0
- package/dist/cast-loras.d.ts.map +1 -0
- package/dist/cast-loras.js +69 -0
- package/dist/cast-loras.js.map +1 -0
- package/dist/clip-content-validate.d.ts +43 -0
- package/dist/clip-content-validate.d.ts.map +1 -0
- package/dist/clip-content-validate.js +115 -0
- package/dist/clip-content-validate.js.map +1 -0
- package/dist/clip-job-model.d.ts +42 -0
- package/dist/clip-job-model.d.ts.map +1 -0
- package/dist/clip-job-model.js +8 -0
- package/dist/clip-job-model.js.map +1 -0
- package/dist/clip-validate.d.ts +33 -0
- package/dist/clip-validate.d.ts.map +1 -0
- package/dist/clip-validate.js +247 -0
- package/dist/clip-validate.js.map +1 -0
- package/dist/d1-retry.d.ts +20 -0
- package/dist/d1-retry.d.ts.map +1 -0
- package/dist/d1-retry.js +67 -0
- package/dist/d1-retry.js.map +1 -0
- package/dist/db-env.d.ts +6 -0
- package/dist/db-env.d.ts.map +1 -0
- package/dist/db-env.js +2 -0
- package/dist/db-env.js.map +1 -0
- package/dist/dialogue-lines.d.ts +23 -0
- package/dist/dialogue-lines.d.ts.map +1 -0
- package/dist/dialogue-lines.js +84 -0
- package/dist/dialogue-lines.js.map +1 -0
- package/dist/film-advance-lease.d.ts +9 -0
- package/dist/film-advance-lease.d.ts.map +1 -0
- package/dist/film-advance-lease.js +19 -0
- package/dist/film-advance-lease.js.map +1 -0
- package/dist/film-model.d.ts +415 -0
- package/dist/film-model.d.ts.map +1 -0
- package/dist/film-model.js +541 -0
- package/dist/film-model.js.map +1 -0
- package/dist/film-orchestrator.d.ts +216 -0
- package/dist/film-orchestrator.d.ts.map +1 -0
- package/dist/film-orchestrator.js +2204 -0
- package/dist/film-orchestrator.js.map +1 -0
- package/dist/film-render-bridge.d.ts +26 -0
- package/dist/film-render-bridge.d.ts.map +1 -0
- package/dist/film-render-bridge.js +176 -0
- package/dist/film-render-bridge.js.map +1 -0
- package/dist/finish-hash.d.ts +10 -0
- package/dist/finish-hash.d.ts.map +1 -0
- package/dist/finish-hash.js +60 -0
- package/dist/finish-hash.js.map +1 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/key-safety.d.ts +5 -0
- package/dist/key-safety.d.ts.map +1 -0
- package/dist/key-safety.js +23 -0
- package/dist/key-safety.js.map +1 -0
- package/dist/lora-bundle.d.ts +19 -0
- package/dist/lora-bundle.d.ts.map +1 -0
- package/dist/lora-bundle.js +75 -0
- package/dist/lora-bundle.js.map +1 -0
- package/dist/lora-keys.d.ts +2 -0
- package/dist/lora-keys.d.ts.map +1 -0
- package/dist/lora-keys.js +4 -0
- package/dist/lora-keys.js.map +1 -0
- package/dist/modules/conformance.d.ts +58 -0
- package/dist/modules/conformance.d.ts.map +1 -0
- package/dist/modules/conformance.js +369 -0
- package/dist/modules/conformance.js.map +1 -0
- package/dist/modules/manifest-validate.d.ts +5 -0
- package/dist/modules/manifest-validate.d.ts.map +1 -0
- package/dist/modules/manifest-validate.js +60 -0
- package/dist/modules/manifest-validate.js.map +1 -0
- package/dist/modules/registry.d.ts +184 -0
- package/dist/modules/registry.d.ts.map +1 -0
- package/dist/modules/registry.js +653 -0
- package/dist/modules/registry.js.map +1 -0
- package/dist/modules/render-pipeline.d.ts +38 -0
- package/dist/modules/render-pipeline.d.ts.map +1 -0
- package/dist/modules/render-pipeline.js +40 -0
- package/dist/modules/render-pipeline.js.map +1 -0
- package/dist/modules/types.d.ts +544 -0
- package/dist/modules/types.d.ts.map +1 -0
- package/dist/modules/types.js +57 -0
- package/dist/modules/types.js.map +1 -0
- package/dist/operator-config.d.ts +20 -0
- package/dist/operator-config.d.ts.map +1 -0
- package/dist/operator-config.js +85 -0
- package/dist/operator-config.js.map +1 -0
- package/dist/output-extract.d.ts +8 -0
- package/dist/output-extract.d.ts.map +1 -0
- package/dist/output-extract.js +129 -0
- package/dist/output-extract.js.map +1 -0
- package/dist/planner-prompt.d.ts +12 -0
- package/dist/planner-prompt.d.ts.map +1 -0
- package/dist/planner-prompt.js +337 -0
- package/dist/planner-prompt.js.map +1 -0
- package/dist/planner-yaml.d.ts +15 -0
- package/dist/planner-yaml.d.ts.map +1 -0
- package/dist/planner-yaml.js +157 -0
- package/dist/planner-yaml.js.map +1 -0
- package/dist/platform/fetcher.d.ts +3 -0
- package/dist/platform/fetcher.d.ts.map +1 -0
- package/dist/platform/fetcher.js +7 -0
- package/dist/platform/fetcher.js.map +1 -0
- package/dist/platform/index.d.ts +6 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/index.js +5 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/platform/object-store-r2.d.ts +26 -0
- package/dist/platform/object-store-r2.d.ts.map +1 -0
- package/dist/platform/object-store-r2.js +74 -0
- package/dist/platform/object-store-r2.js.map +1 -0
- package/dist/platform/orchestrator-context.d.ts +20 -0
- package/dist/platform/orchestrator-context.d.ts.map +1 -0
- package/dist/platform/orchestrator-context.js +28 -0
- package/dist/platform/orchestrator-context.js.map +1 -0
- package/dist/platform/r2-types.d.ts +41 -0
- package/dist/platform/r2-types.d.ts.map +1 -0
- package/dist/platform/r2-types.js +3 -0
- package/dist/platform/r2-types.js.map +1 -0
- package/dist/platform/types.d.ts +90 -0
- package/dist/platform/types.d.ts.map +1 -0
- package/dist/platform/types.js +23 -0
- package/dist/platform/types.js.map +1 -0
- package/dist/preflight.d.ts +57 -0
- package/dist/preflight.d.ts.map +1 -0
- package/dist/preflight.js +243 -0
- package/dist/preflight.js.map +1 -0
- package/dist/presign.d.ts +5 -0
- package/dist/presign.d.ts.map +1 -0
- package/dist/presign.js +24 -0
- package/dist/presign.js.map +1 -0
- package/dist/public-id.d.ts +8 -0
- package/dist/public-id.d.ts.map +1 -0
- package/dist/public-id.js +25 -0
- package/dist/public-id.js.map +1 -0
- package/dist/render-adopt.d.ts +3 -0
- package/dist/render-adopt.d.ts.map +1 -0
- package/dist/render-adopt.js +92 -0
- package/dist/render-adopt.js.map +1 -0
- package/dist/render-log.d.ts +25 -0
- package/dist/render-log.d.ts.map +1 -0
- package/dist/render-log.js +139 -0
- package/dist/render-log.js.map +1 -0
- package/dist/render-module-config.d.ts +28 -0
- package/dist/render-module-config.d.ts.map +1 -0
- package/dist/render-module-config.js +124 -0
- package/dist/render-module-config.js.map +1 -0
- package/dist/render-mux.d.ts +18 -0
- package/dist/render-mux.d.ts.map +1 -0
- package/dist/render-mux.js +69 -0
- package/dist/render-mux.js.map +1 -0
- package/dist/render-orchestrator.d.ts +71 -0
- package/dist/render-orchestrator.d.ts.map +1 -0
- package/dist/render-orchestrator.js +376 -0
- package/dist/render-orchestrator.js.map +1 -0
- package/dist/render-sweep.d.ts +5 -0
- package/dist/render-sweep.d.ts.map +1 -0
- package/dist/render-sweep.js +62 -0
- package/dist/render-sweep.js.map +1 -0
- package/dist/renders-db.d.ts +129 -0
- package/dist/renders-db.d.ts.map +1 -0
- package/dist/renders-db.js +752 -0
- package/dist/renders-db.js.map +1 -0
- package/dist/runpod-submit.d.ts +151 -0
- package/dist/runpod-submit.d.ts.map +1 -0
- package/dist/runpod-submit.js +469 -0
- package/dist/runpod-submit.js.map +1 -0
- package/dist/runpod-types.d.ts +2 -0
- package/dist/runpod-types.d.ts.map +1 -0
- package/dist/runpod-types.js +4 -0
- package/dist/runpod-types.js.map +1 -0
- package/dist/scatter-notify.d.ts +4 -0
- package/dist/scatter-notify.d.ts.map +1 -0
- package/dist/scatter-notify.js +43 -0
- package/dist/scatter-notify.js.map +1 -0
- package/dist/scatter-orchestrator-types.d.ts +56 -0
- package/dist/scatter-orchestrator-types.d.ts.map +1 -0
- package/dist/scatter-orchestrator-types.js +3 -0
- package/dist/scatter-orchestrator-types.js.map +1 -0
- package/dist/scatter-orchestrator.d.ts +70 -0
- package/dist/scatter-orchestrator.d.ts.map +1 -0
- package/dist/scatter-orchestrator.js +614 -0
- package/dist/scatter-orchestrator.js.map +1 -0
- package/dist/scatter.d.ts +35 -0
- package/dist/scatter.d.ts.map +1 -0
- package/dist/scatter.js +171 -0
- package/dist/scatter.js.map +1 -0
- package/dist/secret-store.d.ts +5 -0
- package/dist/secret-store.d.ts.map +1 -0
- package/dist/secret-store.js +19 -0
- package/dist/secret-store.js.map +1 -0
- package/dist/shot-durations-parse.d.ts +3 -0
- package/dist/shot-durations-parse.d.ts.map +1 -0
- package/dist/shot-durations-parse.js +43 -0
- package/dist/shot-durations-parse.js.map +1 -0
- package/dist/srt.d.ts +11 -0
- package/dist/srt.d.ts.map +1 -0
- package/dist/srt.js +54 -0
- package/dist/srt.js.map +1 -0
- package/dist/storyboard-ids.d.ts +2 -0
- package/dist/storyboard-ids.d.ts.map +1 -0
- package/dist/storyboard-ids.js +12 -0
- package/dist/storyboard-ids.js.map +1 -0
- package/dist/storyboard-projects-db.d.ts +31 -0
- package/dist/storyboard-projects-db.d.ts.map +1 -0
- package/dist/storyboard-projects-db.js +153 -0
- package/dist/storyboard-projects-db.js.map +1 -0
- package/dist/storyboard-validate.d.ts +72 -0
- package/dist/storyboard-validate.d.ts.map +1 -0
- package/dist/storyboard-validate.js +595 -0
- package/dist/storyboard-validate.js.map +1 -0
- package/dist/structured-events.d.ts +6 -0
- package/dist/structured-events.d.ts.map +1 -0
- package/dist/structured-events.js +15 -0
- package/dist/structured-events.js.map +1 -0
- package/dist/tar.d.ts +9 -0
- package/dist/tar.d.ts.map +1 -0
- package/dist/tar.js +151 -0
- package/dist/tar.js.map +1 -0
- package/dist/voices.d.ts +12 -0
- package/dist/voices.d.ts.map +1 -0
- package/dist/voices.js +37 -0
- package/dist/voices.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
/** The contract version a module targets. Bumped only on a breaking change to these shapes. */
|
|
2
|
+
export declare const MODULE_API: "vivijure-module/2";
|
|
3
|
+
export type ModuleApi = "vivijure-module/1" | "vivijure-module/2";
|
|
4
|
+
export declare const SUPPORTED_MODULE_APIS: ReadonlySet<ModuleApi>;
|
|
5
|
+
/** The pipeline extension points. `pick one` hooks resolve to a single module; `chain` hooks run
|
|
6
|
+
* every installed module in `ui.order`, each consuming the previous output. */
|
|
7
|
+
export type HookName = "keyframe" | "motion.backend" | "finish" | "score" | "dialogue" | "speech" | "plan.enhance" | "cast.image" | "notify" | "master" | "film.finish";
|
|
8
|
+
export declare const HOOK_NAMES: readonly HookName[];
|
|
9
|
+
/** Whether a hook resolves to one module or folds every installed module. */
|
|
10
|
+
export declare const HOOK_CARDINALITY: Record<HookName, "pick_one" | "chain">;
|
|
11
|
+
/** One-line description of each hook, for the self-assembling UI. Single source of truth: the
|
|
12
|
+
* frontend renders the hook panel from this (served via GET /api/modules), not a hardcoded copy. */
|
|
13
|
+
export declare const HOOK_BLURBS: Record<HookName, string>;
|
|
14
|
+
/** Where a config field's value is sourced from.
|
|
15
|
+
* - "render" (default when omitted): per-render config, chosen at submit time (e.g. quality_tier).
|
|
16
|
+
* - "install": operator-set-once, instance-wide config, persisted in the operator-config store and
|
|
17
|
+
* injected at invoke time (e.g. notify-email's recipient address). The UI surfaces these on a
|
|
18
|
+
* studio settings page, not the per-render panel. ADDITIVE: a field with no `scope` is "render",
|
|
19
|
+
* so this marker narrows nothing -- every existing module + vendored /1 contract stays valid. */
|
|
20
|
+
export type ConfigScope = "render" | "install";
|
|
21
|
+
/** One configurable knob a module exposes. The UI renders the control from this; the core clamps
|
|
22
|
+
* the user's value against it before invoking. One declaration, one hop, same words down. */
|
|
23
|
+
export type ConfigField = {
|
|
24
|
+
type: "int" | "float";
|
|
25
|
+
default: number;
|
|
26
|
+
min?: number;
|
|
27
|
+
max?: number;
|
|
28
|
+
label?: string;
|
|
29
|
+
enum_labels?: Record<string, string>;
|
|
30
|
+
scope?: ConfigScope;
|
|
31
|
+
} | {
|
|
32
|
+
type: "bool";
|
|
33
|
+
default: boolean;
|
|
34
|
+
label?: string;
|
|
35
|
+
scope?: ConfigScope;
|
|
36
|
+
} | {
|
|
37
|
+
type: "enum";
|
|
38
|
+
values: string[];
|
|
39
|
+
default: string;
|
|
40
|
+
label?: string;
|
|
41
|
+
scope?: ConfigScope;
|
|
42
|
+
} | {
|
|
43
|
+
type: "string";
|
|
44
|
+
default: string;
|
|
45
|
+
label?: string;
|
|
46
|
+
scope?: ConfigScope;
|
|
47
|
+
};
|
|
48
|
+
export type ConfigSchema = Record<string, ConfigField>;
|
|
49
|
+
/** A user-facing capability a module offers (a module may offer several). */
|
|
50
|
+
export interface Provides {
|
|
51
|
+
id: string;
|
|
52
|
+
label: string;
|
|
53
|
+
}
|
|
54
|
+
/** Hints for the self-assembling studio UI. The honest-framing fields below (locality / cost / blurb /
|
|
55
|
+
* limits) are OPTIONAL + additive (NO MODULE_API bump): the planner two-door backend selector (#379)
|
|
56
|
+
* reads them and OMITS each when absent (never fabricated). `locality` is the load-bearing one -- it
|
|
57
|
+
* drives the door tag AND the core's local-vs-cloud classification (cloudMotionModules /
|
|
58
|
+
* gpuDoorMotionModules in the registry; an undeclared locality classifies as cloud), so every
|
|
59
|
+
* motion.backend module SHOULD declare it. The rest are display-only (and `limits`, when absent,
|
|
60
|
+
* falls back to the module config_schema knob ranges). */
|
|
61
|
+
export interface ModuleUi {
|
|
62
|
+
section?: string;
|
|
63
|
+
icon?: string;
|
|
64
|
+
order?: number;
|
|
65
|
+
locality?: "local" | "byo" | "cloud";
|
|
66
|
+
cost?: string;
|
|
67
|
+
blurb?: string;
|
|
68
|
+
limits?: string[];
|
|
69
|
+
}
|
|
70
|
+
/** OPTIONAL, additive (no MODULE_API bump, same pattern as `cancelable`): a finish module's declared
|
|
71
|
+
* artifact conventions, so the core's R2-authoritative mid-chain recovery (#141/#166) can predict the
|
|
72
|
+
* module's output key and reconstruct its `applied` marker from the manifest instead of
|
|
73
|
+
* reverse-engineering module internals by binding-name regex. A finish module SHOULD declare this;
|
|
74
|
+
* one that does not gets NO R2 shortcut (its GC'd/frozen steps pend to the deadline honestly). */
|
|
75
|
+
export interface FinishArtifactsDecl {
|
|
76
|
+
/** How the module names its output clip in R2:
|
|
77
|
+
* - `shot_named`: `renders/<project>/clips/<shot_id><filename>` (the module names off the shot id;
|
|
78
|
+
* e.g. finish-rife's `filename: "_finished.mp4"`).
|
|
79
|
+
* - `append_suffix`: insert `suffix` into the INPUT clip key before its extension (the
|
|
80
|
+
* append-convention modules; e.g. lip-sync `_ls`, upscale `_up`). */
|
|
81
|
+
output_key: {
|
|
82
|
+
kind: "shot_named";
|
|
83
|
+
filename: string;
|
|
84
|
+
} | {
|
|
85
|
+
kind: "append_suffix";
|
|
86
|
+
suffix: string;
|
|
87
|
+
};
|
|
88
|
+
/** Rules reconstructing the `applied` marker from the step's validated config; FIRST match wins.
|
|
89
|
+
* `when` (optional) gates a rule on a config knob equaling a literal; `tag` is a template where
|
|
90
|
+
* `{knob}` reads the knob and `{knob|default}` supplies the value when the knob is absent
|
|
91
|
+
* (e.g. `"lipsync:{version|v15}"`, `"interpolate:{interpolation_factor|2}x"`). No rules / no
|
|
92
|
+
* match -> the core marks the adopted step `<binding>:r2-adopted` so the adoption is never silent. */
|
|
93
|
+
applied?: Array<{
|
|
94
|
+
when?: {
|
|
95
|
+
knob: string;
|
|
96
|
+
equals: string | number | boolean;
|
|
97
|
+
};
|
|
98
|
+
tag: string;
|
|
99
|
+
}>;
|
|
100
|
+
}
|
|
101
|
+
/** A module's self-description, served at GET /module.json. */
|
|
102
|
+
export interface ModuleManifest {
|
|
103
|
+
name: string;
|
|
104
|
+
version: string;
|
|
105
|
+
api: ModuleApi;
|
|
106
|
+
hooks: HookName[];
|
|
107
|
+
provides?: Provides[];
|
|
108
|
+
config_schema?: ConfigSchema;
|
|
109
|
+
ui?: ModuleUi;
|
|
110
|
+
/** Async modules SHOULD set this true and implement POST /cancel so the core can STOP an in-flight
|
|
111
|
+
* job (cancel a render, recover an adopted keyframe phase) instead of orphaning GPU. OPTIONAL and
|
|
112
|
+
* additive (no MODULE_API bump, same as the #318 jobId field). Absent/false => the core cannot
|
|
113
|
+
* cancel this module's jobs and will HONESTLY degrade-log any orphan rather than hide it. */
|
|
114
|
+
cancelable?: boolean;
|
|
115
|
+
/** Finish modules SHOULD declare their artifact conventions (see FinishArtifactsDecl) so the core's
|
|
116
|
+
* R2-authoritative recovery works from the manifest, not from binding-name pattern-matching. */
|
|
117
|
+
finish_artifacts?: FinishArtifactsDecl;
|
|
118
|
+
/** OPTIONAL, additive (no MODULE_API bump, same pattern as `cancelable`). A keyframe module's
|
|
119
|
+
* compact display token for the keyframe-stage backend/model (e.g. "SDXL"), which the planner UI
|
|
120
|
+
* projects inline instead of hardcoding a model name. Distinct from provides[].label, which is
|
|
121
|
+
* the section-title-length label ("GPU Keyframe (SDXL on RunPod)"); this is the short inline noun. */
|
|
122
|
+
keyframe_label?: string;
|
|
123
|
+
/** OPTIONAL, additive (no MODULE_API bump, same pattern as `cancelable`). A finish module sets this
|
|
124
|
+
* true when it drives its output from the shot dialogue audio (`FinishInput.audio_key`), i.e. it
|
|
125
|
+
* lip-syncs. It carries TWO facts the core needs: (a) this finish step CONSUMES the shot dialogue
|
|
126
|
+
* audio, and (b) it MUST therefore run on the NATIVE-fps clip, before any finish step that resamples
|
|
127
|
+
* time (interpolation). A lip-sync model maps audio to mouth shapes calibrated to the source frame
|
|
128
|
+
* rate, so lip-syncing already-interpolated footage smears the mouth shapes across the doubled
|
|
129
|
+
* frames (vivijure #584). The core uses this to run audio-consuming finish modules FIRST in the
|
|
130
|
+
* chain for a shot that HAS a dialogue line, preserving `ui.order` among the rest; a shot with no
|
|
131
|
+
* line keeps the plain `ui.order` (such a module no-ops there, having no `audio_key`). Absent/false
|
|
132
|
+
* means ordered purely by `ui.order` (the legacy behavior). The module declares only its OWN nature;
|
|
133
|
+
* the cross-module ordering policy stays in the core. */
|
|
134
|
+
finish_consumes_audio?: boolean;
|
|
135
|
+
/** OPTIONAL, additive (no MODULE_API bump, same pattern as `cancelable`). A motion.backend module
|
|
136
|
+
* whose engine renders on a FIXED duration grid (pinned fps + per-tier frame caps, e.g. CogVideoX:
|
|
137
|
+
* 8fps, draft <= 25 frames) declares the grid so the core can warn AT STORYBOARD TIME that a shot's
|
|
138
|
+
* planned seconds will be clamped, instead of the clamp staying silent until the clip lands (#707).
|
|
139
|
+
* The module RELAYS what its backend declares (best-effort; e.g. from the backend's /health);
|
|
140
|
+
* ABSENT means no declared constraint -- the module must never fabricate a grid. Tier keys match
|
|
141
|
+
* the render quality tiers the module accepts (e.g. draft/standard/final). */
|
|
142
|
+
duration_grid?: DurationGridDecl;
|
|
143
|
+
}
|
|
144
|
+
/** A fixed duration grid for a motion backend (#707): the pinned output fps and the per-quality-tier
|
|
145
|
+
* frame ceilings. A tier's maximum deliverable seconds = max_frames / fps. */
|
|
146
|
+
export interface DurationGridDecl {
|
|
147
|
+
fps: number;
|
|
148
|
+
tiers: Record<string, {
|
|
149
|
+
max_frames: number;
|
|
150
|
+
}>;
|
|
151
|
+
}
|
|
152
|
+
/** Per-job context the core passes to every invoke (never secrets). */
|
|
153
|
+
export interface InvokeContext {
|
|
154
|
+
project: string;
|
|
155
|
+
job_id: string;
|
|
156
|
+
}
|
|
157
|
+
/** The single entry point the core calls on a module: POST /invoke. */
|
|
158
|
+
export interface InvokeRequest<I = unknown> {
|
|
159
|
+
hook: HookName;
|
|
160
|
+
input: I;
|
|
161
|
+
config: Record<string, unknown>;
|
|
162
|
+
context: InvokeContext;
|
|
163
|
+
}
|
|
164
|
+
/** A module failure is data, never an exception across the wire: the core degrades, it does not
|
|
165
|
+
* crash, when a module returns `ok: false`. */
|
|
166
|
+
export type InvokeResponse<O = unknown> = {
|
|
167
|
+
ok: true;
|
|
168
|
+
output: O;
|
|
169
|
+
} | {
|
|
170
|
+
ok: true;
|
|
171
|
+
pending: true;
|
|
172
|
+
poll: string;
|
|
173
|
+
jobId?: string;
|
|
174
|
+
} | {
|
|
175
|
+
ok: false;
|
|
176
|
+
error: string;
|
|
177
|
+
};
|
|
178
|
+
/** Body POSTed to a long-running module's `/poll` to check an async job. */
|
|
179
|
+
export interface PollRequest {
|
|
180
|
+
poll: string;
|
|
181
|
+
}
|
|
182
|
+
/** A module's `/poll` response: still running, finished, or failed. The caller polls until it is no
|
|
183
|
+
* longer pending, so a Worker never holds one long-running `/invoke` request open. */
|
|
184
|
+
export type PollResponse<O = unknown> = {
|
|
185
|
+
ok: true;
|
|
186
|
+
pending: true;
|
|
187
|
+
} | {
|
|
188
|
+
ok: true;
|
|
189
|
+
output: O;
|
|
190
|
+
} | {
|
|
191
|
+
ok: false;
|
|
192
|
+
error: string;
|
|
193
|
+
};
|
|
194
|
+
/** Body POSTed to a long-running module's `/cancel` to STOP an in-flight async job. The token is the
|
|
195
|
+
* same one `/invoke` returned (and `/poll` consumes); the module decodes it to ITS backend job id and
|
|
196
|
+
* cancels with ITS OWN backend creds, because the core never holds them. This is the contract's only
|
|
197
|
+
* honest way to stop GPU work: without it, a cancelled render or an adopted keyframe phase orphans the
|
|
198
|
+
* job and bleeds money after the work it was for is already satisfied (#327 / #328). */
|
|
199
|
+
export interface CancelRequest {
|
|
200
|
+
poll: string;
|
|
201
|
+
}
|
|
202
|
+
/** A module's `/cancel` response. BEST-EFFORT + idempotent: cancelling an already-terminal or unknown
|
|
203
|
+
* job is a success (`ok: true`), so the core can read `ok: true` as "this job will not keep running on
|
|
204
|
+
* our account". A module that cannot cancel returns `ok: false` with a reason, and the core
|
|
205
|
+
* degrade-LOGS the orphan rather than hiding it (a silent orphan is the bug). */
|
|
206
|
+
export type CancelResponse = {
|
|
207
|
+
ok: true;
|
|
208
|
+
} | {
|
|
209
|
+
ok: false;
|
|
210
|
+
error: string;
|
|
211
|
+
};
|
|
212
|
+
/** What the core hands a `finish` module: a rendered clip and what is known about it. The clip is
|
|
213
|
+
* self-describing (a finish backend probes it), so the shape hints below are OPTIONAL -- the core
|
|
214
|
+
* passes them when it has them, but a finish module must not require them. */
|
|
215
|
+
export interface FinishInput {
|
|
216
|
+
shot_id: string;
|
|
217
|
+
clip_key: string;
|
|
218
|
+
audio_key?: string;
|
|
219
|
+
src_fps?: number;
|
|
220
|
+
frames?: number;
|
|
221
|
+
width?: number;
|
|
222
|
+
height?: number;
|
|
223
|
+
output_hash?: string;
|
|
224
|
+
}
|
|
225
|
+
/** What a `finish` module returns: the processed clip plus what it did. Duration is invariant
|
|
226
|
+
* (interpolation changes fps + frame count, never length). */
|
|
227
|
+
export interface FinishOutput {
|
|
228
|
+
shot_id: string;
|
|
229
|
+
clip_key: string;
|
|
230
|
+
out_fps: number;
|
|
231
|
+
frames: number;
|
|
232
|
+
applied: string[];
|
|
233
|
+
degraded?: string;
|
|
234
|
+
}
|
|
235
|
+
/** One spoken line for one shot. `voice_id` is resolved by the core (slot -> cast member -> voice),
|
|
236
|
+
* so the module just synthesizes; absent/unknown falls back to a default speaker at synth time. */
|
|
237
|
+
export interface DialogueLine {
|
|
238
|
+
shot_id: string;
|
|
239
|
+
text: string;
|
|
240
|
+
voice_id?: string;
|
|
241
|
+
}
|
|
242
|
+
/** What the core hands a `dialogue` module: every speaking shot in ONE batch (so a film's dialogue is
|
|
243
|
+
* a single submit+poll, not N round-trips). `project` is the R2 key prefix the audio lands under. */
|
|
244
|
+
export interface DialogueInput {
|
|
245
|
+
project: string;
|
|
246
|
+
lines: DialogueLine[];
|
|
247
|
+
}
|
|
248
|
+
/** One synthesized line: the R2 key of its audio and the voice actually used. The core attaches
|
|
249
|
+
* `audio_key` to that shot's FinishInput so a lip-sync finish module can drive the mouth from it. */
|
|
250
|
+
export interface DialogueShotAudio {
|
|
251
|
+
shot_id: string;
|
|
252
|
+
audio_key: string;
|
|
253
|
+
voice_id: string;
|
|
254
|
+
}
|
|
255
|
+
export interface DialogueOutput {
|
|
256
|
+
project: string;
|
|
257
|
+
audio: DialogueShotAudio[];
|
|
258
|
+
applied: string[];
|
|
259
|
+
}
|
|
260
|
+
/** What the core hands a `speech` module: ONE shot's dialogue audio to enhance / clean. The audio is
|
|
261
|
+
* self-describing (a speech backend probes it), so this is deliberately minimal. The speech chain runs
|
|
262
|
+
* AFTER the dialogue phase (the audio exists) and BEFORE finish (so a lip-sync finish module drives the
|
|
263
|
+
* mouth from the cleaned audio). */
|
|
264
|
+
export interface SpeechInput {
|
|
265
|
+
shot_id: string;
|
|
266
|
+
audio_key: string;
|
|
267
|
+
}
|
|
268
|
+
/** What a `speech` module returns: the (maybe enhanced) dialogue audio plus what it did. On a real
|
|
269
|
+
* enhancement `audio_key` is the NEW cleaned key; on an honest soft-degrade it is the input key passed
|
|
270
|
+
* through unchanged, `applied` carries no fake tag, and `degraded` carries the reason. A speech step is
|
|
271
|
+
* a POLISH step: it NEVER fails the render on a miss -- only malformed I/O fails loud (cf #249/#77). */
|
|
272
|
+
export interface SpeechOutput {
|
|
273
|
+
shot_id: string;
|
|
274
|
+
audio_key: string;
|
|
275
|
+
applied: string[];
|
|
276
|
+
degraded?: string;
|
|
277
|
+
}
|
|
278
|
+
/** What the core hands a `plan.enhance` module: the storyboard to enrich (its scenes carry the shot
|
|
279
|
+
* prompts the module rewrites) plus the original brief for context. Structural passthrough -- a
|
|
280
|
+
* module rewrites scenes[].prompt and preserves every other field on the storyboard and scenes. */
|
|
281
|
+
export interface PlanEnhanceScene {
|
|
282
|
+
prompt: string;
|
|
283
|
+
[k: string]: unknown;
|
|
284
|
+
}
|
|
285
|
+
export interface PlanEnhanceStoryboard {
|
|
286
|
+
scenes: PlanEnhanceScene[];
|
|
287
|
+
[k: string]: unknown;
|
|
288
|
+
}
|
|
289
|
+
export interface PlanEnhanceInput {
|
|
290
|
+
storyboard: PlanEnhanceStoryboard;
|
|
291
|
+
brief?: string;
|
|
292
|
+
}
|
|
293
|
+
/** What a `plan.enhance` module returns: the enriched storyboard plus optional human-readable notes
|
|
294
|
+
* on what it did (or why it passed through unchanged). */
|
|
295
|
+
export interface PlanEnhanceOutput {
|
|
296
|
+
storyboard: PlanEnhanceStoryboard;
|
|
297
|
+
notes?: string[];
|
|
298
|
+
}
|
|
299
|
+
/** What the core hands a `keyframe` module: a project bundle to render START keyframes from. This
|
|
300
|
+
* is a PROJECT-level pass, not per-shot -- the GPU backend trains/reuses cast LoRAs once and emits
|
|
301
|
+
* every shot's keyframe in one job. A per-shot module would re-submit (and risk re-training the
|
|
302
|
+
* LoRA) on every shot = GPU waste; the project pass keeps GPU spend to genuinely GPU-bound work.
|
|
303
|
+
* The clip orchestrator (motion.backend) then animates each keyframe per shot. */
|
|
304
|
+
export interface KeyframeInput {
|
|
305
|
+
project: string;
|
|
306
|
+
bundle_key: string;
|
|
307
|
+
shot_ids?: string[];
|
|
308
|
+
/** slot -> R2 key of pretrained cast LoRAs; scatter shards reuse adapters trained once up front. */
|
|
309
|
+
pretrained_loras?: Record<string, string>;
|
|
310
|
+
}
|
|
311
|
+
/** One generated start keyframe, already stored in R2 by the backend. */
|
|
312
|
+
export interface KeyframeShot {
|
|
313
|
+
shot_id: string;
|
|
314
|
+
keyframe_key: string;
|
|
315
|
+
}
|
|
316
|
+
/** What a `keyframe` module returns: every keyframe it generated, by shot. The core presigns each
|
|
317
|
+
* key into a fetchable keyframe_url when it hands them on to the motion.backend orchestrator. */
|
|
318
|
+
export interface KeyframeOutput {
|
|
319
|
+
project: string;
|
|
320
|
+
keyframes: KeyframeShot[];
|
|
321
|
+
/** slot -> R2 key of the cast LoRA this render trained or reused. The core records a freshly
|
|
322
|
+
* trained adapter back onto the cast member (lora_status=ready) so it is reused across every
|
|
323
|
+
* project instead of retrained each render. Optional + additive: a module that does no LoRA
|
|
324
|
+
* work omits it. */
|
|
325
|
+
trained_loras?: Record<string, string>;
|
|
326
|
+
}
|
|
327
|
+
/** What the core hands a `motion.backend` module for ONE shot: a start keyframe and the motion
|
|
328
|
+
* intent. The module turns it into a clip (on GPU or via a cloud i2v API). */
|
|
329
|
+
export interface MotionBackendInput {
|
|
330
|
+
shot_id: string;
|
|
331
|
+
keyframe_url: string;
|
|
332
|
+
keyframe_key?: string;
|
|
333
|
+
prompt: string;
|
|
334
|
+
seconds: number;
|
|
335
|
+
}
|
|
336
|
+
/** What a `motion.backend` module returns: the rendered shot clip. */
|
|
337
|
+
export interface MotionBackendOutput {
|
|
338
|
+
shot_id: string;
|
|
339
|
+
clip_key: string;
|
|
340
|
+
fps: number;
|
|
341
|
+
frames: number;
|
|
342
|
+
/** OPTIONAL, additive (no MODULE_API bump): tier-honesty signal from the backend -- true when the
|
|
343
|
+
* clip was rendered with a DISTILLED variant of the model (e.g. the 12gb door's final-tier 13B
|
|
344
|
+
* distilled), false when the full model ran. The module relays what its backend reports and OMITS
|
|
345
|
+
* the field when the backend says nothing (#705); the core retains it per shot and surfaces it on
|
|
346
|
+
* the film summary's clip_deliveries. Absence is honest, never a fabricated false. */
|
|
347
|
+
distilled?: boolean;
|
|
348
|
+
}
|
|
349
|
+
/** What the core hands a `score` module: the assembled (silent) film and its shape, plus optional
|
|
350
|
+
* storyboard context for mood/tempo. */
|
|
351
|
+
export interface ScoreInput {
|
|
352
|
+
film_key: string;
|
|
353
|
+
seconds: number;
|
|
354
|
+
storyboard?: PlanEnhanceStoryboard;
|
|
355
|
+
}
|
|
356
|
+
/** What a `score` module returns: the film with audio applied (or muxed), and what it added. */
|
|
357
|
+
export interface ScoreOutput {
|
|
358
|
+
film_key: string;
|
|
359
|
+
applied: string[];
|
|
360
|
+
degraded?: string;
|
|
361
|
+
}
|
|
362
|
+
/** What the core hands a `cast.image` module: one cast member's seed material to generate LoRA
|
|
363
|
+
* TRAINING reference images from -- a portrait (the identity seed), optional human-uploaded source
|
|
364
|
+
* photos for extra conditioning, and the bible/style that shape the prompts. A CAST-PREP pass,
|
|
365
|
+
* upstream of keyframe: the generated images become the cast member's training refs. The portrait /
|
|
366
|
+
* source URLs are presigned + fetchable (the core presigns the private R2 objects so a cloud image
|
|
367
|
+
* model can pull them), mirroring how motion.backend gets keyframe_url. */
|
|
368
|
+
export interface CastImageInput {
|
|
369
|
+
cast_id: number;
|
|
370
|
+
portrait_url: string;
|
|
371
|
+
portrait_key?: string;
|
|
372
|
+
source_urls?: string[];
|
|
373
|
+
bible?: string;
|
|
374
|
+
art_style?: string;
|
|
375
|
+
}
|
|
376
|
+
/** What a `cast.image` module returns: the generated training reference images (already stored in
|
|
377
|
+
* R2), ready to feed LoRA training, plus what it did. The core appends these to the cast member's
|
|
378
|
+
* ref set. */
|
|
379
|
+
export interface CastImageOutput {
|
|
380
|
+
cast_id: number;
|
|
381
|
+
images: {
|
|
382
|
+
key: string;
|
|
383
|
+
mime: string;
|
|
384
|
+
}[];
|
|
385
|
+
applied: string[];
|
|
386
|
+
}
|
|
387
|
+
/** What the core hands a `notify` module when a film reaches "done": the completion event + the facts
|
|
388
|
+
* a notifier needs to deliver (a presigned download_url, the project name, the owner address). A
|
|
389
|
+
* TERMINAL side-effect hook -- fired once on the done-transition, `chain` (every installed notifier
|
|
390
|
+
* delivers independently: email AND webhook AND ...). A notifier with nothing to do for its channel
|
|
391
|
+
* (e.g. no recipient address) returns an empty `delivered`, never an error. */
|
|
392
|
+
export interface NotifyInput {
|
|
393
|
+
event: "render.complete";
|
|
394
|
+
film_id: string;
|
|
395
|
+
project: string;
|
|
396
|
+
download_url?: string;
|
|
397
|
+
seconds?: number;
|
|
398
|
+
}
|
|
399
|
+
/** What a `notify` module returns: the channels it delivered on (for the core's log / summary). */
|
|
400
|
+
export interface NotifyOutput {
|
|
401
|
+
delivered: string[];
|
|
402
|
+
}
|
|
403
|
+
/** What the core hands a `master` module: the assembled film's AUDIO BED (the mixed score / narration
|
|
404
|
+
* track), to polish at FILM level before the final mux. This is the audio sibling of `finish` (which
|
|
405
|
+
* polishes a clip) and the dialogue/`speech` lane (which polishes per-shot voice): `master` operates
|
|
406
|
+
* once, on the whole film's audio, AFTER the mix is built (score + narration) and BEFORE the audio is
|
|
407
|
+
* muxed onto the silent film. `audio_key` is the R2 key of that bed; the core presigns a GET of it
|
|
408
|
+
* (`audio_url`) and a PUT for the mastered output (`output_url` / `output_key`) so the module stays
|
|
409
|
+
* CREDENTIALLESS and forwards them to its CPU container -- exactly as the subtitle / film.finish modules
|
|
410
|
+
* get a presigned video_url + output_url. A music-video maker reaches for `master` as cleanly as a
|
|
411
|
+
* dialogue maker reaches for the voice lane. */
|
|
412
|
+
export interface MasterInput {
|
|
413
|
+
film_id: string;
|
|
414
|
+
audio_key: string;
|
|
415
|
+
audio_url: string;
|
|
416
|
+
output_url: string;
|
|
417
|
+
output_key: string;
|
|
418
|
+
seconds?: number;
|
|
419
|
+
}
|
|
420
|
+
/** What a `master` module returns: the mastered audio bed plus what it did. Length is invariant
|
|
421
|
+
* (mastering changes level / sample rate, never duration). HONEST soft-degrade, exactly as a `finish`
|
|
422
|
+
* module: when the master cannot run (misconfig / backend down) the module passes the INPUT bed
|
|
423
|
+
* through (`audio_key` unchanged) and sets `degraded` with the reason -- never a fake `applied` tag,
|
|
424
|
+
* never a dropped bed. A real degrade is therefore never silent (#249 / #77). */
|
|
425
|
+
export interface MasterOutput {
|
|
426
|
+
audio_key: string;
|
|
427
|
+
applied: string[];
|
|
428
|
+
degraded?: string;
|
|
429
|
+
}
|
|
430
|
+
/** One time-synced caption cue handed to a `film.finish` subtitle module, in seconds from the
|
|
431
|
+
* assembled film's 0-based start. Structurally mirrors src/captions.ts CaptionCue; declared here so
|
|
432
|
+
* the contract stays self-contained -- a module in another repo vendoring this file gets the caption
|
|
433
|
+
* shape too, without importing a core-only module. */
|
|
434
|
+
export interface FilmFinishCaption {
|
|
435
|
+
start: number;
|
|
436
|
+
end: number;
|
|
437
|
+
text: string;
|
|
438
|
+
}
|
|
439
|
+
/** What the core hands a `film.finish` module: the assembled+muxed film to put title / credit cards
|
|
440
|
+
* (and/or burned-or-sidecar subtitles) on, by R2 transport. The module reads `video_url` (a presigned
|
|
441
|
+
* GET of the input film) and writes its result to `output_url` (a presigned PUT at `output_key`),
|
|
442
|
+
* exactly as a finish backend reads/writes a clip. `title` / `credits` carry the card text (absent =>
|
|
443
|
+
* no cards, the module passes the film through); `captions` carries the time-synced dialogue cues for a
|
|
444
|
+
* subtitle module (empty => it no-ops); `sidecar_url` / `sidecar_key` are a presigned PUT for an
|
|
445
|
+
* optional .srt sidecar. This runs POST-mux, before done, as a `chain`: every installed film.finish
|
|
446
|
+
* module folds in `ui.order`, and the core presigns a FRESH GET (of the PRIOR step's film) + PUT (to a
|
|
447
|
+
* new key) per step, so step N+1 reads what step N wrote rather than the original (#14). */
|
|
448
|
+
export interface FilmFinishInput {
|
|
449
|
+
film_key: string;
|
|
450
|
+
video_url: string;
|
|
451
|
+
output_url: string;
|
|
452
|
+
output_key: string;
|
|
453
|
+
title?: {
|
|
454
|
+
text: string;
|
|
455
|
+
subtitle?: string;
|
|
456
|
+
};
|
|
457
|
+
credits?: {
|
|
458
|
+
lines: string[];
|
|
459
|
+
};
|
|
460
|
+
captions: FilmFinishCaption[];
|
|
461
|
+
sidecar_url: string;
|
|
462
|
+
sidecar_key: string;
|
|
463
|
+
}
|
|
464
|
+
/** What a `film.finish` module returns: the (maybe new) film key plus what it did. The chain is
|
|
465
|
+
* FAIL-SAFE -- a module that cannot run passes the film through with `film_key` UNCHANGED (the input
|
|
466
|
+
* film key, never omitted) and reports it via the soft-degrade convention, never dropping a
|
|
467
|
+
* fully-rendered film (#190). `applied` carries the module name on success, or a "passthrough:<reason>"
|
|
468
|
+
* / "noop:no-cards" tag on a soft-degrade; `degraded` (the shared chain convention, as on FinishOutput
|
|
469
|
+
* / MasterOutput / SpeechOutput) is set ONLY when the film shipped UNCARDED, carrying the reason -- the
|
|
470
|
+
* one signal that requested cards were NOT applied (#207). The core records the chain outcome on the
|
|
471
|
+
* job rather than dropping it. */
|
|
472
|
+
export interface FilmFinishOutput {
|
|
473
|
+
film_key: string;
|
|
474
|
+
applied?: string[];
|
|
475
|
+
degraded?: string;
|
|
476
|
+
prepend_seconds?: number;
|
|
477
|
+
}
|
|
478
|
+
/** One registered module, INTERNAL to the core: the manifest plus a `binding` REF telling the core how
|
|
479
|
+
* to reach it. The ref is transport-encoded (resolved by registry.resolveFetcher):
|
|
480
|
+
* - `MODULE_<NAME>` -> a service binding on env (the legacy, in-tree, deploy-wired path), or
|
|
481
|
+
* - `dispatch:<script>` -> a user-Worker script uploaded into the Workers-for-Platforms dispatch
|
|
482
|
+
* namespace, reached via env.MODULE_DISPATCH.get(<script>) at request time (installed without a core
|
|
483
|
+
* redeploy; see docs/module-dispatch.md). The `dispatch:` prefix cannot collide with a real
|
|
484
|
+
* `MODULE_*` env key, so a single string persists a module's transport through job state and both
|
|
485
|
+
* kinds re-resolve uniformly across requests.
|
|
486
|
+
* The ref is internal topology and NEVER leaves the core -- toPublic strips it (see PublicModule). */
|
|
487
|
+
export interface RegisteredModule extends ModuleManifest {
|
|
488
|
+
binding: string;
|
|
489
|
+
}
|
|
490
|
+
/** One registered module as the core exposes it to the frontend over GET /api/modules: the manifest
|
|
491
|
+
* ONLY, with the internal `binding` ref stripped. The unauthenticated registry route must not leak
|
|
492
|
+
* which env binding OR namespace script serves a hook (internal module-host topology); the studio UI
|
|
493
|
+
* never needs it -- it renders from the manifest, and the core resolves the transport itself. (Info
|
|
494
|
+
* disclosure, #18.) */
|
|
495
|
+
export type PublicModule = ModuleManifest;
|
|
496
|
+
/** One hook in the catalog the frontend renders the pipeline panel from, so the panel is a
|
|
497
|
+
* projection of the contract rather than a hardcoded list. */
|
|
498
|
+
export interface HookCatalogEntry {
|
|
499
|
+
name: HookName;
|
|
500
|
+
blurb: string;
|
|
501
|
+
cardinality: "pick_one" | "chain";
|
|
502
|
+
}
|
|
503
|
+
/** Core-owned render config the frontend projects (so the planner stops hand-authoring it in markup).
|
|
504
|
+
* Distinct from module config_schema: these are cross-cutting choices the HOST owns (e.g. the quality
|
|
505
|
+
* tier the core injects into the keyframe + motion modules), not knobs a single module declares.
|
|
506
|
+
* Sourced from the one core constant (QUALITY_TIERS / DEFAULT_QUALITY_TIER in render-module-config). */
|
|
507
|
+
export interface RenderConfigProjection {
|
|
508
|
+
quality_tiers: {
|
|
509
|
+
value: string;
|
|
510
|
+
label: string;
|
|
511
|
+
blurb: string;
|
|
512
|
+
}[];
|
|
513
|
+
default_tier: string;
|
|
514
|
+
}
|
|
515
|
+
/** GET /api/modules: the merged registry the studio UI renders itself from. Carries the PUBLIC
|
|
516
|
+
* module view (no internal `binding`); the hook index maps each hook to the module NAMES serving
|
|
517
|
+
* it, so the frontend has everything it needs to project the pipeline without seeing topology. */
|
|
518
|
+
export interface ModulesResponse {
|
|
519
|
+
api: ModuleApi;
|
|
520
|
+
modules: PublicModule[];
|
|
521
|
+
hooks: Partial<Record<HookName, string[]>>;
|
|
522
|
+
catalog: HookCatalogEntry[];
|
|
523
|
+
render: RenderConfigProjection;
|
|
524
|
+
/** What TRANSPORTS this host offers, the CORE describing ITSELF -- orthogonal to `api` (which is the
|
|
525
|
+
* module contract version, unchanged by dispatch). `dispatch: true` means this deployment speaks
|
|
526
|
+
* Workers-for-Platforms dynamic dispatch (a module can be installed without a core redeploy).
|
|
527
|
+
* `readonly: true` (#625) means this deployment accepts no mutations (the public demo studio,
|
|
528
|
+
* AUTH_MODE=demo): the frontend disables mutation affordances off this ONE projected capability
|
|
529
|
+
* instead of growing per-feature demo branches; omitted everywhere else. A module never reads
|
|
530
|
+
* this; an operator / the studio UI / a health probe does. OPTIONAL + additive:
|
|
531
|
+
* a deploy without WfP omits it, and NO MODULE_API bump (docs/module-dispatch.md section 5.3). */
|
|
532
|
+
host?: {
|
|
533
|
+
dispatch: boolean;
|
|
534
|
+
readonly?: boolean;
|
|
535
|
+
render?: {
|
|
536
|
+
available: boolean;
|
|
537
|
+
};
|
|
538
|
+
assistant?: {
|
|
539
|
+
model: string;
|
|
540
|
+
note: string;
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/modules/types.ts"],"names":[],"mappings":"AASA,+FAA+F;AAC/F,eAAO,MAAM,UAAU,EAAG,mBAA4B,CAAC;AAMvD,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,mBAAm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;KAAE,EAAE,CAAC;IACjE,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;mGAEmG;AACnG,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,SAAS,CAAC;IACf,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC3C,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,MAAM,EAAE,sBAAsB,CAAC;IAC/B;;;;;;;uGAOmG;IACnG,IAAI,CAAC,EAAE;QACL,QAAQ,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;QAKnB,MAAM,CAAC,EAAE;YAAE,SAAS,EAAE,OAAO,CAAA;SAAE,CAAC;QAChC,SAAS,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC;KAC7C,CAAC;CACH"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// The Vivijure module contract (vivijure-module/2).
|
|
2
|
+
//
|
|
3
|
+
// This is the typed boundary between the studio CORE and the opt-in MODULE workers that plug into
|
|
4
|
+
// it. The core invokes hooks; it does not know who answers. A module declares which hooks it serves
|
|
5
|
+
// (its manifest) and implements one invoke entry point. See docs/module-api.md for the full design.
|
|
6
|
+
//
|
|
7
|
+
// Keep this file dependency-free: it is the shared shape both the core and every module import, so
|
|
8
|
+
// it must stay portable (a module in another repo vendors this exact contract).
|
|
9
|
+
/** The contract version a module targets. Bumped only on a breaking change to these shapes. */
|
|
10
|
+
export const MODULE_API = "vivijure-module/2";
|
|
11
|
+
// A SET of currently-supported contract epochs, not a brittle exact-match. The /1 deprecation
|
|
12
|
+
// window from #293 is CLOSED (#294): every first-party module is /2 and /1 manifests are rejected.
|
|
13
|
+
// The ModuleApi union above keeps /1 nameable as a historical epoch; this Set is the policy.
|
|
14
|
+
export const SUPPORTED_MODULE_APIS = new Set(["vivijure-module/2"]);
|
|
15
|
+
export const HOOK_NAMES = [
|
|
16
|
+
"keyframe",
|
|
17
|
+
"motion.backend",
|
|
18
|
+
"finish",
|
|
19
|
+
"score",
|
|
20
|
+
"dialogue",
|
|
21
|
+
"speech",
|
|
22
|
+
"plan.enhance",
|
|
23
|
+
"cast.image",
|
|
24
|
+
"notify",
|
|
25
|
+
"master",
|
|
26
|
+
"film.finish",
|
|
27
|
+
];
|
|
28
|
+
/** Whether a hook resolves to one module or folds every installed module. */
|
|
29
|
+
export const HOOK_CARDINALITY = {
|
|
30
|
+
keyframe: "pick_one",
|
|
31
|
+
"motion.backend": "pick_one",
|
|
32
|
+
finish: "chain",
|
|
33
|
+
score: "chain",
|
|
34
|
+
dialogue: "pick_one",
|
|
35
|
+
speech: "chain",
|
|
36
|
+
"plan.enhance": "chain",
|
|
37
|
+
"cast.image": "pick_one",
|
|
38
|
+
notify: "chain",
|
|
39
|
+
master: "chain",
|
|
40
|
+
"film.finish": "chain",
|
|
41
|
+
};
|
|
42
|
+
/** One-line description of each hook, for the self-assembling UI. Single source of truth: the
|
|
43
|
+
* frontend renders the hook panel from this (served via GET /api/modules), not a hardcoded copy. */
|
|
44
|
+
export const HOOK_BLURBS = {
|
|
45
|
+
keyframe: "storyboard -> start keyframes (SDXL)",
|
|
46
|
+
"motion.backend": "keyframe -> shot clip (GPU or cloud)",
|
|
47
|
+
finish: "interpolation / upscale / face restore",
|
|
48
|
+
score: "music / narration / beat-sync",
|
|
49
|
+
dialogue: "spoken lines -> per-character voice (TTS)",
|
|
50
|
+
speech: "clean / enhance dialogue audio",
|
|
51
|
+
"plan.enhance": "LLM auto-direction",
|
|
52
|
+
"cast.image": "character refs from a portrait + bible",
|
|
53
|
+
notify: "render-complete notification (email / webhook)",
|
|
54
|
+
master: "film-level audio mastering: music upscale + loudness",
|
|
55
|
+
"film.finish": "title / credit cards on the finished film",
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=types.js.map
|
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,sDAAsD;IAC9D,aAAa,EAAE,2CAA2C;CAC3D,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Env } from "./platform/orchestrator-context.js";
|
|
2
|
+
import type { ConfigSchema } from "./modules/types.js";
|
|
3
|
+
/** Project a module's config_schema down to ONLY its install-scope fields. A field with no `scope`
|
|
4
|
+
* (or scope "render") is a per-render knob and is excluded -- so this store never owns render config. */
|
|
5
|
+
export declare function installSubschema(schema: ConfigSchema | undefined): ConfigSchema;
|
|
6
|
+
/** Does this module expose any install-scope config at all? */
|
|
7
|
+
export declare function hasInstallConfig(schema: ConfigSchema | undefined): boolean;
|
|
8
|
+
/** The set of writable install field keys for a module (what PATCH is allowed to set). */
|
|
9
|
+
export declare function installFieldKeys(schema: ConfigSchema | undefined): string[];
|
|
10
|
+
/** Clamp an incoming patch to the module's install subschema, dropping unknown / render-scope keys.
|
|
11
|
+
* Reuses the SAME validateConfig clamp the invoke path uses, so a stored value can never violate the
|
|
12
|
+
* contract. Returns the full install-config (every install field, missing ones at their default). */
|
|
13
|
+
export declare function clampInstallPatch(schema: ConfigSchema | undefined, current: Record<string, unknown>, patch: Record<string, unknown> | undefined): Record<string, unknown>;
|
|
14
|
+
/** The module's install-config as the INVOKE path consumes it: every install field present, missing
|
|
15
|
+
* ones at their schema default, clamped to the contract. Empty schema -> {} (a clean no-op). */
|
|
16
|
+
export declare function loadInstallConfig(env: Env, moduleName: string, schema: ConfigSchema | undefined): Promise<Record<string, unknown>>;
|
|
17
|
+
/** Persist an operator PATCH: clamp to the install subschema (unknown / render keys dropped), then
|
|
18
|
+
* upsert each field. Returns the resulting full install-config view. */
|
|
19
|
+
export declare function setInstallConfig(env: Env, moduleName: string, schema: ConfigSchema | undefined, patch: Record<string, unknown> | undefined): Promise<Record<string, unknown>>;
|
|
20
|
+
//# sourceMappingURL=operator-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operator-config.d.ts","sourceRoot":"","sources":["../src/operator-config.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD;0GAC0G;AAC1G,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,YAAY,CAO/E;AAED,+DAA+D;AAC/D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,OAAO,CAE1E;AAED,0FAA0F;AAC1F,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,EAAE,CAE3E;AAED;;sGAEsG;AACtG,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACzC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIzB;AAuBD;iGACiG;AACjG,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,YAAY,GAAG,SAAS,GAC/B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAKlC;AAED;yEACyE;AACzE,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,GAAG,EACR,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GACzC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAgBlC"}
|