@rig-c/review 1.10.2 → 1.12.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/docs/PARTS_VIEW.md +5 -0
- package/docs/REVIEW_PACKAGE.md +53 -2
- package/docs/WORKFLOWS.md +63 -0
- package/package.json +1 -1
- package/src/cli.ts +47 -10
- package/src/correction-handoff.ts +186 -0
- package/src/direction-inspection.ts +65 -0
- package/src/feedback-export.ts +14 -0
- package/src/handoff.ts +12 -2
- package/src/interview-picks.ts +89 -0
- package/src/interview-project.ts +260 -0
- package/src/interview-routes.ts +96 -0
- package/src/interview-server.ts +55 -0
- package/src/manifest.ts +16 -4
- package/src/open.ts +1 -1
- package/src/parts-view.ts +9 -0
- package/src/rebuild.ts +114 -21
- package/src/server.ts +19 -3
- package/src/session.ts +4 -2
- package/src/strip-render.ts +5 -2
- package/web/catalog-en.ts +70 -2
- package/web/catalog-ko.ts +70 -2
- package/web/direction-panel.ts +88 -0
- package/web/index.html +1 -1
- package/web/interview-panel.ts +180 -0
- package/web/interview.css +26 -0
- package/web/interview.html +17 -0
- package/web/interview.ts +27 -0
- package/web/main.ts +106 -13
- package/web/parts.html +1 -1
- package/web/parts.ts +2 -1
- package/web/stage-nav.ts +14 -7
- package/web/styles.css +3 -0
package/src/rebuild.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
|
17
17
|
import { object, packagePath, safeFile, type ReviewPackage } from './manifest.ts';
|
|
18
18
|
import { compileArgs, firstRefusal, modelingProducerTooOld, REMESH_DELTA_SINCE, remeshArgs, remeshDeltaArgs, resolvePose, resolveProducer, runTool, versionAtLeast, type CompileRequest, type InstalledTool, type ProcessResult } from './producer.ts';
|
|
19
19
|
import { meshEditText } from './mesh-edit.ts';
|
|
20
|
-
import { CONFIG_NAMED_FILES, HANDOFF_DECLARATION, type Handoff, type HandoffRecord } from './handoff.ts';
|
|
20
|
+
import { CONFIG_NAMED_FILES, CONFIG_SKELETON_NAMES, HANDOFF_DECLARATION, type Handoff, type HandoffRecord } from './handoff.ts';
|
|
21
21
|
import { assertWholeRigBaseline, BaselineError, baselineKey, producerDiff, runBaseline, runInspectedCheck, runningInspectedCheck, type BaselineResult, type InspectedCheck } from './baseline.ts';
|
|
22
22
|
import { applyConfigPatch, assertOpNames, assertPatchFresh, ConfigPatchError, parseConfigPatch, PATCH_FLAGS, patchSha256, patchText, remeshPart, type ConfigPatch, type JsonValue } from './config-patch.ts';
|
|
23
23
|
import { checkSummary, filesDiffText, MAX_ANIMATION_OPS, MAX_RETARGET_LINES, type CheckSummary, type FilesDiff } from './applied-context.ts';
|
|
@@ -42,7 +42,7 @@ import { assertStateOutside as assertStateDirOutside } from './state-dir.ts';
|
|
|
42
42
|
export const REBUILD_SCHEMA = 'rig-review-rebuild/1';
|
|
43
43
|
const MAX_REGIONS = CHEST_REGIONS_MAX, MAX_POINTS = 256, MAX_LINES = 4000, GRID = 256;
|
|
44
44
|
|
|
45
|
-
export interface ProducerInputs { config: string; parts: string; rig: string; configText: string; configHash: string; handoff: HandoffRecord }
|
|
45
|
+
export interface ProducerInputs { config: string; parts: string; rig: string; configText: string; configHash: string; handoff: HandoffRecord; requirements?: { source: string; sha256: string } }
|
|
46
46
|
const sha256 = (bytes: string | Uint8Array) => createHash('sha256').update(bytes).digest('hex');
|
|
47
47
|
|
|
48
48
|
/** Without any handoff, Apply refuses by this name and says which flag declares one. */
|
|
@@ -52,7 +52,7 @@ export const VIEW_ONLY_HANDOFF_STATUS = 'view only, no producer handoff';
|
|
|
52
52
|
/** What remesh needs from the handoff, or the line naming what is missing. */
|
|
53
53
|
export function handoffGap(handoff: Handoff): string | null {
|
|
54
54
|
if (!handoff.parts) return `MODELING_INPUT_UNAVAILABLE: ${handoff.record.missing.join(', ')}`;
|
|
55
|
-
const missing = handoff.record.missing.filter(m => m.startsWith('parts.json') || m.startsWith('rig '));
|
|
55
|
+
const missing = handoff.record.missing.filter(m => m.startsWith('parts.json') || m.startsWith('rig ') || m.startsWith('requirements '));
|
|
56
56
|
return handoff.rig && !missing.length ? null : `MODELING_INPUT_UNAVAILABLE: ${missing.join(', ') || 'rig'}`;
|
|
57
57
|
}
|
|
58
58
|
/** The handoff's config, parts and inspected rig, the config read and checked against the bytes the session is bound to. */
|
|
@@ -62,7 +62,24 @@ export async function producerInputs(handoff: Handoff | null, reason: string | n
|
|
|
62
62
|
if (gap) throw new RebuildError('MODELING_INPUT_UNAVAILABLE', gap.slice('MODELING_INPUT_UNAVAILABLE: '.length));
|
|
63
63
|
const configText = await readFile(handoff.config, 'utf8'), configHash = sha256(configText);
|
|
64
64
|
if (configHash !== handoff.record.config.sha256) throw new RebuildError('REBUILD_INPUTS_CHANGED', `${handoff.record.config.path} changed since the review was opened; restart review`);
|
|
65
|
-
|
|
65
|
+
let config: unknown;
|
|
66
|
+
try { config = JSON.parse(configText); } catch { /* the producer diagnoses invalid JSON */ }
|
|
67
|
+
const value = namedFile(config, ['requirements']);
|
|
68
|
+
let requirements: ProducerInputs['requirements'];
|
|
69
|
+
if (typeof value === 'string' && value) {
|
|
70
|
+
const lexical = resolve(dirname(handoff.config), value);
|
|
71
|
+
const path = relative(handoff.root, lexical).split(sep).join('/');
|
|
72
|
+
let source: string;
|
|
73
|
+
try {
|
|
74
|
+
source = await safeFile(handoff.root, path);
|
|
75
|
+
if(source!==lexical)throw new Error('source redirected');
|
|
76
|
+
}
|
|
77
|
+
catch { throw new RebuildError('REBUILD_REQUIREMENTS_UNAVAILABLE', 'config.requirements is missing or outside the bound handoff'); }
|
|
78
|
+
const binding = handoff.record.files.find(file => file.path === relative(handoff.root, source).split(sep).join('/'));
|
|
79
|
+
if (!binding) throw new RebuildError('REBUILD_REQUIREMENTS_UNAVAILABLE', 'config.requirements has no bound handoff hash');
|
|
80
|
+
requirements = { source, sha256: binding.sha256 };
|
|
81
|
+
}
|
|
82
|
+
return { config: handoff.config, parts: handoff.parts!, rig: handoff.rig!, configText, configHash, handoff: handoff.record, ...(requirements ? { requirements } : {}) };
|
|
66
83
|
}
|
|
67
84
|
/**
|
|
68
85
|
* #305: fast producer handoff readiness check for `open` (`handoffGap`, `producerInputs`, `resolveProducer`,
|
|
@@ -487,17 +504,40 @@ export function patchId(input: { sourceHash: string; configHash: string; patch:
|
|
|
487
504
|
const namedFile = (doc: unknown, keys: readonly string[]): unknown => keys.reduce<unknown>((v, k) => (v && typeof v === 'object' && !Array.isArray(v) ? (v as Record<string, unknown>)[k] : undefined), doc);
|
|
488
505
|
/**
|
|
489
506
|
* The patched config as the producer's own scratch configs are written (rig-parts `scratchConfig`): every path the
|
|
490
|
-
* loader resolves against the config's directory
|
|
507
|
+
* loader resolves against the config's directory made
|
|
491
508
|
* absolute when it names a file there, so the scratch copy reads the same files as the handoff config.
|
|
492
509
|
*/
|
|
493
510
|
export function scratchConfigText(configPath: string, doc: JsonValue): string {
|
|
494
511
|
const configDir = dirname(resolve(configPath)), out = structuredClone(doc) as Record<string, unknown>;
|
|
495
512
|
for (const keys of CONFIG_NAMED_FILES) {
|
|
496
513
|
const holder = namedFile(out, keys.slice(0, -1)) as Record<string, unknown> | undefined, key = keys.at(-1)!, value = holder?.[key];
|
|
514
|
+
if (keys.length === 3 && (CONFIG_SKELETON_NAMES as readonly unknown[]).includes(value)) continue;
|
|
497
515
|
if (typeof value === 'string' && value && !isAbsolute(value) && existsSync(resolve(configDir, value))) holder![key] = resolve(configDir, value);
|
|
498
516
|
}
|
|
499
517
|
return JSON.stringify(out, null, 2) + '\n';
|
|
500
518
|
}
|
|
519
|
+
const CONFIG_INPUTS = 'config-inputs';
|
|
520
|
+
|
|
521
|
+
/** Copy the exact bound requirements into this Apply's private scratch config layout. */
|
|
522
|
+
async function stageRequirements(dir: string, requirements: ProducerInputs['requirements'], doc: Record<string, unknown>): Promise<void> {
|
|
523
|
+
if (!requirements) return;
|
|
524
|
+
let bytes: Buffer;
|
|
525
|
+
try {
|
|
526
|
+
if (await realpath(requirements.source) !== requirements.source) throw new Error('source redirected');
|
|
527
|
+
bytes = await readFile(requirements.source);
|
|
528
|
+
} catch { throw new RebuildError('REBUILD_REQUIREMENTS_UNAVAILABLE', 'the bound config.requirements file is no longer readable'); }
|
|
529
|
+
if (sha256(bytes) !== requirements.sha256) throw new RebuildError('REBUILD_INPUTS_CHANGED', 'config.requirements changed since the review was opened; restart review');
|
|
530
|
+
const name = `requirements-${requirements.sha256}.json`;
|
|
531
|
+
await mkdir(join(dir, CONFIG_INPUTS), { mode: 0o700 });
|
|
532
|
+
await writeFile(join(dir, CONFIG_INPUTS, name), bytes, { mode: 0o600, flag: 'wx' });
|
|
533
|
+
doc.requirements = `${CONFIG_INPUTS}/${name}`;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
/** Scope scratch reuse to the newly bound input without changing legacy config hashes. */
|
|
537
|
+
function rebuildConfigIdentity(inputs: ProducerInputs): string {
|
|
538
|
+
return inputs.requirements ? sha256(JSON.stringify([inputs.configHash, inputs.requirements.sha256])) : inputs.configHash;
|
|
539
|
+
}
|
|
540
|
+
|
|
501
541
|
/** A patch may not change which files the config names (they are the handoff's hashed files): `EDIT_PATCH_PATH_HELD`. */
|
|
502
542
|
export function assertNamedFilesHeld(before: unknown, after: unknown): void {
|
|
503
543
|
for (const keys of CONFIG_NAMED_FILES) if (JSON.stringify(namedFile(before, keys)) !== JSON.stringify(namedFile(after, keys))) throw new RebuildError('EDIT_PATCH_PATH_HELD', `${keys.join('.')} names a handoff file; a patch may not change it`);
|
|
@@ -634,9 +674,19 @@ async function namedDirDigest(root: string, dir: string, field: string): Promise
|
|
|
634
674
|
async function stageInputDigest(dir:string,spec:string):Promise<string>{
|
|
635
675
|
const root=await realpath(dir);
|
|
636
676
|
const rows:[string,string][]=[['revision',await namedDirDigest(root,spec,'scratch revision')]];
|
|
637
|
-
for(const name of ['mesh.json','mesh-edit.json','config.json','patch.json','environment.json']){
|
|
677
|
+
for(const name of ['mesh.json','mesh-edit.json','config.json','patch.json','environment.json','animations.json']){
|
|
638
678
|
if(await exists(join(dir,name))){const path=await safeFile(await realpath(dir),name);rows.push([name,sha256(await readFile(path))]);}
|
|
639
679
|
}
|
|
680
|
+
const staged=join(root,CONFIG_INPUTS);
|
|
681
|
+
if(await exists(staged)){
|
|
682
|
+
if(await realpath(staged)!==staged)throw new RebuildError('STAGE_DRAFT_CHANGED','scratch config inputs were redirected');
|
|
683
|
+
const entries=await readdir(staged,{withFileTypes:true});
|
|
684
|
+
const entry=entries[0], expected=/^requirements-([a-f0-9]{64})\.json$/.exec(entry?.name??'')?.[1];
|
|
685
|
+
if(entries.length!==1||!entry?.isFile()||!expected)throw new RebuildError('STAGE_DRAFT_CHANGED','scratch requirements file is missing or redirected');
|
|
686
|
+
const path=`${CONFIG_INPUTS}/${entry.name}`, actual=sha256(await readFile(await safeFile(root,path)));
|
|
687
|
+
if(actual!==expected)throw new RebuildError('STAGE_DRAFT_CHANGED','scratch requirements bytes changed');
|
|
688
|
+
rows.push([path,actual]);
|
|
689
|
+
}
|
|
640
690
|
return sha256(JSON.stringify(rows));
|
|
641
691
|
}
|
|
642
692
|
export interface BuildPlan { source: string; full: string; head: string | null; inputsHash: string; inputs: AssembledView['inputs'] }
|
|
@@ -924,14 +974,42 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
924
974
|
if(!value||typeof value!=='object'||!('stageInputHash' in value))return;
|
|
925
975
|
const v=value as Record<string,unknown>;
|
|
926
976
|
if(!['rig-review-applied/1','rig-review-applied/3'].includes(String(v.schema))&&!(v.schema==='rig-review-applied/2'&&v.op==='remesh'))return;
|
|
977
|
+
await readAppliedSeal(v);
|
|
978
|
+
}
|
|
979
|
+
async function readAppliedSeal(v:Record<string,unknown>) {
|
|
927
980
|
if(typeof v.buildId!=='string'||!/^[a-f0-9]{64}$/.test(v.buildId))throw new RebuildError('STAGE_DRAFT_STALE','invalid applied identity');
|
|
928
981
|
try{
|
|
929
|
-
const
|
|
982
|
+
const root=await realpath(options.stateDir);
|
|
983
|
+
const directory=join(root,'applied-evidence',p.sourceHash);
|
|
984
|
+
if(await realpath(directory)!==directory)throw new Error('redirected evidence');
|
|
985
|
+
const file=await safeFile(directory,v.buildId+'.json');
|
|
930
986
|
if((await lstat(file)).size>evidenceLimit)throw new Error('oversized evidence');
|
|
931
987
|
const seal=JSON.parse(await readFile(file,'utf8')),body=seal.body;
|
|
932
|
-
if(!body||body.schema!=='rig-review-applied-evidence/1'||seal.digest!==sha256(JSON.stringify(body))||!isDeepStrictEqual(body.binding,evidenceBinding)||body.buildId!==v.buildId||body.inputHash!==v.stageInputHash||body.modelHash!==v.modelHash||!isDeepStrictEqual(body.check,v.check)||!isDeepStrictEqual(body.record,v))throw new Error('evidence mismatch');
|
|
988
|
+
if(!body||body.schema!=='rig-review-applied-evidence/1'||seal.digest!==sha256(JSON.stringify(body))||!isDeepStrictEqual(body.binding,evidenceBinding)||body.buildId!==v.buildId||body.inputHash!==(v.stageInputHash??null)||body.modelHash!==v.modelHash||!isDeepStrictEqual(body.check,v.check)||!isDeepStrictEqual(body.record,v))throw new Error('evidence mismatch');
|
|
989
|
+
return body;
|
|
933
990
|
}catch{throw new RebuildError('STAGE_DRAFT_STALE','the made claim has no matching sealed applied evidence');}
|
|
934
991
|
}
|
|
992
|
+
/** Fresh handoff requires the retained result as well as the historical seal. */
|
|
993
|
+
async function correctionEvidence(value:unknown) {
|
|
994
|
+
if(!value||typeof value!=='object'||(value as Record<string,unknown>).schema!=='rig-review-applied/2')return undefined;
|
|
995
|
+
const applied=value as unknown as import('./applied-context.ts').AppliedPatch;
|
|
996
|
+
const body=await readAppliedSeal(value as Record<string,unknown>);
|
|
997
|
+
try{
|
|
998
|
+
const root=await realpath(options.stateDir);
|
|
999
|
+
const active=rebuildDir(root,p.sourceHash,applied.buildId);
|
|
1000
|
+
const kept=join(keptRoot(root,p.sourceHash),applied.buildId);
|
|
1001
|
+
let dir=active;
|
|
1002
|
+
try{await lstat(active);}catch(error){
|
|
1003
|
+
if((error as NodeJS.ErrnoException).code!=='ENOENT')throw error;
|
|
1004
|
+
dir=kept;
|
|
1005
|
+
}
|
|
1006
|
+
if(await realpath(dir)!==dir||await realpath(join(dir,'build'))!==join(dir,'build'))throw new Error('redirected scratch');
|
|
1007
|
+
if(applied.stageInputHash&&await stageInputDigest(dir,join(dir,applied.op==='build'||applied.cloth?.route==='build'?'out/rig':'rig'))!==applied.stageInputHash)throw new Error('scratch inputs changed');
|
|
1008
|
+
const actual=await hashBuild(join(dir,'build'),applied.buildId);
|
|
1009
|
+
if(actual.modelHash!==body.modelHash||sha256(JSON.stringify(actual.files))!==body.outputHash)throw new Error('scratch model changed');
|
|
1010
|
+
return {source:evidenceBinding,applied:body.record,operationSha256:patchSha256(applied.patch),modelSha256:actual.modelHash};
|
|
1011
|
+
}catch{throw new RebuildError('CORRECTION_RESULT_STALE','the sealed scratch result is missing or changed');}
|
|
1012
|
+
}
|
|
935
1013
|
/**
|
|
936
1014
|
* #166: the line refusing an undo's re-run whose build is not the one its record names (the first differing file by
|
|
937
1015
|
* hash), or null — also null for any job that is not an undo's re-run.
|
|
@@ -1061,6 +1139,10 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1061
1139
|
const stored = JSON.parse(await readFile(resultFile, 'utf8')) as J;
|
|
1062
1140
|
if (stored.schema !== REBUILD_SCHEMA || stored.id !== id || stored.status !== 'built' || !stored.build) return null;
|
|
1063
1141
|
if ((!('kind' in stored) || stored.kind === 'delta'||(stored.kind==='patch'&&stored.op==='remesh')) && (!Object.hasOwn(stored, 'check')||!stored.stageInputHash)) return null;
|
|
1142
|
+
if ('kind' in stored && (stored.kind==='patch'||stored.kind==='animation') && stored.stageInputHash) {
|
|
1143
|
+
const spec=stored.kind==='patch'&&(stored.op==='build'||stored.cloth?.route==='build')?'out/rig':'rig';
|
|
1144
|
+
if(await stageInputDigest(dir,join(dir,spec))!==stored.stageInputHash)return null;
|
|
1145
|
+
}
|
|
1064
1146
|
const now = await hashBuild(join(dir, 'build'), id, assetPrefix);
|
|
1065
1147
|
if (JSON.stringify(now.files) !== JSON.stringify(stored.build.files)) return null;
|
|
1066
1148
|
const job = { ...stored, build: now, reused: true };
|
|
@@ -1123,12 +1205,14 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1123
1205
|
const check = await runTool(producer.bin, ['check', '--rig', op.spec, '--out', 'check', '--parts', inputs.parts, '--page-edges', pageEdges, '--pack-shape', packShape, ...(steps.world ? ['--environment', 'environment.json'] : [])], { cwd: dir, onLine: push });
|
|
1124
1206
|
let checkJson: unknown = null;
|
|
1125
1207
|
try { checkJson = JSON.parse(await readFile(join(dir, 'check', 'check.json'), 'utf8')); } catch { /* check refused before writing it; its line says why */ }
|
|
1126
|
-
steps.check(checkSummary(checkJson, check.exitCode, check.lines, firstRefusal(check.lines)), check.wallMs);
|
|
1208
|
+
steps.check({ ...checkSummary(checkJson, check.exitCode, check.lines, firstRefusal(check.lines)), source: 'check' }, check.wallMs);
|
|
1127
1209
|
}
|
|
1128
1210
|
// The package and its producer inputs must still be the bytes the request was made against.
|
|
1129
1211
|
// The handoff files are in the reviewed identity, so this also catches a config, parts or rig change.
|
|
1130
1212
|
try { await options.unchanged(); } catch { throw new RebuildError('REBUILD_INPUTS_CHANGED', 'the package or its producer handoff changed during the rebuild'); }
|
|
1131
|
-
if(!('kind' in job)||job.kind==='delta'||(job.kind==='patch'&&job.op==='remesh')
|
|
1213
|
+
if(!('kind' in job)||job.kind==='delta'||(job.kind==='patch'&&job.op==='remesh')||await exists(join(dir,CONFIG_INPUTS))) {
|
|
1214
|
+
job.stageInputHash = await stageInputDigest(dir, join(dir, op.spec));
|
|
1215
|
+
}
|
|
1132
1216
|
job.build = await hashBuild(join(dir, 'build'), job.id, assetPrefix);
|
|
1133
1217
|
if (steps.hashed) await steps.hashed();
|
|
1134
1218
|
// #166: an undo's re-run must reproduce the build its record names, file for file; otherwise it is refused, not guessed.
|
|
@@ -1183,6 +1267,11 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1183
1267
|
const args = job.request.patch.op.args, producer = resolved.producer;
|
|
1184
1268
|
let counts: RemeshCounts | null = null;
|
|
1185
1269
|
let built: ProcessResult | null = null;
|
|
1270
|
+
async function writePatchConfig(): Promise<void> {
|
|
1271
|
+
const doc = JSON.parse(scratchConfigText(inputs.config, patched)) as Record<string, unknown>;
|
|
1272
|
+
await stageRequirements(dir, inputs.requirements, doc);
|
|
1273
|
+
await writeFile(join(dir, 'config.json'), JSON.stringify(doc, null, 2) + '\n', { mode: 0o600 });
|
|
1274
|
+
}
|
|
1186
1275
|
/** #111: a cloth job whose written config declares limbs is built as `build` does; otherwise as `rig --config`. */
|
|
1187
1276
|
const building = job.op === 'build' || (job.op === 'cloth' && job.cloth?.route === 'build');
|
|
1188
1277
|
/** #115 (and #111's build route): assemble → rig → check on `config.json`, already written into the scratch directory. */
|
|
@@ -1207,6 +1296,7 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1207
1296
|
// handoff's files), so the config propose writes beside it builds from the same files.
|
|
1208
1297
|
const input = JSON.parse(scratchConfigText(inputs.config, patched)) as Record<string, unknown>;
|
|
1209
1298
|
absolutizeBuildFiles(input, value => (isAbsolute(value) ? value : resolve(dirname(inputs.config), value)));
|
|
1299
|
+
await stageRequirements(dir, inputs.requirements, input);
|
|
1210
1300
|
await writeFile(join(dir, 'cloth.json'), JSON.stringify(input, null, 2) + '\n', { mode: 0o600 });
|
|
1211
1301
|
push(`review: ${producer.package} ${producer.version} propose --parts <handoff parts> --source <handoff source> --keypoints <handoff keypoints> --out propose --cloth cloth.json (the handoff config with ${job.request.patch.ops.length} patch op(s)) --write-config config.json`);
|
|
1212
1302
|
const proposed = await runTool(producer.bin, ['propose', '--parts', inputs.parts, '--source', plan2.source, '--keypoints', plan2.keypoints, '--out', 'propose', '--cloth', 'cloth.json', '--write-config', 'config.json'], { cwd: dir, onLine: push });
|
|
@@ -1239,17 +1329,18 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1239
1329
|
// #115: assemble → rig → check from the painting and the runs, the patched config's assemble-read files absolute.
|
|
1240
1330
|
const doc = JSON.parse(scratchConfigText(inputs.config, patched)) as Record<string, unknown>;
|
|
1241
1331
|
absolutizeBuildFiles(doc, value => (isAbsolute(value) ? value : resolve(dirname(inputs.config), value)));
|
|
1332
|
+
await stageRequirements(dir, inputs.requirements, doc);
|
|
1242
1333
|
await writeFile(join(dir, 'config.json'), JSON.stringify(doc, null, 2) + '\n', { mode: 0o600 });
|
|
1243
1334
|
return runBuild(push, `the handoff config with ${job.request.patch.ops.length} patch op(s)`);
|
|
1244
1335
|
}
|
|
1245
1336
|
if (job.op === 'retune') {
|
|
1246
1337
|
// retune reads the inspected rig and writes only --out; what it holds it refuses by name (RETUNE_REQUEST_HELD).
|
|
1247
|
-
await
|
|
1338
|
+
await writePatchConfig();
|
|
1248
1339
|
push(`review: ${producer.package} ${producer.version} retune --rig <handoff rig> --config config.json (the handoff config with ${job.request.patch.ops.length} patch op(s)) → scratch rig`);
|
|
1249
1340
|
return runTool(producer.bin, ['retune', '--rig', inputs.rig, '--config', 'config.json', '--parts', inputs.parts, '--out', 'rig', ...args], { cwd: dir, onLine: push });
|
|
1250
1341
|
}
|
|
1251
1342
|
if (part === null) {
|
|
1252
|
-
await
|
|
1343
|
+
await writePatchConfig();
|
|
1253
1344
|
push(`review: ${producer.package} ${producer.version} rig --config config.json (the handoff config with ${job.request.patch.ops.length} patch op(s)) → scratch rig`);
|
|
1254
1345
|
return runTool(producer.bin, ['rig', '--config', 'config.json', '--parts', inputs.parts, '--out', 'rig', ...args], { cwd: dir, onLine: push });
|
|
1255
1346
|
}
|
|
@@ -1375,7 +1466,7 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1375
1466
|
if (op === 'rig' || op === 'build' || op === 'cloth') {
|
|
1376
1467
|
try { assertWholeRigBaseline(await settledBaseline()); } catch (e) { if (e instanceof BaselineError) throw new RebuildError(e.code, e.message.slice(e.code.length + 2)); throw e; }
|
|
1377
1468
|
}
|
|
1378
|
-
const id = patchId({ sourceHash: p.sourceHash, configHash: inputs
|
|
1469
|
+
const id = patchId({ sourceHash: p.sourceHash, configHash: rebuildConfigIdentity(inputs), patch, producer: `${resolved.producer.package}@${resolved.producer.version}`, compiler: `${resolved.compiler.package}@${resolved.compiler.version}`, op, ...(plan ? { buildInputs: plan.inputsHash } : {}), ...(world ? { environment: world.record.sha256 } : {}), ...(clothPlan ? { cloth: p.handoff!.record.keypoints!.sha256 } : {}) });
|
|
1379
1470
|
const current = jobs.get(id);
|
|
1380
1471
|
if (current?.status === 'running') return { status: 202, body: snapshot(current) };
|
|
1381
1472
|
if (busy()) return { status: 200, body: { status: 'refused', error: busy(), producerLine: null } };
|
|
@@ -1427,7 +1518,7 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1427
1518
|
const first = patches[0]!;
|
|
1428
1519
|
if (first.producer.name !== resolved.producer.package || first.producer.version !== resolved.producer.version) throw new RebuildError('EDIT_PRODUCER_MISMATCH', `the patch was made for ${first.producer.name} ${first.producer.version}; the installed producer is ${resolved.producer.package} ${resolved.producer.version}`);
|
|
1429
1520
|
const producer = `${resolved.producer.package}@${resolved.producer.version}`, compiler = `${resolved.compiler.package}@${resolved.compiler.version}`;
|
|
1430
|
-
const id = stripId({ sourceHash: p.sourceHash, configHash: inputs
|
|
1521
|
+
const id = stripId({ sourceHash: p.sourceHash, configHash: rebuildConfigIdentity(inputs), patches, producer, compiler });
|
|
1431
1522
|
if (strip?.id === id) return { status: strip.status === 'running' ? 202 : 200, body: stripView() };
|
|
1432
1523
|
const refusal = busy();
|
|
1433
1524
|
if (refusal) return { status: 200, body: { status: 'refused', error: refusal, producerLine: null } };
|
|
@@ -1438,7 +1529,7 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1438
1529
|
await rm(root, { recursive: true, force: true });
|
|
1439
1530
|
const concurrency = boundedStripConcurrency(options.stripConcurrency);
|
|
1440
1531
|
const candidates: StripCandidate[] = planned.map(({ patch }, i) => {
|
|
1441
|
-
const cid = patchId({ sourceHash: p.sourceHash, configHash: inputs
|
|
1532
|
+
const cid = patchId({ sourceHash: p.sourceHash, configHash: rebuildConfigIdentity(inputs), patch, producer, compiler, op: 'remesh' });
|
|
1442
1533
|
const job: PatchJob = { schema: REBUILD_SCHEMA, kind: 'patch', id: cid, status: 'running', reused: false, op: 'remesh', request: { patch, patchSha256: patchSha256(patch), configHash: inputs.configHash }, producer: tool(resolved.producer), compiler: tool(resolved.compiler), lines: [], producerLine: null, exitCode: null, wallMs: { op: null, compile: null, check: null }, check: null, diff: null, files: null, remesh: null, build: null };
|
|
1443
1534
|
return { value: shape.values[i]!, id: cid, entry: shape.entries[i]!, dir: join(root, id, cid), job, applied: false };
|
|
1444
1535
|
});
|
|
@@ -1584,7 +1675,7 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1584
1675
|
return { status: 200, body: { status: 'refused', error, producerLine: error } };
|
|
1585
1676
|
}
|
|
1586
1677
|
const text = meshEditText(request.delta);
|
|
1587
|
-
const id = deltaId({ sourceHash: p.sourceHash, configHash: inputs
|
|
1678
|
+
const id = deltaId({ sourceHash: p.sourceHash, configHash: rebuildConfigIdentity(inputs), part: request.part, deltaText: text, producer: `${resolved.producer.package}@${resolved.producer.version}`, compiler: `${resolved.compiler.package}@${resolved.compiler.version}` });
|
|
1588
1679
|
const current = jobs.get(id);
|
|
1589
1680
|
if (current?.status === 'running') return { status: 202, body: snapshot(current) };
|
|
1590
1681
|
if (busy()) return { status: 200, body: { status: 'refused', error: busy(), producerLine: null } };
|
|
@@ -1702,7 +1793,7 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1702
1793
|
if (!resolved.ok) return { status: 200, body: { status: 'refused', error: resolved.error, producerLine: resolved.error } };
|
|
1703
1794
|
const rigJson = await readFile(join(inputs.rig, 'rig.json'));
|
|
1704
1795
|
const record = retargetRecord(request, { rig: { path: inputs.handoff.rig ?? '', sha256: sha256(rigJson) }, sequence: { path: reference.path, sha256: sha256(sequence) }, producer: { name: resolved.producer.package, version: resolved.producer.version } });
|
|
1705
|
-
const id = retargetId({ sourceHash: p.sourceHash, configHash: inputs
|
|
1796
|
+
const id = retargetId({ sourceHash: p.sourceHash, configHash: rebuildConfigIdentity(inputs), record, producer: `${resolved.producer.package}@${resolved.producer.version}`, compiler: `${resolved.compiler.package}@${resolved.compiler.version}` });
|
|
1706
1797
|
const current = jobs.get(id);
|
|
1707
1798
|
if (current?.status === 'running') return { status: 202, body: snapshot(current) };
|
|
1708
1799
|
if (busy()) return { status: 200, body: { status: 'refused', error: busy(), producerLine: null } };
|
|
@@ -1727,7 +1818,9 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1727
1818
|
cmd: 'rig', spec: 'rig',
|
|
1728
1819
|
async run(push) {
|
|
1729
1820
|
await writeFile(join(dir, 'animations.json'), splicedAnimations, { mode: 0o600 });
|
|
1730
|
-
|
|
1821
|
+
const doc = JSON.parse(scratchConfig) as Record<string, unknown>;
|
|
1822
|
+
await stageRequirements(dir, inputs.requirements, doc);
|
|
1823
|
+
await writeFile(join(dir, 'config.json'), JSON.stringify(doc, null, 2) + '\n', { mode: 0o600 });
|
|
1731
1824
|
const anims = [...new Set(job.request.ops.map(o => o.animation))];
|
|
1732
1825
|
push(`review: ${producer.package} ${producer.version} rig --config config.json (${job.request.ops.length} animation op(s) on ${anims.join(', ')}; ${job.request.animationsFrom.path} ${job.request.animationsFrom.beforeSha256.slice(0, 12)}… → ${job.request.animationsFrom.afterSha256.slice(0, 12)}…) → scratch rig`);
|
|
1733
1826
|
return runTool(producer.bin, ['rig', '--config', 'config.json', '--parts', inputs.parts, '--out', 'rig', ...args], { cwd: dir, onLine: push });
|
|
@@ -1810,7 +1903,7 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1810
1903
|
const opsText = animationOpsText(effectiveOps), opsSha256 = sha256(opsText), afterSha256 = sha256(splicedAnimText);
|
|
1811
1904
|
const id = animationId({
|
|
1812
1905
|
sourceHash: p.sourceHash,
|
|
1813
|
-
configHash: inputs
|
|
1906
|
+
configHash: rebuildConfigIdentity(inputs),
|
|
1814
1907
|
animationsFromHash: baseAnimHash,
|
|
1815
1908
|
opsText,
|
|
1816
1909
|
producer: `${resolved.producer.package}@${resolved.producer.version}`,
|
|
@@ -1902,7 +1995,7 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1902
1995
|
const entry = request.bust ? bustEntryText(inputs.configText, request.part, request.bust) : meshEntryText(inputs.configText, request.part, request.regions);
|
|
1903
1996
|
const resolved = resolveProducer(options.starts);
|
|
1904
1997
|
if (!resolved.ok) return { status: 200, body: { status: 'refused', error: resolved.error, producerLine: resolved.error } };
|
|
1905
|
-
const id = designationId({ sourceHash: p.sourceHash, configHash: inputs
|
|
1998
|
+
const id = designationId({ sourceHash: p.sourceHash, configHash: rebuildConfigIdentity(inputs), part: request.part, entry, producer: `${resolved.producer.package}@${resolved.producer.version}`, compiler: `${resolved.compiler.package}@${resolved.compiler.version}` });
|
|
1906
1999
|
const current = jobs.get(id);
|
|
1907
2000
|
if (current?.status === 'running') return { status: 202, body: snapshot(current) };
|
|
1908
2001
|
if (busy()) return { status: 200, body: { status: 'refused', error: busy(), producerLine: null } };
|
|
@@ -1936,5 +2029,5 @@ export function createRebuilds(p: ReviewPackage, options: RebuildOptions) {
|
|
|
1936
2029
|
return safeFile(await realpath(join(rebuildDir(options.stateDir, p.sourceHash, id), 'build')), packagePath(name));
|
|
1937
2030
|
}
|
|
1938
2031
|
|
|
1939
|
-
return { describe, start, read, file, running: () => running, busy: () => busy() !== null, baseline: settledBaseline, inspectedCheck: settledInspectedCheck, latest, stageDraft, validateApplied, undo, history, startStrip, readStrip, stripJob, closeStrip, stripFile };
|
|
2032
|
+
return { describe, start, read, file, running: () => running, busy: () => busy() !== null, baseline: settledBaseline, inspectedCheck: settledInspectedCheck, latest, stageDraft, validateApplied, correctionEvidence, undo, history, startStrip, readStrip, stripJob, closeStrip, stripFile };
|
|
1940
2033
|
}
|
package/src/server.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import {isDeepStrictEqual} from 'node:util';
|
|
2
|
+
import {appliedValue,parseCorrection,projectSessionCorrection} from './correction-handoff.ts';
|
|
1
3
|
import {stagePartsRoutes} from './stage-parts.ts';
|
|
2
4
|
import {createControlServer,type ControlIdentity} from './control-server.ts';
|
|
3
5
|
import { readFile } from 'node:fs/promises';
|
|
@@ -75,8 +77,22 @@ export async function startServer(p:ReviewPackage,options:{port?:number;stateDir
|
|
|
75
77
|
if(req.method==='PUT'&&url.pathname==='/api/session'){
|
|
76
78
|
if(req.headers.get('origin')!==origin)return json({error:'Same-origin Origin required'},403);
|
|
77
79
|
const input=await bodyJson(req);await unchanged();
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
return json(await saveSession(p,input,options.stateDir,async(session,sessionBytes,previous)=>{
|
|
81
|
+
const source={id:p.manifest.id,revision:p.manifest.revision,sourceHash:p.sourceHash,reviewedSource:p.reviewedSource};
|
|
82
|
+
const previousRows=new Map(previous.feedback.map(row=>[row.id,row]));
|
|
83
|
+
for(const feedback of session.feedback){
|
|
84
|
+
const correction=parseCorrection((feedback.context as any)?.correction);
|
|
85
|
+
// An unchanged submitted row is historical, even after its scratch build is evicted.
|
|
86
|
+
if(correction?.path==='made'&&isDeepStrictEqual(previousRows.get(feedback.id),feedback))continue;
|
|
87
|
+
const applied=appliedValue(feedback);
|
|
88
|
+
await rebuilds.validateApplied(applied);
|
|
89
|
+
if(correction){
|
|
90
|
+
const settled=correction.path==='made'&&correction.selector.kind!=='post'?await rebuilds.correctionEvidence(applied):undefined;
|
|
91
|
+
projectSessionCorrection({...correction,source,session,sessionBytes,itemId:feedback.id,settled});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
await unchanged();
|
|
95
|
+
}));
|
|
80
96
|
}
|
|
81
97
|
// Apply · Rebuild (#99 regions, #102 {patch}): typed data, never a path; the server runs the installed producer into scratch.
|
|
82
98
|
if(req.method==='POST'&&url.pathname==='/api/rebuild'){
|
|
@@ -128,7 +144,7 @@ export async function startServer(p:ReviewPackage,options:{port?:number;stateDir
|
|
|
128
144
|
return new Response(result.png?new Uint8Array(result.png):stripJson(result),{headers:{...headers,'Content-Type':result.png?'image/png':'application/json; charset=utf-8','Content-Disposition':`attachment; filename="review-strip.${result.png?'png':'json'}"`}});
|
|
129
145
|
}
|
|
130
146
|
if(req.method!=='GET'&&req.method!=='HEAD')return json({error:'Method not allowed'},405);
|
|
131
|
-
if(url.pathname==='/api/review'){await unchanged();return json({manifest:p.manifest,initialAnimation:options.initialAnimation??null,sourceHash:p.sourceHash,reviewedSource:p.reviewedSource,...(referenceBinding(p)?{referenceBinding:referenceBinding(p),explicitReference:{...referenceBinding(p)!.reference,url:'/review-reference'}}:{}),...(p.sourcePainting?{sourcePainting:{...p.sourcePainting,url:'/review-painting'}}:{}),referenceHashes:{...p.referenceHashes,...(referenceBinding(p)?{[referenceBinding(p)!.reference.id]:referenceBinding(p)!.reference.sha256}:{})},report:p.report,feedbackCatalog:p.feedbackCatalog,assetsBase:'/assets/',capabilities:{playback:!!p.manifest.model,modeling:false,motion:false,feedback:true,audio:true}});}
|
|
147
|
+
if(url.pathname==='/api/review'){await unchanged();return json({manifest:p.manifest,...(p.direction?{direction:p.direction}:{}),...(p.setsHash?{setsHash:p.setsHash}:{}),initialAnimation:options.initialAnimation??null,sourceHash:p.sourceHash,reviewedSource:p.reviewedSource,...(referenceBinding(p)?{referenceBinding:referenceBinding(p),explicitReference:{...referenceBinding(p)!.reference,url:'/review-reference'}}:{}),...(p.sourcePainting?{sourcePainting:{...p.sourcePainting,url:'/review-painting'}}:{}),referenceHashes:{...p.referenceHashes,...(referenceBinding(p)?{[referenceBinding(p)!.reference.id]:referenceBinding(p)!.reference.sha256}:{})},report:p.report,feedbackCatalog:p.feedbackCatalog,assetsBase:'/assets/',capabilities:{playback:!!p.manifest.model,modeling:false,motion:false,feedback:true,audio:true}});}
|
|
132
148
|
if(url.pathname==='/api/session'){await unchanged();return json(await readSession(p,options.stateDir));}
|
|
133
149
|
if(url.pathname==='/api/rebuild')return json(await rebuilds.describe());
|
|
134
150
|
if(url.pathname==='/api/rebuild/history')return json(await rebuilds.history());
|
package/src/session.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {parseCorrection} from './correction-handoff.ts';
|
|
1
2
|
import {clockForAnimation,frameAtTime} from './frame-clock.ts';
|
|
2
3
|
import {parseBookmark} from '../web/inspection-persistence.ts';
|
|
3
4
|
import {parseStageComment,projectMark,hasStageComment,isTimeOnlyFeedback,feedbackFrameInterval} from './stage-comment.ts';
|
|
@@ -25,7 +26,8 @@ export function parseFeedback(item:unknown,strict=true):Feedback {
|
|
|
25
26
|
const integer=strict?Number.isSafeInteger:Number.isInteger;
|
|
26
27
|
if(f.frameStart===null||f.frameEnd===null){if(!isTimeOnlyFeedback(f))throw new Error('COMMENT_TIME_ONLY_INVALID: null frames require a validated time-only single comment and null interval');}
|
|
27
28
|
else if(!integer(f.frameStart)||!integer(f.frameEnd)||(f.frameStart as number)<0||(f.frameEnd as number)<(f.frameStart as number))throw new Error('feedback frames: expected inclusive integer 0 <= frameStart <= frameEnd');
|
|
28
|
-
const
|
|
29
|
+
const correction=parseCorrection((f.context as any)?.correction);
|
|
30
|
+
const summary=string(f.summary,'feedback.summary');if(summary.length>1000||(!correction&&/[\r\n]/.test(summary)))throw new Error('feedback.summary: expected one line <= 1000 characters');
|
|
29
31
|
return {id:string(f.id,'feedback.id'),frameStart:f.frameStart as number|null,frameEnd:f.frameEnd as number|null,target:{kind:choice(target.kind,['bone','slot','rig'] as const,'feedback.target.kind'),name:string(target.name,'feedback.target.name')},category:choice(f.category,['defect','quality'] as const,'feedback.category'),summary,...(f.context===undefined?{}:{context:f.context as Json})};
|
|
30
32
|
}
|
|
31
33
|
export interface FeedbackWarning {id:string;error:string}
|
|
@@ -104,4 +106,4 @@ export function parseSession(input:unknown,p:ReviewPackage,strict=true):ReviewSe
|
|
|
104
106
|
}
|
|
105
107
|
export function sessionFile(p:ReviewPackage,stateDir=join(homedir(),'.local','state','rig-c-review')):string { const key=createHash('sha256').update(JSON.stringify([p.manifest.id,p.manifest.revision,p.sourceHash,p.reviewedSource])).digest('hex'); return join(stateDir,key+'.json'); }
|
|
106
108
|
export async function readSession(p:ReviewPackage,stateDir?:string):Promise<ReviewSession> {try {const v=JSON.parse(await readFile(sessionFile(p,stateDir),'utf8'));const parsed=parseSession(v,p,false);return {...parsed,updatedAt:v.updatedAt};}catch(e){if((e as NodeJS.ErrnoException).code==='ENOENT')return freshSession(p);throw e;} }
|
|
107
|
-
export async function saveSession(p:ReviewPackage,input:unknown,stateDir?:string):Promise<ReviewSession> {const value=parseSession(input,p);
|
|
109
|
+
export async function saveSession(p:ReviewPackage,input:unknown,stateDir?:string,validate?:(value:ReviewSession,bytes:Buffer,previous:ReviewSession)=>Promise<void>):Promise<ReviewSession> {const value=parseSession(input,p);const bytes=Buffer.from(JSON.stringify(value,null,2)+'\n');const previous=await readSession(p,stateDir);await validate?.(value,bytes,previous);assertSubmittedComments(previous.feedback,value.feedback);await saveCommentCrops(value.feedback,stateDir);const file=sessionFile(p,stateDir);await mkdir(join(file,'..'),{recursive:true,mode:0o700});const tmp=file+'.'+crypto.randomUUID()+'.tmp';await writeFile(tmp,bytes,{mode:0o600});await rename(tmp,file);return value;}
|
package/src/strip-render.ts
CHANGED
|
@@ -97,7 +97,7 @@ async function openRig(input:StripRenderInput['rigs'][number],images:Map<string,
|
|
|
97
97
|
}catch(error){assets.dispose();throw error;}
|
|
98
98
|
}
|
|
99
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>{
|
|
100
|
+
export async function verifyCompiledModel(root:string,modelRelPath:string|undefined,animation?:string,setsPath?:string):Promise<void>{
|
|
101
101
|
if(!modelRelPath)throw new Error('package has no compiled model (manifest.model is absent)');
|
|
102
102
|
const previous=hostQueue;let release=()=>{};hostQueue=new Promise<void>(done=>{release=done;});await previous;
|
|
103
103
|
let restore=()=>{};
|
|
@@ -117,11 +117,14 @@ export async function verifyCompiledModel(root:string,modelRelPath:string|undefi
|
|
|
117
117
|
urls.set(page.name,url);images.set(url,await readFile(path));
|
|
118
118
|
}
|
|
119
119
|
const modelUrl=`https://strip.invalid/open/${encodeURIComponent(modelRelPath)}`;
|
|
120
|
+
const setsUrl=setsPath?'https://strip.invalid/open/sets.json':null;
|
|
121
|
+
const setBytes=setsPath?await readFile(await safeFile(root,setsPath)):null;
|
|
120
122
|
const fileFetch=new Proxy(fetch,{apply:(_target,_this,args:Parameters<typeof fetch>)=>{
|
|
123
|
+
if(setsUrl&&String(args[0])===setsUrl&&setBytes)return Promise.resolve(new Response(new Uint8Array(setBytes)));
|
|
121
124
|
if(String(args[0])!==modelUrl)return Promise.reject(new Error('undeclared model URL'));
|
|
122
125
|
return Promise.resolve(new Response(new Uint8Array(bytes)));
|
|
123
126
|
}});
|
|
124
|
-
const assets=await loadModel({modelUrl,fetch:fileFetch,setsUrl
|
|
127
|
+
const assets=await loadModel({modelUrl,fetch:fileFetch,setsUrl,regions:'none',resolvePage:name=>{const url=urls.get(name);if(!url)throw new Error(`undeclared page ${name}`);return url;}});
|
|
125
128
|
try{
|
|
126
129
|
const clip=animation??assets.animations[0]?.name;
|
|
127
130
|
if(clip!==undefined&&!assets.animations.some(a=>a.name===clip))throw new Error(`missing animation ${JSON.stringify(clip)}`);
|
package/web/catalog-en.ts
CHANGED
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
export const enCatalog: Readonly<Record<string, string>> = {
|
|
2
|
+
"interview.imageUnavailable": "INTERVIEW_IMAGE_INVALID: The bound image could not be displayed.",
|
|
3
|
+
"interview.legacy": "Legacy answers",
|
|
4
|
+
"interview.partsUnavailable": "The retained draft part files are unavailable.",
|
|
5
|
+
"interview.title": "Create interview",
|
|
6
|
+
"interview.language": "Language",
|
|
7
|
+
"interview.loading": "Loading interview…",
|
|
8
|
+
"interview.invalid": "The selection is invalid for this set.",
|
|
9
|
+
"interview.constraint": "Choose an allowed combination.",
|
|
10
|
+
"interview.required": "Create must prepare a choice set.",
|
|
11
|
+
"interview.invalidOptions": "The option set is invalid.",
|
|
12
|
+
"interview.file": "The retained option file is unavailable.",
|
|
13
|
+
"interview.stale": "The option set or its context changed. Reopen the interview.",
|
|
14
|
+
"interview.output": "The picks output is unavailable or conflicts with an input.",
|
|
15
|
+
"interview.failed": "The interview request failed.",
|
|
16
|
+
"interview.empty": "This project has no retained choice sets.",
|
|
17
|
+
"interview.question": "Interview question",
|
|
18
|
+
"interview.history": "Historical answer",
|
|
19
|
+
"interview.parts": "Bound parts",
|
|
20
|
+
"interview.source": "Bound source",
|
|
21
|
+
"interview.noParts": "This set has no bound separated parts.",
|
|
22
|
+
"interview.provenance": "Drafted by {0} · {1}",
|
|
23
|
+
"interview.other": "Describe your choice",
|
|
24
|
+
"interview.otherPending": "Other stays pending until a tailored set is offered and explicitly picked.",
|
|
25
|
+
"interview.autoPending": "Auto stays pending until the agent records the covered decision.",
|
|
26
|
+
"interview.recommended": "AI recommendation",
|
|
27
|
+
"interview.note": "Note (optional)",
|
|
28
|
+
"interview.save": "Save explicit picks",
|
|
29
|
+
"interview.unsaved": "Unsaved changes.",
|
|
30
|
+
"interview.saved": "Picks saved.",
|
|
31
|
+
"interview.choose": "Choose one option per prompt, then save.",
|
|
32
|
+
"interview.readOnly": "Read-only view. Open the launch URL to save picks.",
|
|
2
33
|
"PARTS_DIFFERENCE_PROVENANCE: declared path, lowercase SHA-256 and lanczos3-rgb-opaque required": "PARTS_DIFFERENCE_PROVENANCE: declared path, lowercase SHA-256 and lanczos3-rgb-opaque required",
|
|
3
34
|
"PARTS_DIFFERENCE_PATH: literal portable inside-package path required": "PARTS_DIFFERENCE_PATH: literal portable inside-package path required",
|
|
4
35
|
"PARTS_DIFFERENCE_PATH: declared painting must be readable inside the package": "PARTS_DIFFERENCE_PATH: declared painting must be readable inside the package",
|
|
@@ -28,7 +59,7 @@ export const enCatalog: Readonly<Record<string, string>> = {
|
|
|
28
59
|
" \u00b7 {0} \u00b7 rig-parts remesh {1}": " \u00b7 {0} \u00b7 rig-parts remesh {1}",
|
|
29
60
|
"Draft rig · structure evidence only": "Draft rig · structure evidence only",
|
|
30
61
|
"Mesh parameters": "Mesh parameters",
|
|
31
|
-
"
|
|
62
|
+
"Use Write review, choose Parts review and name the Create draft. Export the saved item with the feedback CLI. Mesh deltas retain evidence as unsupported operations.": "Use Write review, choose Parts review and name the Create draft. Export the saved item with the feedback CLI. Mesh deltas retain evidence as unsupported operations.",
|
|
32
63
|
"REBUILD_PART_NOT_CONTOUR: {0}": "REBUILD_PART_NOT_CONTOUR: {0}",
|
|
33
64
|
"STAGE_DRAFT_NO_MESH: this part has no mesh attachment; direct correction is unavailable.": "STAGE_DRAFT_NO_MESH: this part has no mesh attachment; direct correction is unavailable.",
|
|
34
65
|
"STAGE_DRAFT_UNAVAILABLE: no producer-compatible draft is supplied.": "STAGE_DRAFT_UNAVAILABLE: no producer-compatible draft is supplied.",
|
|
@@ -47,7 +78,25 @@ export const enCatalog: Readonly<Record<string, string>> = {
|
|
|
47
78
|
"Inspection stages": "Inspection stages",
|
|
48
79
|
"Open setup mesh instruments": "Open setup mesh instruments",
|
|
49
80
|
"Parts and atlas inspection": "Parts and atlas inspection",
|
|
50
|
-
"INTERVIEW_UNAVAILABLE:
|
|
81
|
+
"INTERVIEW_UNAVAILABLE: Open a designated create project with rig-review interview.": "INTERVIEW_UNAVAILABLE: Open a designated create project with rig-review interview.",
|
|
82
|
+
"DIRECTION_SOURCE_CHANGED: undeclared playback input": "DIRECTION_SOURCE_CHANGED: undeclared playback input",
|
|
83
|
+
"DIRECTION_SOURCE_CHANGED: playback bytes differ from the bound SHA-256": "DIRECTION_SOURCE_CHANGED: playback bytes differ from the bound SHA-256",
|
|
84
|
+
"direction.title": "Direction inspection",
|
|
85
|
+
"direction.inspected": "Inspected model · {0} · SHA-256 {1}",
|
|
86
|
+
"direction.scratch": "Scratch model · {0} · SHA-256 {1}",
|
|
87
|
+
"direction.modelUnavailable": "MODEL_UNAVAILABLE · No compiled model loaded.",
|
|
88
|
+
"direction.package": "Package revision {0} · source SHA-256 {1} · @rig-c/play {2}",
|
|
89
|
+
"direction.turn": "2.5D turn · {0} · Use the Turn Pad to inspect the compiled sliders.",
|
|
90
|
+
"direction.turnUnavailable": "TURN_UNAVAILABLE · No supported compiled turn dials loaded.",
|
|
91
|
+
"direction.depthUnavailable": "DEPTH_UNAVAILABLE · No independent depth control in this playback surface.",
|
|
92
|
+
"direction.sets": "Attachment sets · {0}",
|
|
93
|
+
"direction.chooseSet": "Inspect attachment set",
|
|
94
|
+
"direction.setsUnavailable": "SETS_UNAVAILABLE · No attachment sets loaded.",
|
|
95
|
+
"direction.authored": "Authored direction · rig v{0} · {1} · SHA-256 {2}",
|
|
96
|
+
"direction.authoredUnavailable": "DIRECTION_METADATA_UNAVAILABLE · No authored direction bound to this model on stage.",
|
|
97
|
+
"direction.runtimeCameraUnavailable": "CAMERA_PLAYBACK_UNAVAILABLE · Authored camera and timing are read-only here. Pan and zoom adjust the inspection viewport.",
|
|
98
|
+
"direction.cameraApplyUnavailable": "CAMERA_APPLY_UNSUPPORTED · Camera Apply is unavailable.",
|
|
99
|
+
"direction.keys": "Authored camera and timing keys",
|
|
51
100
|
"DIRECTION_UNAVAILABLE: no direction inspection contract is installed.": "DIRECTION_UNAVAILABLE: no direction inspection contract is installed.",
|
|
52
101
|
"MODEL_UNAVAILABLE: no compiled model is supplied in this inspection.": "MODEL_UNAVAILABLE: no compiled model is supplied in this inspection.",
|
|
53
102
|
"Atlas inspection, read only — inspected package. Applied scratch atlas, pre-rig parts, mesh sign-off and draft corrections are unavailable here.": "Atlas inspection, read only — inspected package. Applied scratch atlas, pre-rig parts, mesh sign-off and draft corrections are unavailable here.",
|
|
@@ -3191,4 +3240,23 @@ export const enCatalog: Readonly<Record<string, string>> = {
|
|
|
3191
3240
|
"Unclassified check rows": "Unclassified check rows",
|
|
3192
3241
|
"Badges count only mesh flags and explicit part findings. Pair readings and check evidence are not counted.": "Badges count only mesh flags and explicit part findings. Pair readings and check evidence are not counted.",
|
|
3193
3242
|
"Missing or invalid row metadata: source-root rows remain unclassified and are not counted.": "Missing or invalid row metadata: source-root rows remain unclassified and are not counted.",
|
|
3243
|
+
"Correction handoff": "Correction handoff",
|
|
3244
|
+
"Correction path": "Correction path",
|
|
3245
|
+
"Ordinary feedback": "Ordinary feedback",
|
|
3246
|
+
"Described correction": "Described correction",
|
|
3247
|
+
"Made correction": "Made correction",
|
|
3248
|
+
"Create review stage": "Create review stage",
|
|
3249
|
+
"Rig review": "Rig review",
|
|
3250
|
+
"Direction review": "Direction review",
|
|
3251
|
+
"Create draft ID or version number": "Create draft ID or version number",
|
|
3252
|
+
"Declared post model path": "Declared post model path",
|
|
3253
|
+
"Exact correction text (optional UTF-8 file)": "Exact correction text (optional UTF-8 file)",
|
|
3254
|
+
"Choose the explicit Create source identity.": "Choose the explicit Create source identity.",
|
|
3255
|
+
"Unresolved correction request": "Unresolved correction request",
|
|
3256
|
+
"Made correction evidence": "Made correction evidence",
|
|
3257
|
+
"Use as described correction": "Use as described correction",
|
|
3258
|
+
"Correction text must be valid UTF-8 and at most 1,000 characters.": "Correction text must be valid UTF-8 and at most 1,000 characters.",
|
|
3259
|
+
"CORRECTION_APPLY_PENDING: Apply and check the correction first.": "CORRECTION_APPLY_PENDING: Apply and check the correction first.",
|
|
3260
|
+
"Saved part notes and pointed comments can be handed off as described corrections.": "Saved part notes and pointed comments can be handed off as described corrections.",
|
|
3261
|
+
"Unsupported correction operation": "Unsupported correction operation",
|
|
3194
3262
|
};
|