rig-review 4.5.0 → 4.6.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rig-review",
3
- "version": "4.5.0",
3
+ "version": "4.6.0",
4
4
  "type": "module",
5
5
  "description": "Local human rig inspection and structured feedback export",
6
6
  "license": "MIT",
@@ -16,23 +16,32 @@ export interface DirectionInspection {
16
16
  };
17
17
  postVersion?: number;
18
18
  rigVersion: number;
19
+ /**
20
+ * rig-create/direction@3: the take is the composed model's own `idle`, played at the model stage.
21
+ * @3 authors no camera, timing or scene, so its camera and timing key lists are empty.
22
+ */
23
+ composed?: true;
19
24
  camera: { space: 'rig-world-y-up'; keys: { time: number; easing: string; box: { x: number; y: number; width: number; height: number } }[] };
20
25
  take: { duration: number; loop: boolean };
21
26
  timing: { time: number; source_time: number; easing: string }[];
22
27
  }
23
28
 
24
29
  /**
25
- * Read the inspection subset of Create's rig-create/direction@1 or rig-create/direction@2.
26
- * Scene bytes are inspected separately when the manifest declares them.
27
- * Create validates scene, project history and citations.
30
+ * Read the inspection subset of Create's rig-create/direction@1, @2 or @3.
31
+ * Scene bytes are inspected separately when the manifest declares them; @3 has no scene.
32
+ * Create validates scene, compose, acceptance, project history and citations.
28
33
  */
