rig-review 1.1.0 → 1.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/src/manifest.ts CHANGED
@@ -26,7 +26,9 @@ export interface ReviewPackage { referenceHashes?:Record<string,string>; root: s
26
26
  /** The resolved producer handoff (#101) and, when there is none, the refusal line naming where it was looked for. */
27
27
  handoff: Handoff|null; handoffReason: string|null; handoffInputs?: HandoffFlags;
28
28
  /** #187: the rig-parts build root ({@link isBuildRoot}) whose `check/` this package is, however it was opened; review state stays outside it. */
29
- buildRoot?: string }
29
+ buildRoot?: string;
30
+ /** #305: viewer-only open (`--view-only`). */
31
+ viewOnly?: boolean }
30
32
  function fail(field: string, expected: string): never { throw new Error(`${field}: expected ${expected}`); }
31
33
  export function object(value: unknown, field: string): Record<string, unknown> { if (!value || typeof value !== 'object' || Array.isArray(value)) fail(field, 'object'); return value as Record<string, unknown>; }
32
34
  export function string(value: unknown, field: string): string { if (typeof value !== 'string' || !value.trim() || value.length > 10000) fail(field, 'nonempty string (at most 10000 characters)'); return value; }
package/src/open.ts CHANGED
@@ -19,6 +19,8 @@ import {playPackagePath} from './versions.ts';
19
19
  import {HandoffError,HANDOFF_FLAGS,isBuildRoot,type HandoffFlags,type HandoffRecord} from './handoff.ts';
20
20
  import {stateDirInside,stateRoots} from './state-dir.ts';
21
21
  import {DEFAULT_UNOPENED_TIMEOUT_MS} from './live-lifecycle.ts';
22
+ import {verifyCompiledModel} from './strip-render.ts';
23
+ import {verifyHandoffReadiness} from './rebuild.ts';
22
24
  /** #149: an opened rig-parts build check package — its canonical path and the handoff record (or the refusal line). */
23
25
  export interface BuildOpen {package:string;handoff:HandoffRecord|null;reason:string|null}
24
26
  /** The stderr diagnostic for {@link BuildOpen}: the package opened, then how the config was found, its package-relative path and full SHA-256. */
@@ -26,22 +28,22 @@ export function buildOpenDiagnostic(build:BuildOpen):string{
26
28
  const h=build.handoff,how=!h?'':h.how==='declared'?`declared (${h.via})`:h.outside?'discovered outside the opened folder':'discovered';
27
29
  return `Package: rig-parts build check package ${build.package}\n${h?`Handoff ${how}: ${h.config.path} sha256 ${h.config.sha256}${h.parts?` · parts ${h.parts}`:''}`:`Handoff: ${build.reason??'none'}`}`;
28
30
  }
29
- /** `direct` chooses how the page is reached (own port instead of the managed front); it is not part of the instance identity. */
30
- export interface OpenInputs {input:string;compare?:string;reference?:string;animation?:string;control?:boolean;direct?:boolean;config?:string;parts?:string;source?:string;full?:string;head?:string;keypoints?:string}
31
+ /** `direct` chooses how the page is reached (own port instead of the managed front); `viewOnly` permits opening without a producer handoff (#305); neither is part of the instance identity. */
32
+ export interface OpenInputs {input:string;compare?:string;reference?:string;animation?:string;control?:boolean;direct?:boolean;viewOnly?:boolean;config?:string;parts?:string;source?:string;full?:string;head?:string;keypoints?:string}
31
33
  /** The producer handoff flags (#101) among the inputs, or undefined when none was given. */
32
34
  export function handoffFlags(inputs:OpenInputs):HandoffFlags|undefined{const present=HANDOFF_FLAGS.filter(f=>inputs[f]!==undefined);if(!present.length)return undefined;return Object.fromEntries(present.map(f=>[f,inputs[f]])) as unknown as HandoffFlags;}
33
35
  export type OpenPackage=({mode:'single';p:ReviewPackage;inputs:OpenInputs;contentHash:string}|{mode:'compare';p:ComparePackage;inputs:OpenInputs;contentHash:string})&{selection:AnimationSelection|null};
34
36
  /** Private 0600 record. `capability` is the 256-bit page write capability, handed out only in the printed `#cap=` fragment. */
35
37
  export interface RecordFile extends OpenIdentity {schema:'rig-review-open-instance/1';pid:number;origin:string;mode:'single'|'compare';capability:string;controlToken?:string}
36
38
  /** `cwd` is the launcher's working directory: the worker runs in the state directory, so Apply · Rebuild looks for the producer from here after the package's own directories. */
37
- interface WorkerRequest {schema:'rig-review-open-request/1';inputs:OpenInputs;identity:OpenIdentity;stateDir:string;registry:string;request:string;idleMs:number;graceMs?:number;controlToken?:string;cwd?:string}
39
+ interface WorkerRequest {schema:'rig-review-open-request/1';inputs:OpenInputs;identity:OpenIdentity;stateDir:string;registry:string;request:string;idleMs:number;graceMs?:number;controlToken?:string;cwd?:string;viewOnly?:boolean}
38
40
  const appRoot=fileURLToPath(new URL('..',import.meta.url));
39
41
  const digest=(value:unknown)=>createHash('sha256').update(JSON.stringify(value)).digest('hex');
40
42
  const sleep=(ms:number)=>new Promise(resolveSleep=>setTimeout(resolveSleep,ms));
41
43
  export const defaultStateDir=()=>process.env.RIG_REVIEW_STATE_DIR??join(homedir(),'.local','state','rig-c-review');
42
44
  export async function loadOpenPackage(inputs:OpenInputs):Promise<OpenPackage>{
43
45
  // Handoff flags become canonical absolute paths here, so the worker and every reload read exactly these files.
44
- if(!inputs.compare){const p=await loadReferencedReview(inputs.input,inputs.reference,handoffFlags(inputs)),selection=selectAnimation([{label:'single',catalog:p.feedbackCatalog,report:p.report}],inputs.animation,true);return {mode:'single',p,selection,contentHash:p.sourceHash,inputs:{input:p.manifestPath,...(selectedReference(p)?{reference:selectedReference(p)!.path}:{}),...(selection?{animation:selection.name}:{}),...(inputs.control?{control:true}:{}),...(p.handoffInputs??{})}};}
46
+ if(!inputs.compare){const p=await loadReferencedReview(inputs.input,inputs.reference,handoffFlags(inputs)),selection=selectAnimation([{label:'single',catalog:p.feedbackCatalog,report:p.report}],inputs.animation,true);if(inputs.viewOnly)p.viewOnly=true;return {mode:'single',p,selection,contentHash:p.sourceHash,inputs:{input:p.manifestPath,...(selectedReference(p)?{reference:selectedReference(p)!.path}:{}),...(selection?{animation:selection.name}:{}),...(inputs.control?{control:true}:{}),...(p.handoffInputs??{})}};}
45
47
  if(handoffFlags(inputs))throw new HandoffError('HANDOFF_FLAGS_INVALID','--config','compare takes no producer handoff; open one package with --config');
46
48
  if(!inputs.reference)throw new Error('open compare: explicit --reference required');
47
49
  const [a,b]=await Promise.all([loadReview(inputs.input),loadReview(inputs.compare)]),selection=selectAnimation([{label:'a',catalog:a.feedbackCatalog,report:a.report},{label:'b',catalog:b.feedbackCatalog,report:b.report}],inputs.animation)!;
@@ -104,10 +106,23 @@ async function openRefusal(error:unknown,inputs:OpenInputs):Promise<unknown>{
104
106
  const name=error.kind==='empty'?'OPEN_OPTION_INVALID --animation':error.kind==='unknown'?`OPEN_ANIMATION_UNKNOWN ${JSON.stringify(error.animation)}`:error.kind==='ambiguous'?'OPEN_ANIMATION_AMBIGUOUS':'OPEN_ANIMATION_UNVALIDATABLE';
105
107
  return new Error(`${name}: ${detail}`,{cause:error});
106
108
  }
109
+ async function verifyOpenLoad(p:OpenPackage,viewOnly:boolean,cwd=process.cwd()):Promise<void>{
110
+ if(p.mode==='single'){
111
+ try{await verifyCompiledModel(p.p.root,p.p.manifest.model,p.selection?.name);}
112
+ catch(error){throw new Error(`OPEN_MODEL_UNAVAILABLE: ${error instanceof Error?error.message:String(error)}`,{cause:error});}
113
+ const handoffReason=await verifyHandoffReadiness(p.p,[p.p.root,cwd],viewOnly);
114
+ if(handoffReason)throw new Error(`OPEN_MODEL_UNAVAILABLE: ${handoffReason}`);
115
+ return;
116
+ }
117
+ for(const [side,pkg] of [['a',p.p.a],['b',p.p.b]] as const){
118
+ try{await verifyCompiledModel(pkg.root,pkg.manifest.model,p.selection?.name);}
119
+ catch(error){throw new Error(`OPEN_MODEL_UNAVAILABLE: side ${side}: ${error instanceof Error?error.message:String(error)}`,{cause:error});}
120
+ }
121
+ }
107
122
  /** Managed is the default: the printed URL goes through the one loopback front (127.0.0.1:4318, or
108
123
  * RIG_REVIEW_FRONT_PORT) so browser storage keeps one origin across reopens. `direct` keeps the worker's own port. */
109
- export async function openReview(inputs:OpenInputs,options:{stateDir?:string;idleMs?:number;graceMs?:number;direct?:boolean;frontPort?:number;frontIdleMs?:number}={}):Promise<{url:string;reused:boolean;nonce:string;inputs:OpenInputs;selection:AnimationSelection|null;direct:boolean;build:BuildOpen|null}>{
110
- const direct=options.direct??inputs.direct??false,port=direct?0:frontPort(options.frontPort);
124
+ export async function openReview(inputs:OpenInputs,options:{stateDir?:string;idleMs?:number;graceMs?:number;direct?:boolean;viewOnly?:boolean;cwd?:string;frontPort?:number;frontIdleMs?:number}={}):Promise<{url:string;reused:boolean;nonce:string;inputs:OpenInputs;selection:AnimationSelection|null;direct:boolean;build:BuildOpen|null}>{
125
+ const direct=options.direct??inputs.direct??false,viewOnly=options.viewOnly??inputs.viewOnly??false,port=direct?0:frontPort(options.frontPort);
111
126
  for(const path of [inputs.input,...(inputs.compare!==undefined?[inputs.compare]:[])])await assertOpenInput(path);
112
127
  if(inputs.compare!==undefined&&!inputs.reference)throw new Error('OPEN_REFERENCE_REQUIRED: compare: explicit --reference required');
113
128
  let p:OpenPackage;try{p=await loadOpenPackage(inputs);}catch(error){throw await openRefusal(error,inputs);}
@@ -115,14 +130,15 @@ export async function openReview(inputs:OpenInputs,options:{stateDir?:string;idl
115
130
  // #187: canonical (symlinks and ancestors resolved) and outside every supplied folder: the package, the build root a check package belongs to, the handoff root.
116
131
  const stateDir=await canonicalDestination(resolve(options.stateDir??defaultStateDir())),roots=p.mode==='single'?stateRoots(p.p):[...stateRoots(p.p.a),...stateRoots(p.p.b)];
117
132
  const inside=stateDirInside(stateDir,roots);if(inside)throw new Error(`OPEN_STATE_INSIDE_PACKAGE ${inside.kind}: the review state directory must be outside input packages; it is inside the ${inside.kind}; set RIG_REVIEW_STATE_DIR outside it`);
133
+ await verifyOpenLoad(p,viewOnly,options.cwd);
118
134
  const control=join(stateDir,'open');await mkdir(control,{recursive:true,mode:0o700});const canonicalControl=await realpath(control);if((await lstat(control)).isSymbolicLink())throw new Error('open.state: control directory cannot be a symlink');
119
- const worker=await ensureWorker(p,key,fingerprint,stateDir,canonicalControl,options.idleMs??DEFAULT_UNOPENED_TIMEOUT_MS,options.graceMs);
135
+ const worker=await ensureWorker(p,key,fingerprint,stateDir,canonicalControl,options.idleMs??DEFAULT_UNOPENED_TIMEOUT_MS,options.graceMs,viewOnly,options.cwd);
120
136
  const url=direct?openUrl(worker.row):openUrl(worker.row,await ensureFront({control:canonicalControl,port,fingerprint,idleMs:options.frontIdleMs}));
121
137
  // #149: the check package of a rig-parts build root says which package it opened and which config the handoff took.
122
138
  const build=p.mode==='single'&&basename(p.p.root)==='check'&&await isBuildRoot(dirname(p.p.root))?{package:p.p.root,handoff:p.p.reviewedSource.handoff??null,reason:p.p.handoffReason}:null;
123
139
  return {url,reused:worker.reused,nonce:worker.row.nonce,inputs:p.inputs,selection:p.selection,direct,build};
124
140
  }
125
- async function ensureWorker(p:OpenPackage,key:string,fingerprint:string,stateDir:string,canonicalControl:string,idleMs:number,graceMs?:number):Promise<{row:RecordFile;reused:boolean}>{
141
+ async function ensureWorker(p:OpenPackage,key:string,fingerprint:string,stateDir:string,canonicalControl:string,idleMs:number,graceMs?:number,viewOnly=false,cwd=process.cwd()):Promise<{row:RecordFile;reused:boolean}>{
126
142
  const registry=join(canonicalControl,key+'.json'),claim=join(canonicalControl,key+'.claim'),nonce=randomUUID(),deadline=performance.now()+20000;
127
143
  const reuse=async()=>{const row=await readRecord(registry,key);return row&&row.fingerprint===fingerprint&&row.contentHash===p.contentHash&&row.mode===p.mode&&await alive(row)?row:null;};
128
144
  const ready=await reuse();if(ready)return {row:ready,reused:true};
@@ -131,7 +147,7 @@ async function ensureWorker(p:OpenPackage,key:string,fingerprint:string,stateDir
131
147
  try{
132
148
  const row=await reuse();if(row)return {row,reused:true};
133
149
  const identity:OpenIdentity={key,contentHash:p.contentHash,nonce,fingerprint};request=join(canonicalControl,`${key}.${nonce}.request.json`);const log=join(canonicalControl,`${key}.${nonce}.log`);
134
- const spec:WorkerRequest={schema:'rig-review-open-request/1',inputs:p.inputs,identity,stateDir,registry,request,idleMs,...(graceMs!==undefined?{graceMs}:{}),cwd:process.cwd(),...(p.inputs.control?{controlToken:randomUUID()}:{} )};await writeFile(request,JSON.stringify(spec),{mode:0o600,flag:'wx'});
150
+ const spec:WorkerRequest={schema:'rig-review-open-request/1',inputs:p.inputs,identity,stateDir,registry,request,idleMs,...(graceMs!==undefined?{graceMs}:{}),cwd,...(viewOnly?{viewOnly:true}:{}),...(p.inputs.control?{controlToken:randomUUID()}:{} )};await writeFile(request,JSON.stringify(spec),{mode:0o600,flag:'wx'});
135
151
  const logHandle=await openFile(log,'a',0o600);let child;try{child=spawn(process.execPath,[join(appRoot,'src/open-worker.ts'),request],{cwd:canonicalControl,detached:true,stdio:['ignore',logHandle.fd,logHandle.fd],env:process.env});spawned=child;child.unref();}finally{await logHandle.close();}
136
152
  let exited:string|undefined;child.on('error',error=>{exited=error.message;});child.on('exit',(code,signal)=>{exited=`exit ${code} ${signal??''}`;});
137
153
  while(performance.now()<deadline){const record=await reuse();if(record){handedOff=true;return {row:record,reused:false};}if(exited)throw new Error(`OPEN_START: ${exited}; worker log ${log}`);await sleep(30);}throw new Error(`OPEN_TIMEOUT: worker did not become ready; log ${log}`);
@@ -145,7 +161,7 @@ export async function runOpenWorker(requestPath:string):Promise<void>{
145
161
  // The worker mints its own page capability; it lives only in this process and the private record.
146
162
  const removeRecord=async()=>{const current=await readRecord(spec.registry,spec.identity.key);if(current?.nonce===spec.identity.nonce)await unlink(spec.registry).catch(()=>{});};
147
163
  const capability=randomBytes(32).toString('hex');const options={port:0,stateDir:spec.stateDir,open:spec.identity,capability,unopenedTimeoutMs:spec.idleMs,...(spec.graceMs!==undefined?{graceMs:spec.graceMs}:{}),exitOnClose:true,onClose:removeRecord,...(spec.inputs.control?{control:{token:spec.controlToken!,instanceKey:spec.identity.key}}:{})};
148
- const server=p.mode==='single'?await startServer(p.p,{...options,initialAnimation:p.selection?.name,...(typeof spec.cwd==='string'&&isAbsolute(spec.cwd)?{cwd:spec.cwd}:{})}):await startCompareServer(p.p,options);
164
+ const server=p.mode==='single'?await startServer(p.p,{...options,initialAnimation:p.selection?.name,...(typeof spec.cwd==='string'&&isAbsolute(spec.cwd)?{cwd:spec.cwd}:{}),...(spec.viewOnly?{viewOnly:true}:{})}):await startCompareServer(p.p,options);
149
165
  const check=()=>p.mode==='single'?assertReviewUnchanged(p.p):assertCompareUnchanged(p.p);
150
166
  await check();const record:RecordFile={schema:'rig-review-open-instance/1',...spec.identity,pid:process.pid,origin:`http://127.0.0.1:${server.port}`,mode:p.mode,capability,...(spec.inputs.control?{controlToken:spec.controlToken}:{})};const tmp=spec.registry+'.'+spec.identity.nonce+'.tmp';await writeFile(tmp,JSON.stringify(record),{mode:0o600,flag:'wx'});await rename(tmp,spec.registry);
151
167
  await unlink(requestPath).catch(e=>{if(e.code!=='ENOENT')throw e;});
package/src/rebuild.ts CHANGED
@@ -45,6 +45,8 @@ const sha256 = (bytes: string | Uint8Array) => createHash('sha256').update(bytes
45
45
 
46
46
  /** Without any handoff, Apply refuses by this name and says which flag declares one. */
47
47
  export const modelingHandoffMissing = (reason: string | null) => `MODELING_HANDOFF_MISSING: no producer handoff — declare it with ${HANDOFF_DECLARATION}${reason ? ` (${reason})` : ''}`;
48
+ /** Neutral status shown on `/api/rebuild` and the page when opened with `--view-only` and no producer handoff (#305). */
49
+ export const VIEW_ONLY_HANDOFF_STATUS = 'view only, no producer handoff';
48
50
  /** What remesh needs from the handoff, or the line naming what is missing. */
49
51
  export function handoffGap(handoff: Handoff): string | null {
50
52
  if (!handoff.parts) return `MODELING_INPUT_UNAVAILABLE: ${handoff.record.missing.join(', ')}`;
@@ -60,6 +62,30 @@ export async function producerInputs(handoff: Handoff | null, reason: string | n
60
62
  if (configHash !== handoff.record.config.sha256) throw new RebuildError('REBUILD_INPUTS_CHANGED', `${handoff.record.config.path} changed since the review was opened; restart review`);
61
63
  return { config: handoff.config, parts: handoff.parts!, rig: handoff.rig!, configText, configHash, handoff: handoff.record };
62
64
  }
65
+ /**
66
+ * #305: fast producer handoff readiness check for `open` (`handoffGap`, `producerInputs`, `resolveProducer`,
67
+ * `contourParts`). With `viewOnly`, an absent handoff (`!p.handoff`) is permitted; a declared or partly discovered
68
+ * handoff with gaps is still refused by name.
69
+ */
70
+ export async function verifyHandoffReadiness(p: ReviewPackage, starts: readonly string[], viewOnly = false): Promise<string | null> {
71
+ if (!p.handoff) return viewOnly ? null : (p.handoffReason ?? modelingHandoffMissing(null));
72
+ const gap = handoffGap(p.handoff);
73
+ if (gap) return gap;
74
+ let inputs: ProducerInputs;
75
+ try {
76
+ inputs = await producerInputs(p.handoff, p.handoffReason);
77
+ } catch (e) {
78
+ return e instanceof Error ? e.message : String(e);
79
+ }
80
+ const resolved = resolveProducer(starts);
81
+ if (!resolved.ok) return resolved.error;
82
+ try {
83
+ if (!contourParts(inputs.configText).length) return 'REBUILD_INPUTS_UNAVAILABLE: the config states no contour mesh';
84
+ } catch (e) {
85
+ return e instanceof Error ? e.message : String(e);
86
+ }
87
+ return null;
88
+ }
63
89
 
64
90
  /** The config's `constraints` list as written, or null when it has none. */
65
91
  export function configConstraints(configText: string): unknown[] | null {
@@ -187,11 +213,14 @@ export function parseRebuildRequest(input: unknown, bones: readonly string[] | n
187
213
  return { part: v.part as string, regions, configHash: v.configHash as string };
188
214
  }
189
215
 
190
- /** The part's config entry with `contour.regions` replaced by the designation and every other field as written. */
216
+ /** The part's config entry with `contour.regions` replaced by the designation (and, on a bust-only entry, `contour.bust` with it, #314) and every other field as written. */
191
217
  export function meshEntryText(configText: string, part: string, regions: readonly ProducerRegion[]): string {
192
218
  const found = contourParts(configText).find(p => p.name === part);
193
219
  if (!found) throw new RebuildError('REBUILD_PART_NOT_CONTOUR', `config meshes.${part} is not a contour entry; regions apply to contour meshes only`);
194
220
  const entry = structuredClone(found.entry), contour = entry.contour as Record<string, unknown>;
221
+ // #314: on a bust-only entry the editor's rows are the circles derived from `contour.bust`, so they replace the
222
+ // shorthand (the mirror of `bustMeshEntry`); kept beside it, the producer would meet bust_r and bust_l twice.
223
+ if (!found.regions.length) delete contour.bust;
195
224
  contour.regions = regions.map(r => ({ ...r }));
196
225
  return JSON.stringify(entry, null, 1) + '\n';
197
226
  }
@@ -468,6 +497,8 @@ export interface RebuildOptions {
468
497
  stripConcurrency?: number;
469
498
  assetPrefix?: string;
470
499
  stripPrefix?: string;
500
+ /** #305: viewer-only mode (`--view-only`); when there is no handoff, reports neutral view-only status instead of `MODELING_*`. */
501
+ viewOnly?: boolean;
471
502
  }
472
503
  /** #173: a density strip's scratch — one folder per package, holding at most the one strip on screen. */
473
504
  export const stripRoot = (stateDir: string, sourceHash: string) => join(stateDir, 'density-strip', sourceHash);
@@ -699,13 +730,15 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
699
730
  async function describe() {
700
731
  await options.unchanged();
701
732
  const handoff = p.handoff, gap = handoff ? handoffGap(handoff) : null;
733
+ const viewOnly = Boolean((options.viewOnly ?? p.viewOnly) && !handoff);
702
734
  const inputs = handoff && !gap ? await producerInputs(handoff, p.handoffReason) : null;
703
735
  const resolved = resolveProducer(options.starts);
704
736
  const parts = inputs ? contourParts(inputs.configText).map(({ name, regions }) => ({ name, regions })) : [];
705
737
  const contour = inputs ? Object.fromEntries(contourParts(inputs.configText).map(({ name, entry }) => [name, entry])) : {};
706
- const reason = !handoff ? (p.handoffReason ?? modelingHandoffMissing(null)) : gap ?? (!resolved.ok ? resolved.error : parts.length ? null : 'REBUILD_INPUTS_UNAVAILABLE: the config states no contour mesh');
738
+ const reason = !handoff ? (viewOnly ? VIEW_ONLY_HANDOFF_STATUS : (p.handoffReason ?? modelingHandoffMissing(null))) : gap ?? (!resolved.ok ? resolved.error : parts.length ? null : 'REBUILD_INPUTS_UNAVAILABLE: the config states no contour mesh');
707
739
  return {
708
740
  schema: 'rig-review-rebuild-status/1', available: !!inputs && resolved.ok && parts.length > 0,
741
+ ...(viewOnly ? { viewOnly: true } : {}),
709
742
  handoff: handoff ? handoff.record : null,
710
743
  inputs: inputs && handoff ? { config: handoff.record.config.path, parts: handoff.record.parts, rig: handoff.record.rig, configHash: inputs.configHash } : null,
711
744
  baseline: ensureBaseline(resolved),
@@ -729,19 +762,19 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
729
762
  cloth: inputs && handoff ? await clothStatus(handoff, inputs, resolved) : null,
730
763
  producer: resolved.ok ? tool(resolved.producer) : null, compiler: resolved.ok ? tool(resolved.compiler) : null,
731
764
  // #114: what the retarget editor offers — the pose producer, the declared sequences, the rig's bones and animations.
732
- retarget: await retargetStatus(inputs),
765
+ retarget: await retargetStatus(inputs, viewOnly),
733
766
  // #235: the handoff's motion.animations_from file (path, sha256, text) and the rig's easings table for the timeline editor.
734
- animations: await animationsStatus(inputs),
767
+ animations: await animationsStatus(inputs, viewOnly),
735
768
  reason,
736
769
  running,
737
770
  };
738
771
  }
739
772
  /** #235: what the keyed animation editor starts from. */
740
- async function animationsStatus(inputs: ProducerInputs | null): Promise<AnimationSourceStatus> {
773
+ async function animationsStatus(inputs: ProducerInputs | null, viewOnly = false): Promise<AnimationSourceStatus> {
741
774
  if (!inputs) {
742
775
  return {
743
776
  available: false,
744
- reason: p.handoff ? handoffGap(p.handoff) : (p.handoffReason ?? modelingHandoffMissing(null)),
777
+ reason: p.handoff ? handoffGap(p.handoff) : viewOnly ? VIEW_ONLY_HANDOFF_STATUS : (p.handoffReason ?? modelingHandoffMissing(null)),
745
778
  path: null,
746
779
  sha256: null,
747
780
  text: null,
@@ -1498,13 +1531,13 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
1498
1531
  return out;
1499
1532
  }
1500
1533
  /** `GET /api/rebuild`'s retarget section (#114): whether a retarget can run here and what the editor picks from. */
1501
- async function retargetStatus(inputs: ProducerInputs | null) {
1534
+ async function retargetStatus(inputs: ProducerInputs | null, viewOnly = false) {
1502
1535
  const resolved = resolvePose(options.starts), sequences = await retargetSequences();
1503
1536
  const read = async (name: string): Promise<Record<string, unknown>> => { if (!inputs) return {}; try { const v = JSON.parse(await readFile(join(inputs.rig, name), 'utf8')); return v && typeof v === 'object' && !Array.isArray(v) ? v : {}; } catch { return {}; } };
1504
1537
  const rig = await read('rig.json'), motion = await read('motion.json');
1505
1538
  const bones = (Array.isArray(rig.bones) ? rig.bones : []).map(b => (b && typeof b === 'object' ? (b as Record<string, unknown>).name : null)).filter((n): n is string => typeof n === 'string');
1506
1539
  const animations = motion.animations && typeof motion.animations === 'object' && !Array.isArray(motion.animations) ? Object.keys(motion.animations) : [];
1507
- const reason = !inputs ? (p.handoff ? handoffGap(p.handoff) : p.handoffReason ?? modelingHandoffMissing(null)) : !resolved.ok ? resolved.error : sequences.length ? null : 'RETARGET_SEQUENCE_UNAVAILABLE: the package declares no rig-pose-sequence/1 reference (a pose reference in review.json, or a *pose*.json in the opened folder)';
1540
+ const reason = !inputs ? (p.handoff ? handoffGap(p.handoff) : viewOnly ? VIEW_ONLY_HANDOFF_STATUS : p.handoffReason ?? modelingHandoffMissing(null)) : !resolved.ok ? resolved.error : sequences.length ? null : 'RETARGET_SEQUENCE_UNAVAILABLE: the package declares no rig-pose-sequence/1 reference (a pose reference in review.json, or a *pose*.json in the opened folder)';
1508
1541
  return { available: reason === null, reason, producer: resolved.ok ? tool(resolved.producer) : null, compiler: resolved.ok ? tool(resolved.compiler) : null, rig: p.handoff?.record.rig ?? null, sequences, bones, animations };
1509
1542
  }
1510
1543
 
package/src/server.ts CHANGED
@@ -30,11 +30,11 @@ async function bodyJson(req:Request,limit=1024*1024,what='Session payload exceed
30
30
  }
31
31
  /** `capability` (open workers and foreground CLI serving) gates every non-GET request; tests may omit it.
32
32
  * `cwd` is where the producer is looked for after the package's own directories (review's working directory by default). */
33
- export async function startServer(p:ReviewPackage,options:{port?:number;stateDir?:string;open?:OpenIdentity;initialAnimation?:string;activity?:()=>void;control?:ControlIdentity;capability?:string;cwd?:string;stripConcurrency?:number;graceMs?:number;unopenedTimeoutMs?:number;exitOnClose?:boolean;onClose?:(info:LiveExitInfo)=>void|Promise<void>;log?:(line:string)=>void}={}){
33
+ export async function startServer(p:ReviewPackage,options:{port?:number;stateDir?:string;open?:OpenIdentity;initialAnimation?:string;activity?:()=>void;control?:ControlIdentity;capability?:string;cwd?:string;stripConcurrency?:number;graceMs?:number;unopenedTimeoutMs?:number;exitOnClose?:boolean;onClose?:(info:LiveExitInfo)=>void|Promise<void>;log?:(line:string)=>void;viewOnly?:boolean}={}){
34
34
  const bundle=await buildWeb();
35
35
  const unchanged=()=>assertReviewUnchanged(p);
36
36
  const stateDir=options.stateDir??process.env.RIG_REVIEW_STATE_DIR??join(homedir(),'.local','state','rig-c-review'),starts=[p.root,options.cwd??process.cwd()];
37
- const rebuilds=createRebuilds(p,{stateDir,starts,unchanged,bones:p.feedbackCatalog.bones,...(options.stripConcurrency?{stripConcurrency:options.stripConcurrency}:{})});
37
+ const rebuilds=createRebuilds(p,{stateDir,starts,unchanged,bones:p.feedbackCatalog.bones,...(options.stripConcurrency?{stripConcurrency:options.stripConcurrency}:{}),...(options.viewOnly??p.viewOnly?{viewOnly:true}:{})});
38
38
  // Readings (#108): rigc render's readings on the inspected build and on the latest scratch build, into scratch.
39
39
  const readings=createReadings(p,{stateDir,starts,unchanged,latest:rebuilds.latest});
40
40
  // Bones check (#109): propose --from-config and compare on a scratch copy of the patched handoff config.
@@ -20,6 +20,24 @@ interface OpenRig {id:StripSide;assets:ModelAssets;player:RigPlayer;renderer:Can
20
20
  function fail(code:string,text:string):never {throw new Error(`${code}: ${text}`);}
21
21
  let hostQueue=Promise.resolve();
22
22
 
23
+ // @napi-rs/canvas does not resolve CSS generic families: `monospace`, `sans-serif`
24
+ // or any unknown name silently becomes the first family in the machine's font
25
+ // collection — Noto Color Emoji on one CI image, which drew grey glyphs and
26
+ // wrapped the footer differently (#319). So the strip names concrete families,
27
+ // one list per role, covering the common desktop and CI installs: DejaVu
28
+ // (Debian/Ubuntu, pulled in by fontconfig), Liberation (Fedora/RHEL), then the
29
+ // macOS and Windows system fonts. If no family of a list is installed the strip
30
+ // refuses by name rather than draw in a font nobody chose.
31
+ export const STRIP_MONO_FAMILIES=['DejaVu Sans Mono','Liberation Mono','Menlo','Consolas'] as const;
32
+ export const STRIP_SANS_FAMILIES=['DejaVu Sans','Liberation Sans','Helvetica','Arial'] as const;
33
+ const cssFamilies=(families:readonly string[])=>families.map(family=>`"${family}"`).join(', ');
34
+ export const STRIP_MONO_FONT=`12px ${cssFamilies(STRIP_MONO_FAMILIES)}`;
35
+ export const STRIP_SANS_FONT=`14px ${cssFamilies(STRIP_SANS_FAMILIES)}`;
36
+ function requireStripFonts(native:NativeCanvas):void {
37
+ const missing=([['mono',STRIP_MONO_FAMILIES],['sans',STRIP_SANS_FAMILIES]] as const).filter(([,families])=>!families.some(family=>native.GlobalFonts.has(family))).map(([role])=>role);
38
+ if(missing.length)fail('STRIP_FONT',`no listed ${missing.join(' or ')} family is installed; mono needs one of ${cssFamilies(STRIP_MONO_FAMILIES)}, sans one of ${cssFamilies(STRIP_SANS_FAMILIES)}; the strip never draws in an unlisted fallback`);
39
+ }
40
+
23
41
  function command(binary:string,args:string[],kind:string):Promise<Buffer>{
24
42
  return new Promise((resolveCommand,reject)=>{
25
43
  execFile(binary,args,{encoding:'buffer',timeout:60000,maxBuffer:32*1024*1024,windowsHide:true},(error,stdout,stderr)=>{
@@ -78,6 +96,44 @@ async function openRig(input:StripRenderInput['rigs'][number],images:Map<string,
78
96
  return {id:input.id,assets,player,renderer,clock:input.clock};
79
97
  }catch(error){assets.dispose();throw error;}
80
98
  }
99
+ /** Verify that a package's compiled model and its page images load and pose in headless `@rig-c/play` (#305). */
100
+ export async function verifyCompiledModel(root:string,modelRelPath:string|undefined,animation?:string):Promise<void>{
101
+ if(!modelRelPath)throw new Error('package has no compiled model (manifest.model is absent)');
102
+ const previous=hostQueue;let release=()=>{};hostQueue=new Promise<void>(done=>{release=done;});await previous;
103
+ let restore=()=>{};
104
+ try{
105
+ let native:NativeCanvas;
106
+ try{native=await import('@napi-rs/canvas');}catch(error){throw new Error(`@napi-rs/canvas unavailable: ${error instanceof Error?error.message:String(error)}`);}
107
+ const images=new Map<string,Buffer>();restore=installHost(native,images);
108
+ const model=await safeFile(root,packagePath(modelRelPath));
109
+ if(!model.endsWith('.model.json'))throw new Error('compiled .model.json required');
110
+ const bytes=await readFile(model),metadata=JSON.parse(bytes.toString('utf8')) as {pages?:{name:string}[]};
111
+ if(!Array.isArray(metadata.pages))throw new Error('declared model pages required');
112
+ const urls=new Map<string,string>();
113
+ for(const [index,page] of metadata.pages.entries()){
114
+ if(typeof page.name!=='string'||/[\\%?#:\x00-\x1f]/.test(page.name))throw new Error('literal relative page path required');
115
+ const name=packagePath(relative(root,resolve(dirname(model),page.name)).split('\\').join('/'));
116
+ const path=await safeFile(root,name),url=`https://strip.invalid/open/page-${index}/${encodeURIComponent(page.name)}`;
117
+ urls.set(page.name,url);images.set(url,await readFile(path));
118
+ }
119
+ const modelUrl=`https://strip.invalid/open/${encodeURIComponent(modelRelPath)}`;
120
+ const fileFetch=new Proxy(fetch,{apply:(_target,_this,args:Parameters<typeof fetch>)=>{
121
+ if(String(args[0])!==modelUrl)return Promise.reject(new Error('undeclared model URL'));
122
+ return Promise.resolve(new Response(new Uint8Array(bytes)));
123
+ }});
124
+ const assets=await loadModel({modelUrl,fetch:fileFetch,setsUrl:null,regions:'none',resolvePage:name=>{const url=urls.get(name);if(!url)throw new Error(`undeclared page ${name}`);return url;}});
125
+ try{
126
+ const clip=animation??assets.animations[0]?.name;
127
+ if(clip!==undefined&&!assets.animations.some(a=>a.name===clip))throw new Error(`missing animation ${JSON.stringify(clip)}`);
128
+ const host={style:{clipPath:''},appendChild(node:unknown){return node;}} as unknown as HTMLElement;
129
+ const player=new RigPlayer(host,assets,{mode:'canvas',seekStep:compareSeekStep});
130
+ const renderer=player.renderer;if(!(renderer instanceof CanvasRenderer))throw new Error('published canvas renderer required');
131
+ renderer.backend='canvas2d';renderer.pixelRatio=1;player.environment(null);
132
+ if(clip!==undefined){player.play(clip,{loop:false});player.pause();}
133
+ player.posedFrame();
134
+ }finally{assets.dispose();}
135
+ }finally{try{restore();}finally{release();}}
136
+ }
81
137
  function seek(rigs:OpenRig[],time:number):void {
82
138
  for(const rig of rigs){
83
139
  rig.player.seek(time);
@@ -107,6 +163,7 @@ export async function renderStrip(input:StripRenderInput,tools:StripTools={}):Pr
107
163
  try {
108
164
  let native:NativeCanvas;
109
165
  try{native=await import('@napi-rs/canvas');}catch(error){fail('STRIP_CANVAS',`@napi-rs/canvas unavailable: ${error instanceof Error?error.message:String(error)}`);}
166
+ requireStripFonts(native);
110
167
  const images=new Map<string,Buffer>();restore=installHost(native,images);
111
168
  const ffmpeg=tools.ffmpeg??process.env.RIG_REVIEW_FFMPEG??'ffmpeg',ffprobe=tools.ffprobe??process.env.RIG_REVIEW_FFPROBE??'ffprobe';
112
169
  const video=await probeReference(input.referencePath,ffprobe);
@@ -129,13 +186,13 @@ export async function renderStrip(input:StripRenderInput,tools:StripTools={}):Pr
129
186
  const renderer={name:'@rig-c/play',version:versions.runtimeVersion,backend:`canvas2d / @napi-rs/canvas ${packageJson.version}`};
130
187
  // The plan reserves a maximum footer budget. Measure the complete wrapped
131
188
  // provenance with the drawing font before allocating the final raster.
132
- const measure=native.createCanvas(1,1).getContext('2d');measure.font='12px monospace';
189
+ const measure=native.createCanvas(1,1).getContext('2d');measure.font=STRIP_MONO_FONT;
133
190
  const lines=wrapped(measure,footer(plan,renderer),width-20),footerHeight=lines.length*16+16;
134
191
  if(footerHeight>layout.footerHeight)fail('STRIP_LAYOUT_FOOTER',`need ${footerHeight}px for complete provenance, have ${layout.footerHeight}`);
135
192
  const groupHeight=layout.labelHeight*2+plan.rows.length*layout.cellHeight+layout.groupGap,height=plan.groups.length*groupHeight+footerHeight;
136
193
  if(!Number.isSafeInteger(width)||!Number.isSafeInteger(height)||width<=0||height<=0||width>16384||height>16384||width*height>64000000)fail('STRIP_LAYOUT','invalid or excessive canvas size');
137
194
  for(const rig of rigs){rig.renderer.viewport={x,y,width:worldWidth,height:worldHeight};rig.renderer.pixelRatio=Math.min(layout.cellWidth/worldWidth,layout.cellHeight/worldHeight);}
138
- const out=native.createCanvas(width,height),ctx=out.getContext('2d');ctx.fillStyle='#f1f1f1';ctx.fillRect(0,0,width,height);ctx.font='14px sans-serif';ctx.textBaseline='top';
195
+ const out=native.createCanvas(width,height),ctx=out.getContext('2d');ctx.fillStyle='#f1f1f1';ctx.fillRect(0,0,width,height);ctx.font=STRIP_SANS_FONT;ctx.textBaseline='top';
139
196
  const samples:StripRenderSample[]=[];const decoded=new Map<number,Image>();
140
197
  for(const [groupIndex,group] of plan.groups.entries()){
141
198
  const top=groupIndex*groupHeight;ctx.fillStyle='#202b24';ctx.fillText(`${group.id} | ${group.basis} F${group.frameStart}–${group.frameEnd}`,8,top+8);
@@ -164,7 +221,7 @@ export async function renderStrip(input:StripRenderInput,tools:StripTools={}):Pr
164
221
  samples.push(record);
165
222
  }
166
223
  }
167
- ctx.font='12px monospace';
224
+ ctx.font=STRIP_MONO_FONT;
168
225
  ctx.fillStyle='#172a22';lines.forEach((line,index)=>ctx.fillText(line,10,height-footerHeight+8+index*16));
169
226
  return {png:await out.encode('png'),width,height,renderer,samples};
170
227
  } finally {try{for(const rig of rigs){try{rig.player.dispose();}finally{rig.assets.dispose();}}}finally{try{restore();}finally{release();}}}
@@ -24,10 +24,12 @@ export function cameraFromSignature(value:CameraSignature,frame:CameraFrame):Pan
24
24
  const camera={zoom:value.zoom,center:{x:frame.center.x-value.pan.x*frame.width/scale,y:frame.center.y+(frame.space==='world'?1:-1)*value.pan.y*frame.height/scale}};
25
25
  assertCameraView(camera,frame);return camera;
26
26
  }
27
- /** Zoom preserves the normalized location already being inspected. */
28
- export function zoomSignature(value:CameraSignature,factor:number):CameraSignature {
27
+ /** Zoom preserves the point under the cursor when frame and point are given, or the viewport center otherwise. */
28
+ export function zoomSignature(value:CameraSignature,factor:number,frame?:Pick<CameraFrame,'width'|'height'>|null,point?:CameraPoint|null):CameraSignature {
29
29
  const zoom=clampZoom(value.zoom*factor),ratio=zoom/value.zoom;
30
- return {zoom,pan:{x:value.pan.x*ratio,y:value.pan.y*ratio}};
30
+ const ox=frame&&point&&frame.width>0&&Number.isFinite(point.x)?(point.x-frame.width/2)/frame.width*(ratio-1):0;
31
+ const oy=frame&&point&&frame.height>0&&Number.isFinite(point.y)?(point.y-frame.height/2)/frame.height*(ratio-1):0;
32
+ return {zoom,pan:{x:value.pan.x*ratio-ox,y:value.pan.y*ratio-oy}};
31
33
  }
32
34
  export function dragSignature(value:CameraSignature,frame:CameraFrame,dx:number,dy:number):CameraSignature {
33
35
  return {zoom:value.zoom,pan:{x:value.pan.x+dx/frame.width,y:value.pan.y+dy/frame.height}};
package/web/catalog-en.ts CHANGED
@@ -375,6 +375,13 @@ export const enCatalog: Readonly<Record<string, string>> = {
375
375
  "CHEST REGIONS · DETAIL": "CHEST REGIONS · DETAIL",
376
376
  "CHEST_REGION_MAPPING_UNAVAILABLE: no compiled model drawn": "CHEST_REGION_MAPPING_UNAVAILABLE: no compiled model drawn",
377
377
  "CHEST_REGION_MAPPING_UNAVAILABLE: {0}": "CHEST_REGION_MAPPING_UNAVAILABLE: {0}",
378
+ "CHEST_REGION_NOT_ELLIPSE: {0} (polygon, {1} points, below the {2} a fit needs)": "CHEST_REGION_NOT_ELLIPSE: {0} (polygon, {1} points, below the {2} a fit needs)",
379
+ "CHEST_REGION_NOT_ELLIPSE: {0} (polygon, {1} points, max off-ellipse {2} px)": "CHEST_REGION_NOT_ELLIPSE: {0} (polygon, {1} points, max off-ellipse {2} px)",
380
+ "CHEST_REGION_NOT_ELLIPSE: {0} (polygon, {1} points, no ellipse fits)": "CHEST_REGION_NOT_ELLIPSE: {0} (polygon, {1} points, no ellipse fits)",
381
+ "CHEST_REGION_NOT_KEPT: {0} (not an object; Apply would drop it)": "CHEST_REGION_NOT_KEPT: {0} (not an object; Apply would drop it)",
382
+ "CHEST_REGION_NOT_KEPT: {0} (polygon without points)": "CHEST_REGION_NOT_KEPT: {0} (polygon without points)",
383
+ "CHEST_REGION_NOT_KEPT: {0} (shape {1}; Apply sends back circle and polygon regions only)": "CHEST_REGION_NOT_KEPT: {0} (shape {1}; Apply sends back circle and polygon regions only)",
384
+ "CHEST_REGION_NOT_KEPT: {0} ({1} with keys {2}; Apply sends back {3} only)": "CHEST_REGION_NOT_KEPT: {0} ({1} with keys {2}; Apply sends back {3} only)",
378
385
  "CLOTH · RECIPE PER TAG · APPLY RUNS RIG-PARTS PROPOSE --CLOTH": "CLOTH · RECIPE PER TAG · APPLY RUNS RIG-PARTS PROPOSE --CLOTH",
379
386
  "CLOTH_FIELD_INVALID {0}: {1}": "CLOTH_FIELD_INVALID {0}: {1}",
380
387
  "CLOTH_FIELD_UNKNOWN: {0}": "CLOTH_FIELD_UNKNOWN: {0}",
@@ -1206,6 +1213,7 @@ export const enCatalog: Readonly<Record<string, string>> = {
1206
1213
  "REBUILD_INPUTS_UNAVAILABLE: the config states no contour mesh": "REBUILD_INPUTS_UNAVAILABLE: the config states no contour mesh",
1207
1214
  "REBUILD_PART_AMBIGUOUS: the config states {0} contour meshes and the designated bones name none of them alone": "REBUILD_PART_AMBIGUOUS: the config states {0} contour meshes and the designated bones name none of them alone",
1208
1215
  "REBUILD_PART_AMBIGUOUS: the config states {0} contour meshes and the landmark bones name none of them alone": "REBUILD_PART_AMBIGUOUS: the config states {0} contour meshes and the landmark bones name none of them alone",
1216
+ "REBUILD_REGION_DUPLICATE: {0} (two regions of the chest part carry this name)": "REBUILD_REGION_DUPLICATE: {0} (two regions of the chest part carry this name)",
1209
1217
  "REBUILD_REGION_INCOMPLETE: no region has a centre": "REBUILD_REGION_INCOMPLETE: no region has a centre",
1210
1218
  "REBUILD_REGION_INCOMPLETE: {0} bone": "REBUILD_REGION_INCOMPLETE: {0} bone",
1211
1219
  "REBUILD_REGION_INCOMPLETE: {0} name": "REBUILD_REGION_INCOMPLETE: {0} name",
@@ -1431,6 +1439,7 @@ export const enCatalog: Readonly<Record<string, string>> = {
1431
1439
  "Saved inspection axis is unavailable or outside its range": "Saved inspection axis is unavailable or outside its range",
1432
1440
  "Saved inspection time is outside the selected clip/reference": "Saved inspection time is outside the selected clip/reference",
1433
1441
  "Saved local draft conflicts with the current submitted review. Server status is unchanged; download it or explicitly recover as pending.": "Saved local draft conflicts with the current submitted review. Server status is unchanged; download it or explicitly recover as pending.",
1442
+ "Saved local draft conflicts with the current submitted review. Server status is unchanged; download or discard it.": "Saved local draft conflicts with the current submitted review. Server status is unchanged; download or discard it.",
1434
1443
  "Saved local draft was not restored: {0}. It remains in storage for recovery.": "Saved local draft was not restored: {0}. It remains in storage for recovery.",
1435
1444
  "Saved panel selection unavailable: {0}": "Saved panel selection unavailable: {0}",
1436
1445
  "Saved part preset is absent": "Saved part preset is absent",
@@ -2547,6 +2556,7 @@ export const enCatalog: Readonly<Record<string, string>> = {
2547
2556
  "{0} ({1} links){2}": "{0} ({1} links){2}",
2548
2557
  "{0} ({1} s)": "{0} ({1} s)",
2549
2558
  "{0} ({1},{2}) r:{3} b:{4}": "{0} ({1},{2}) r:{3} b:{4}",
2559
+ "{0} ({1},{2}) r:{3}×{4} b:{5}": "{0} ({1},{2}) r:{3}×{4} b:{5}",
2550
2560
  "{0} / {1} / {2} · {3} vertices · {4} triangles · hull {5} · {6}": "{0} / {1} / {2} · {3} vertices · {4} triangles · hull {5} · {6}",
2551
2561
  "{0} / {1} / {2}{3} · {4} vertices · {5} · setup pose{6}": "{0} / {1} / {2}{3} · {4} vertices · {5} · setup pose{6}",
2552
2562
  "{0} / {1} is a linked mesh of {2} / {3}; edit its source mesh": "{0} / {1} is a linked mesh of {2} / {3}; edit its source mesh",
@@ -3002,4 +3012,18 @@ export const enCatalog: Readonly<Record<string, string>> = {
3002
3012
  "back": "back",
3003
3013
  "@rig-c/pose is not installed beside the package or beside review, and review does not install it — bun add -d @rig-c/pose": "@rig-c/pose is not installed beside the package or beside review, and review does not install it — bun add -d @rig-c/pose",
3004
3014
  "CHEST_REGION_VALUE_INVALID contour tolerance": "CHEST_REGION_VALUE_INVALID contour tolerance",
3015
+ "● R · character's right (image left)": "● R · character's right (image left)",
3016
+ "● L · character's left (image right)": "● L · character's left (image right)",
3017
+ "R · character's right (image left)": "R · character's right (image left)",
3018
+ "L · character's left (image right)": "L · character's left (image right)",
3019
+ "Right apex (character's right, image left)": "Right apex (character's right, image left)",
3020
+ "Left apex (character's left, image right)": "Left apex (character's left, image right)",
3021
+ "Left apex (character's left, image right), Cleavage": "Left apex (character's left, image right), Cleavage",
3022
+ "Right apex (character's right, image left), Cleavage": "Right apex (character's right, image left), Cleavage",
3023
+ "Right apex (character's right, image left), Left apex (character's left, image right)": "Right apex (character's right, image left), Left apex (character's left, image right)",
3024
+ "Click the part to place the right apex (character's right, image left); drag its marker to move it": "Click the part to place the right apex (character's right, image left); drag its marker to move it",
3025
+ "Click the part to place the left apex (character's left, image right); drag its marker to move it": "Click the part to place the left apex (character's left, image right); drag its marker to move it",
3026
+ "Copy R's y, core radius and band to L (leaves L's x as is)": "Copy R's y, core radius and band to L (leaves L's x as is)",
3027
+ "Y·size symmetry": "Y·size symmetry",
3028
+ "view only, no producer handoff": "view only, no producer handoff",
3005
3029
  };
package/web/catalog-ko.ts CHANGED
@@ -375,6 +375,13 @@ export const koCatalog: Readonly<Record<string, string>> = {
375
375
  "CHEST REGIONS · DETAIL": "가슴 영역 · 상세",
376
376
  "CHEST_REGION_MAPPING_UNAVAILABLE: no compiled model drawn": "CHEST_REGION_MAPPING_UNAVAILABLE: 그려진 컴파일 모델이 없습니다",
377
377
  "CHEST_REGION_MAPPING_UNAVAILABLE: {0}": "CHEST_REGION_MAPPING_UNAVAILABLE: {0}",
378
+ "CHEST_REGION_NOT_ELLIPSE: {0} (polygon, {1} points, below the {2} a fit needs)": "CHEST_REGION_NOT_ELLIPSE: {0} (다각형, 점 {1}개, 맞춤에 필요한 {2}개 미만)",
379
+ "CHEST_REGION_NOT_ELLIPSE: {0} (polygon, {1} points, max off-ellipse {2} px)": "CHEST_REGION_NOT_ELLIPSE: {0} (다각형, 점 {1}개, 타원에서 최대 {2}px 벗어남)",
380
+ "CHEST_REGION_NOT_ELLIPSE: {0} (polygon, {1} points, no ellipse fits)": "CHEST_REGION_NOT_ELLIPSE: {0} (다각형, 점 {1}개, 맞는 타원 없음)",
381
+ "CHEST_REGION_NOT_KEPT: {0} (not an object; Apply would drop it)": "CHEST_REGION_NOT_KEPT: {0} (객체가 아님 — Apply하면 사라짐)",
382
+ "CHEST_REGION_NOT_KEPT: {0} (polygon without points)": "CHEST_REGION_NOT_KEPT: {0} (점이 없는 다각형)",
383
+ "CHEST_REGION_NOT_KEPT: {0} (shape {1}; Apply sends back circle and polygon regions only)": "CHEST_REGION_NOT_KEPT: {0} (모양 {1} — Apply는 원과 다각형 영역만 그대로 돌려보냄)",
384
+ "CHEST_REGION_NOT_KEPT: {0} ({1} with keys {2}; Apply sends back {3} only)": "CHEST_REGION_NOT_KEPT: {0} (키가 {2}인 {1} — Apply는 {3}만 그대로 돌려보냄)",
378
385
  "CLOTH · RECIPE PER TAG · APPLY RUNS RIG-PARTS PROPOSE --CLOTH": "클로스 · 태그별 레시피 · 적용 시 RIG-PARTS PROPOSE --CLOTH 실행",
379
386
  "CLOTH_FIELD_INVALID {0}: {1}": "CLOTH_FIELD_INVALID {0}: {1}",
380
387
  "CLOTH_FIELD_UNKNOWN: {0}": "CLOTH_FIELD_UNKNOWN: {0}",
@@ -1206,6 +1213,7 @@ export const koCatalog: Readonly<Record<string, string>> = {
1206
1213
  "REBUILD_INPUTS_UNAVAILABLE: the config states no contour mesh": "REBUILD_INPUTS_UNAVAILABLE: 설정에 선언된 윤곽 메시가 없습니다",
1207
1214
  "REBUILD_PART_AMBIGUOUS: the config states {0} contour meshes and the designated bones name none of them alone": "REBUILD_PART_AMBIGUOUS: 설정에 윤곽 메시 {0}개가 선언되어 있으며 지정된 본들이 어느 하나를 단독으로 가리키지 않습니다",
1208
1215
  "REBUILD_PART_AMBIGUOUS: the config states {0} contour meshes and the landmark bones name none of them alone": "REBUILD_PART_AMBIGUOUS: 설정에 윤곽 메시 {0}개가 선언되어 있으며 랜드마크 본들이 어느 하나를 단독으로 가리키지 않습니다",
1216
+ "REBUILD_REGION_DUPLICATE: {0} (two regions of the chest part carry this name)": "REBUILD_REGION_DUPLICATE: {0} (가슴 파트의 영역 둘이 이 이름을 씀)",
1209
1217
  "REBUILD_REGION_INCOMPLETE: no region has a centre": "REBUILD_REGION_INCOMPLETE: 중심이 지정된 영역이 없습니다",
1210
1218
  "REBUILD_REGION_INCOMPLETE: {0} bone": "REBUILD_REGION_INCOMPLETE: {0} 본",
1211
1219
  "REBUILD_REGION_INCOMPLETE: {0} name": "REBUILD_REGION_INCOMPLETE: {0} 이름",
@@ -1431,6 +1439,7 @@ export const koCatalog: Readonly<Record<string, string>> = {
1431
1439
  "Saved inspection axis is unavailable or outside its range": "저장된 점검 축을 사용할 수 없거나 범위를 벗어났습니다",
1432
1440
  "Saved inspection time is outside the selected clip/reference": "저장된 점검 시간이 선택된 클립/레퍼런스 범위를 벗어났습니다",
1433
1441
  "Saved local draft conflicts with the current submitted review. Server status is unchanged; download it or explicitly recover as pending.": "저장된 로컬 초안이 현재 제출된 리뷰와 충돌합니다. 서버 상태는 변경되지 않았으며 다운로드하거나 보류 상태로 명시적 복구하세요.",
1442
+ "Saved local draft conflicts with the current submitted review. Server status is unchanged; download or discard it.": "저장된 로컬 초안이 현재 제출된 리뷰와 충돌합니다. 서버 상태는 변경되지 않았으며 다운로드하거나 폐기하세요.",
1434
1443
  "Saved local draft was not restored: {0}. It remains in storage for recovery.": "저장된 로컬 초안이 복원되지 않았습니다: {0}. 복구를 위해 저장소에 유지됩니다.",
1435
1444
  "Saved panel selection unavailable: {0}": "저장된 패널 선택을 사용할 수 없음: {0}",
1436
1445
  "Saved part preset is absent": "저장된 파츠 프리셋이 없습니다",
@@ -2547,6 +2556,7 @@ export const koCatalog: Readonly<Record<string, string>> = {
2547
2556
  "{0} ({1} links){2}": "{0} (링크 {1}개){2}",
2548
2557
  "{0} ({1} s)": "{0} ({1}초)",
2549
2558
  "{0} ({1},{2}) r:{3} b:{4}": "{0} ({1},{2}) r:{3} b:{4}",
2559
+ "{0} ({1},{2}) r:{3}×{4} b:{5}": "{0} ({1},{2}) r:{3}×{4} b:{5}",
2550
2560
  "{0} / {1} / {2} · {3} vertices · {4} triangles · hull {5} · {6}": "{0} / {1} / {2} · 정점 {3}개 · 삼각형 {4}개 · 헐 {5} · {6}",
2551
2561
  "{0} / {1} / {2}{3} · {4} vertices · {5} · setup pose{6}": "{0} / {1} / {2}{3} · 정점 {4}개 · {5} · 셋업 포즈{6}",
2552
2562
  "{0} / {1} is a linked mesh of {2} / {3}; edit its source mesh": "{0} / {1}은(는) {2} / {3}의 연결된 메시입니다. 원본 메시를 편집하세요",
@@ -3002,4 +3012,18 @@ export const koCatalog: Readonly<Record<string, string>> = {
3002
3012
  "back": "뒤",
3003
3013
  "@rig-c/pose is not installed beside the package or beside review, and review does not install it — bun add -d @rig-c/pose": "패키지 또는 리뷰 옆에 @rig-c/pose가 설치되어 있지 않으며 리뷰가 직접 설치하지 않습니다 — bun add -d @rig-c/pose",
3004
3014
  "CHEST_REGION_VALUE_INVALID contour tolerance": "CHEST_REGION_VALUE_INVALID: 윤곽 허용 오차(contour tolerance)",
3015
+ "● R · character's right (image left)": "● R · 캐릭터 오른쪽(화면 왼쪽)",
3016
+ "● L · character's left (image right)": "● L · 캐릭터 왼쪽(화면 오른쪽)",
3017
+ "R · character's right (image left)": "R · 캐릭터 오른쪽(화면 왼쪽)",
3018
+ "L · character's left (image right)": "L · 캐릭터 왼쪽(화면 오른쪽)",
3019
+ "Right apex (character's right, image left)": "오른쪽 정점(캐릭터 기준, 화면 왼쪽)",
3020
+ "Left apex (character's left, image right)": "왼쪽 정점(캐릭터 기준, 화면 오른쪽)",
3021
+ "Left apex (character's left, image right), Cleavage": "왼쪽 정점(캐릭터 기준, 화면 오른쪽), 골(Cleavage)",
3022
+ "Right apex (character's right, image left), Cleavage": "오른쪽 정점(캐릭터 기준, 화면 왼쪽), 골(Cleavage)",
3023
+ "Right apex (character's right, image left), Left apex (character's left, image right)": "오른쪽 정점(캐릭터 기준, 화면 왼쪽), 왼쪽 정점(캐릭터 기준, 화면 오른쪽)",
3024
+ "Click the part to place the right apex (character's right, image left); drag its marker to move it": "파츠를 클릭해 오른쪽 정점(캐릭터 기준, 화면 왼쪽)을 배치하고, 마커를 드래그해 이동합니다",
3025
+ "Click the part to place the left apex (character's left, image right); drag its marker to move it": "파츠를 클릭해 왼쪽 정점(캐릭터 기준, 화면 오른쪽)을 배치하고, 마커를 드래그해 이동합니다",
3026
+ "Copy R's y, core radius and band to L (leaves L's x as is)": "R의 y, 중심 반경(r), 밴드를 L에 복사합니다(L의 x는 유지)",
3027
+ "Y·size symmetry": "Y·크기 대칭",
3028
+ "view only, no producer handoff": "뷰 전용, 프로듀서 핸드오프 없음",
3005
3029
  };