29
34
  export function readDirectionInspection(value: unknown, file: Binding, model: Binding | null): DirectionInspection {
30
35
  const doc = object(value, 'direction');
31
- if (doc.schema !== 'rig-create/direction@1' && doc.schema !== 'rig-create/direction@2')
32
- throw new Error('DIRECTION_SCHEMA: expected rig-create/direction@1 or rig-create/direction@2');
36
+ const composed = doc.schema === 'rig-create/direction@3';
37
+ if (doc.schema !== 'rig-create/direction@1' && doc.schema !== 'rig-create/direction@2' && !composed)
38
+ throw new Error('DIRECTION_SCHEMA: expected rig-create/direction@1, rig-create/direction@2 or rig-create/direction@3');
33
39
  const rig = object(doc.rig, 'direction.rig');
34
- const binding = object(rig.model, 'direction.rig.model');
35
- const path = packagePath(binding.path, 'direction.rig.model.path');
40
+ // @3 binds the compiled model at the top level; @1/@2 bind it under rig.
41
+ if (composed && (!doc.model || typeof doc.model !== 'object')) throw new Error('DIRECTION_SCHEMA: rig-create/direction@3 requires a top-level model');
42
+ const field = composed ? 'direction.model' : 'direction.rig.model';
43
+ const binding = object(composed ? doc.model : rig.model, field);
44
+ const path = packagePath(binding.path, field + '.path');
36
45
  if (!model || path !== model.path || binding.sha256 !== model.sha256)
37
46
  throw new Error('DIRECTION_MODEL_MISMATCH: expected the inspected model path and SHA-256');
38
47
  const rigVersion = numberField(rig.version, 'direction.rig.version', 1);
@@ -40,6 +49,7 @@ export function readDirectionInspection(value: unknown, file: Binding, model: Bi
40
49
  const take = object(doc.take, 'direction.take');
41
50
  const duration = numberField(take.duration, 'direction.take.duration');
42
51
  if (duration === 0 || typeof take.loop !== 'boolean') throw new Error('DIRECTION_SCHEMA: expected positive duration and loop boolean');
52
+ if (composed) return { file, model, rigVersion, composed: true, camera: { space: 'rig-world-y-up', keys: [] }, take: { duration, loop: take.loop }, timing: [] };
43
53
  const camera = object(doc.camera, 'direction.camera');
44
54
  const timing = object(doc.timing, 'direction.timing');
45
55
  if (camera.space !== 'rig-world-y-up') throw new Error('DIRECTION_SCHEMA: expected rig-world-y-up camera');
package/web/catalog-en.ts CHANGED
@@ -232,6 +232,7 @@ export const enCatalog: Readonly<Record<string, string>> = {
232
232
  "scene.plateDimensions": "SCENE_PLATE_DIMENSIONS: {0}",
233
233
  "scene.canvasRequired": "SCENE_REQUIRED: canvas renderer required.",
234
234
  "direction.summary": "Direction{0} · {1} s · {2} · {3}",
235
+ "direction.composed": "Direction{0} · {1} s · {2}",
235
236
  "direction.loop": "loop",
236
237
  "direction.once": "once",
237
238
  "direction.fixedCamera": "fixed camera",
package/web/catalog-ko.ts CHANGED
@@ -232,6 +232,7 @@ export const koCatalog: Readonly<Record<string, string>> = {
232
232
  "scene.plateDimensions": "SCENE_PLATE_DIMENSIONS: {0}",
233
233
  "scene.canvasRequired": "SCENE_REQUIRED: 캔버스 렌더러가 필요해요.",
234
234
  "direction.summary": "연출{0} · {1}초 · {2} · {3}",
235
+ "direction.composed": "연출{0} · {1}초 · {2}",
235
236
  "direction.loop": "반복",
236
237
  "direction.once": "한 번",
237
238
  "direction.fixedCamera": "카메라 고정",
@@ -31,8 +31,11 @@ export function directionRows(view: DirectionView): { key: string; values?: stri
31
31
  : { key: 'direction.authoredUnavailable' },
32
32
  ...(joined ? [{ key: 'direction.joined', values: [String(joined.postVersion), joined.projectModel.path,
33
33
  joined.packageRoot, joined.projectHash, joined.packageSourceHash] }] : []),
34
- ...(model?.inspected&&view.scene?[{key:'direction.planes',values:[t(view.scene.plates.length===2?'direction.threePlanes':'direction.twoPlanes')]}]:[{ key: 'direction.runtimeCameraUnavailable' }]),
35
- { key: 'direction.cameraApplyUnavailable' },
34
+ // direction@3 authors no camera: its take is the composed model's idle at the model stage (owner ruling, #933).
35
+ ...(view.authored?.composed ? [] : [
36
+ ...(model?.inspected&&view.scene?[{key:'direction.planes',values:[t(view.scene.plates.length===2?'direction.threePlanes':'direction.twoPlanes')]}]:[{ key: 'direction.runtimeCameraUnavailable' }]),
37
+ { key: 'direction.cameraApplyUnavailable' },
38
+ ]),
36
39
  ];
37
40
  }
38
41
 
@@ -40,13 +43,14 @@ export function directionRows(view: DirectionView): { key: string; values?: stri
40
43
  export function directionSummary(view: DirectionView, language?: 'en' | 'ko'): string {
41
44
  const authored = view.model?.inspected ? view.authored : undefined;
42
45
  if (!authored) return t('direction.title', undefined, language);
46
+ const post=authored.joined?.postVersion??authored.postVersion;
47
+ const version = post ? ` v${post}` : '';
48
+ const repeat = t(authored.take.loop ? 'direction.loop' : 'direction.once', undefined, language);
49
+ if (authored.composed) return t('direction.composed', [version, String(authored.take.duration), repeat], language);
43
50
  const first = authored.camera.keys[0]!.box;
44
51
  const fixed = authored.camera.keys.every(({ box }) =>
45
52
  box.x === first.x && box.y === first.y && box.width === first.width && box.height === first.height);
46
- const post=authored.joined?.postVersion??authored.postVersion;
47
- const version = post ? ` v${post}` : '';
48
- return t('direction.summary', [version, String(authored.take.duration),
49
- t(authored.take.loop ? 'direction.loop' : 'direction.once', undefined, language),
53
+ return t('direction.summary', [version, String(authored.take.duration), repeat,
50
54
  t(fixed ? 'direction.fixedCamera' : 'direction.movingCamera', undefined, language)], language);
51
55
  }
52
56
 
@@ -74,7 +78,7 @@ export function bindDirectionPanel(before: HTMLElement, read: () => DirectionVie
74
78
  if (host.hidden) return;
75
79
  const view = read();
76
80
  title.textContent = directionSummary(view);
77
- const rows = [...directionRows(view),...(!view.scene&&view.authored?[{key:view.authored.scene?'direction.noScene':'direction.legacyTake'}]:[])].map(({ key, values }) => {
81
+ const rows = [...directionRows(view),...(!view.scene&&view.authored&&!view.authored.composed?[{key:view.authored.scene?'direction.noScene':'direction.legacyTake'}]:[])].map(({ key, values }) => {
78
82
  const row = document.createElement('li');
79
83
  row.textContent = t(key, values);
80
84
  return row;