@rig-c/review 2.13.0 → 4.0.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.
Files changed (46) hide show
  1. package/README.md +1 -1
  2. package/docs/PARTS_VIEW.md +1 -1
  3. package/docs/REVIEW_PACKAGE.md +32 -91
  4. package/docs/STABILITY.md +27 -194
  5. package/docs/WORKFLOWS.md +0 -107
  6. package/package.json +1 -1
  7. package/skills/rig-review/SKILL.md +11 -25
  8. package/src/build.ts +2 -2
  9. package/src/direction-inspection.ts +6 -2
  10. package/src/front.ts +4 -193
  11. package/src/interview-scene.ts +3 -3
  12. package/src/job-act.ts +1 -35
  13. package/src/job-api.ts +27 -19
  14. package/src/job-cli.ts +3 -3
  15. package/src/job-contract.ts +14 -50
  16. package/src/job-front.ts +17 -44
  17. package/src/job-host.ts +1 -4
  18. package/src/job-session.ts +22 -10
  19. package/src/job-source.ts +3 -17
  20. package/src/job-store.ts +80 -6
  21. package/src/job-worker.ts +1 -47
  22. package/src/manifest.ts +23 -4
  23. package/src/open.ts +2 -3
  24. package/src/scene-inspection.ts +50 -0
  25. package/src/server.ts +1 -1
  26. package/web/catalog-en.ts +37 -27
  27. package/web/catalog-ko.ts +37 -27
  28. package/web/compare.css +0 -4
  29. package/web/direction-panel.ts +22 -6
  30. package/web/inspector-blocks.ts +8 -4
  31. package/web/job-rig-capture.ts +62 -12
  32. package/web/job-rig-screen.ts +75 -55
  33. package/web/job-session.ts +89 -1091
  34. package/web/main.ts +113 -56
  35. package/web/parts-viewport-provider.ts +8 -3
  36. package/web/retained-frame-stage.ts +7 -7
  37. package/web/rig-host.ts +5 -3
  38. package/web/rig-viewport-provider.ts +2 -0
  39. package/web/scene-plates.ts +57 -4
  40. package/web/styles.css +12 -82
  41. package/web/viewport-capture.ts +12 -2
  42. package/web/workspace-ui.ts +5 -6
  43. package/src/front-worker.ts +0 -2
  44. package/src/job-hub.ts +0 -304
  45. package/src/job-image-set.ts +0 -73
  46. package/web/job-hub.ts +0 -160
package/src/job-source.ts CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  JOB_PARTS_ENUMERATOR_RANGE,
11
11
  } from './job-contract.ts';
12
12
  import type {
13
- JobCheckpointEvidence, JobFileIdentity, JobImageSetInput, JobInterviewDiagnostics, JobInterviewRecord, JobModelSourceBinding, JobPartsEnumerator, JobPartsFileReference, JobPartsIdentity, JobPlanIdentity, JobPublishRequest,
13
+ JobCheckpointEvidence, JobFileIdentity, JobInterviewDiagnostics, JobInterviewRecord, JobModelSourceBinding, JobPartsEnumerator, JobPartsFileReference, JobPartsIdentity, JobPlanIdentity, JobPublishRequest,
14
14
  JobSelector, JobSourceBinding, JobSubject, JobPlanTextProjection, JobPlanTextStep,
15
15
  OptionContext, OptionSource, PackageResultV3, PlanContext, PlanSource, ProjectRecord, PublishRequestV3,
16
16
  RecordFreeze, RecordOptionResult, RecordPlanResult, RecordPublicationReader, RecordPublishedContext,
@@ -43,7 +43,6 @@ import {
43
43
  validateRecordAskSubject,
44
44
  } from './job-api.ts';
45
45
  import { JobError, type JobSnapshotOwner } from './job-store.ts';
46
- import { prepareJobImageSet } from './job-image-set.ts';
47
46
 
48
47
  export interface JobRootIdentity {
49
48
  readonly path: string;
@@ -58,7 +57,6 @@ export interface JobRootIdentity {
58
57
  */
59
58
  export interface JobPublishedContext {
60
59
  readonly checkpointEvidence?: readonly JobCheckpointEvidence[];
61
- readonly imageSet?: JobImageSetInput;
62
60
  readonly selector: JobSelector | null;
63
61
  readonly plan: JobPlanIdentity | null;
64
62
  readonly parts: JobPartsIdentity | null;
@@ -1304,8 +1302,6 @@ export async function prepareJobSource(options: {
1304
1302
  if (requestDigest(context.selector) !== requestDigest(request.result.selector)) throw new JobError('JOB_SOURCE_MISMATCH');
1305
1303
  const declared = publishedIdentities(context);
1306
1304
  const evidence = checkpointEvidenceFields(context, context.plan, context.subjects, declared);
1307
- if (evidence.checkpointEvidence && context.imageSet !== undefined) throw new JobError(
1308
- 'JOB_SOURCE_MISMATCH', 'CHECKPOINT_EVIDENCE_INVALID');
1309
1305
  checkpointEvidenceMetadata(root.path, evidence.checkpointEvidence);
1310
1306
  let review: Awaited<ReturnType<typeof loadReview>>;
1311
1307
  try {
@@ -1343,9 +1339,6 @@ export async function prepareJobSource(options: {
1343
1339
  await mkdir(snapshotRoot, {mode: 0o700});
1344
1340
  const info = lstatSync(snapshotRoot);
1345
1341
  snapshotIdentity = {dev: info.dev, ino: info.ino};
1346
- const imageSet = context.imageSet === undefined ? null : prepareJobImageSet(context.imageSet,
1347
- path => sourceBytes(root.path, path));
1348
- for (const image of imageSet?.imageSet.images ?? []) add(image.path, image.sha256);
1349
1342
  const parts = await prepareParts(root.path, snapshotRoot, context.parts, declared, options.partsEnumerator);
1350
1343
  for (const [path, bytes] of parts.bytes) add(path, jobHash(bytes));
1351
1344
  if (wanted.size > maxSourceFiles) throw new JobError('JOB_SOURCE_UNRETAINABLE', 'PARTS_REFERENCE_LIMIT');
@@ -1394,13 +1387,6 @@ export async function prepareJobSource(options: {
1394
1387
  optionSet: null, appliedResult: null, plan: context.plan, parts: parts.identity,
1395
1388
  };
1396
1389
  let source: JobSourceBinding = {...modelSource, ...evidence};
1397
- if (imageSet) {
1398
- if (modelSource.model || modelSource.selector) throw new JobError('JOB_IMAGE_SET_INVALID');
1399
- const {model, selector, ...common} = modelSource;
1400
- source = {...common, subject: 'image-set', ...imageSet,
1401
- sourceHash: jobHash(JSON.stringify({schema: 'rig-review-job-image-set/1',
1402
- packageSourceHash: modelSource.sourceHash, record, imageSet: imageSet.imageSet}))};
1403
- }
1404
1390
  const boundReview = { ...review, sourceHash: source.sourceHash };
1405
1391
  const sealedByPath = new Map(seals.map(seal => [seal.path, seal.sha256]));
1406
1392
  const retainedInterview = project
@@ -1426,7 +1412,7 @@ export async function prepareJobSource(options: {
1426
1412
  instanceKey: openKey({ mode: 'single', p: boundReview, inputs: { input: review.manifestPath },
1427
1413
  contentHash: source.sourceHash, selection: null }, options.fingerprint),
1428
1414
  label: review.manifest.title,
1429
- visual: imageSet || review.manifest.model || review.manifest.references.length ? { status: 'available' } :
1415
+ visual: review.manifest.model || review.manifest.references.length ? { status: 'available' } :
1430
1416
  { status: 'unavailable', code: 'MODEL_UNAVAILABLE' },
1431
1417
  subjects: context.subjects,
1432
1418
  questions: (project?.questions ?? []).map(question => {
@@ -1468,7 +1454,7 @@ export function assertStoredCheckpointEvidence(retained: JobRetainedSourceV3): v
1468
1454
  }
1469
1455
  if (!hasEvidence && !('checkpointEvidencePackageHash' in retained)) return;
1470
1456
  const source = retained.source;
1471
- if (!hasEvidence || source.subject === 'image-set' || !retained.record) throw new JobError('JOB_SOURCE_MISMATCH');
1457
+ if (!hasEvidence || !retained.record) throw new JobError('JOB_SOURCE_MISMATCH');
1472
1458
  const evidence = checkpointEvidenceFields(source, source.plan, retained.subjects, retained.seals);
1473
1459
  const packageSourceHash = jobSha(retained.checkpointEvidencePackageHash);
1474
1460
  const expected = packageSourceDigest(packageSourceHash, retained.record, source, retained.seals, evidence);
package/src/job-store.ts CHANGED
@@ -2,6 +2,8 @@ import { Database, constants as sqliteConstants } from 'bun:sqlite';
2
2
  import { randomUUID } from 'node:crypto';
3
3
  import { chmodSync, lstatSync, mkdirSync, realpathSync } from 'node:fs';
4
4
  import { join } from 'node:path';
5
+ import {createHash} from 'node:crypto';
6
+ import {validatePngCrop} from './comment-crops.ts';
5
7
  import { JOB_API_SCHEMA, JOB_ACT_SCHEMA, type JobErrorCode, type JobEvent } from './job-contract.ts';
6
8
 
7
9
  export class JobError extends Error {
@@ -63,6 +65,28 @@ interface JobRow {
63
65
 
64
66
  const maximumDocumentBytes = 16 * 1024 * 1024;
65
67
 
68
+ /** Private representation only. Public act bytes are reconstructed without changing key order. */
69
+ export function jobCropReferences(value: unknown, save?: (sha256: string, bytes: Buffer) => void): string {
70
+ const paths = new WeakMap<object, string[]>(), references: [string[], string][] = [];
71
+ const text = JSON.stringify(value, function(key, item) {
72
+ if (save && (item === undefined || typeof item === 'function' || typeof item === 'symbol' ||
73
+ typeof item === 'bigint' || typeof item === 'number' && !Number.isFinite(item))) throw new JobError('JOB_STORAGE_FAILED');
74
+ const path = key === '' ? [] : [...(paths.get(this) ?? []), key];
75
+ if (item && typeof item === 'object') paths.set(item, path);
76
+ if (key === 'png' && typeof item === 'string' && item.startsWith('data:image/png;base64,') &&
77
+ this.path === `comment-crops/${this.sha256}.png`) {
78
+ if (save) save(this.sha256, validatePngCrop(this));
79
+ references.push([path, this.sha256]);
80
+ return 'job-crop:' + this.sha256;
81
+ }
82
+ return item;
83
+ });
84
+ if (!references.length) return text;
85
+ const packed = JSON.parse(text);
86
+ packed._jobCommentCrops = references;
87
+ return JSON.stringify(packed);
88
+ }
89
+
66
90
  function encode(value: unknown): string {
67
91
  try {
68
92
  const text = JSON.stringify(value, (_key, item) => {
@@ -208,6 +232,9 @@ export class JobStore<Data> {
208
232
  job_id TEXT NOT NULL, act_id TEXT NOT NULL, page_id TEXT NOT NULL, submission_id TEXT NOT NULL,
209
233
  sha256 TEXT NOT NULL, binding TEXT NOT NULL, png BLOB NOT NULL, act_bytes BLOB NOT NULL,
210
234
  PRIMARY KEY(job_id, act_id), UNIQUE(job_id, page_id, submission_id)
235
+ );
236
+ CREATE TABLE IF NOT EXISTS job_comment_crops (
237
+ sha256 TEXT PRIMARY KEY, png BLOB NOT NULL
211
238
  );`);
212
239
  this.captureStorage();
213
240
  } catch {
@@ -272,7 +299,8 @@ export class JobStore<Data> {
272
299
  const row = this.db.query<JobRow, [string]>(`SELECT jobs.*, job_closures.document AS closure
273
300
  FROM jobs LEFT JOIN job_closures USING(job_id) WHERE job_id=?`).get(jobId);
274
301
  if (!row) throw new JobError('JOB_UNKNOWN');
275
- return decode<Data>(row);
302
+ const stored = decode<Data>(row);
303
+ return {...stored, data: this.restoreCrops(stored.data)};
276
304
  } catch (error) {
277
305
  if (error instanceof JobError) throw error;
278
306
  throw new JobError('JOB_STORAGE_FAILED', 'Stored job state is invalid');
@@ -282,7 +310,7 @@ export class JobStore<Data> {
282
310
  activeByRootKey(rootKey: string): StoredJob<Data> | null {
283
311
  try {
284
312
  const row = this.db.query<JobRow, [string]>('SELECT * FROM jobs WHERE root_key=? AND active=1').get(rootKey);
285
- return row ? decode<Data>(row) : null;
313
+ return row ? this.get(row.job_id) : null;
286
314
  } catch {
287
315
  throw new JobError('JOB_STORAGE_FAILED', 'Stored job state is invalid');
288
316
  }
@@ -309,7 +337,7 @@ export class JobStore<Data> {
309
337
  const current = this.db.query<JobRow, [string]>(
310
338
  'SELECT * FROM jobs WHERE root_key=? AND active=1',
311
339
  ).get(rootKey);
312
- if (current) return decode<Data>(current);
340
+ if (current) return this.get(current.job_id);
313
341
  const jobId = randomUUID();
314
342
  const document = encode(initialize(jobId));
315
343
  this.db.query('INSERT INTO jobs(job_id,root_key,revision,active,document) VALUES(?,?,0,1,?)')
@@ -336,7 +364,7 @@ export class JobStore<Data> {
336
364
  if (expectedRevision !== null && current.revision !== expectedRevision) throw new JobError('JOB_GENERATION_STALE');
337
365
  const next = operation(current);
338
366
  const active = next.active ?? current.active;
339
- const document = encode(next.data);
367
+ const document = encode(JSON.parse(this.saveCrops(next.data)));
340
368
  if (next.snapshot) {
341
369
  const snapshot = next.snapshot;
342
370
  this.db.query(`INSERT INTO job_snapshot_owners
@@ -347,7 +375,8 @@ export class JobStore<Data> {
347
375
  const still = next.still;
348
376
  this.db.query(`INSERT INTO job_act_stills
349
377
  (job_id,act_id,page_id,submission_id,sha256,binding,png,act_bytes) VALUES(?,?,?,?,?,?,?,?)`)
350
- .run(jobId, still.actId, still.pageId, still.submissionId, still.sha256, still.binding, still.png, still.actBytes);
378
+ .run(jobId, still.actId, still.pageId, still.submissionId, still.sha256, still.binding, still.png,
379
+ Buffer.from(this.saveCrops(JSON.parse(Buffer.from(still.actBytes).toString()))));
351
380
  }
352
381
  this.db.query('UPDATE jobs SET revision=?,active=?,document=? WHERE job_id=?')
353
382
  .run(current.revision + 1, active ? 1 : 0, document, jobId);
@@ -356,9 +385,54 @@ export class JobStore<Data> {
356
385
  }
357
386
 
358
387
  readStill(jobId: string, actId: string): Pick<JobStoredStill, 'sha256' | 'png' | 'actBytes'> | null {
359
- return this.db.query<{sha256: string; png: Uint8Array; actBytes: Uint8Array}, [string, string]>(
388
+ const stored = this.db.query<{sha256: string; png: Uint8Array; actBytes: Uint8Array}, [string, string]>(
360
389
  'SELECT sha256,png,act_bytes AS actBytes FROM job_act_stills WHERE job_id=? AND act_id=?',
361
390
  ).get(jobId, actId);
391
+ if (!stored) return null;
392
+ let parsed: unknown;
393
+ try { parsed = JSON.parse(Buffer.from(stored.actBytes).toString()); }
394
+ catch { throw new JobError('JOB_STILL_CAPTURE_FAILED'); }
395
+ if (!Buffer.from(JSON.stringify(parsed)).equals(Buffer.from(stored.actBytes))) throw new JobError('JOB_STILL_CAPTURE_FAILED');
396
+ return {...stored, actBytes: Buffer.from(JSON.stringify(this.restoreCrops(parsed)))};
397
+ }
398
+
399
+ readCrop(sha256: string): Buffer {
400
+ const row = this.db.query<{png: Uint8Array}, [string]>('SELECT png FROM job_comment_crops WHERE sha256=?').get(sha256);
401
+ if (!row || createHash('sha256').update(row.png).digest('hex') !== sha256) throw new JobError('JOB_STORAGE_FAILED');
402
+ return Buffer.from(row.png);
403
+ }
404
+
405
+ private saveCrops(value: unknown): string {
406
+ this.db.exec('CREATE TABLE IF NOT EXISTS job_comment_crops (sha256 TEXT PRIMARY KEY, png BLOB NOT NULL)');
407
+ const saved = new Set<string>();
408
+ return jobCropReferences(value, (sha256, bytes) => {
409
+ if (saved.has(sha256)) return;
410
+ saved.add(sha256);
411
+ this.db.query('INSERT OR IGNORE INTO job_comment_crops(sha256,png) VALUES(?,?)').run(sha256, bytes);
412
+ if (!this.readCrop(sha256).equals(bytes)) throw new JobError('JOB_STORAGE_FAILED');
413
+ });
414
+ }
415
+
416
+ private restoreCrops<T>(value: T): T {
417
+ const packed = value as Record<string, unknown>, references = packed._jobCommentCrops;
418
+ if (references === undefined) return value;
419
+ if (!Array.isArray(references)) throw new JobError('JOB_STORAGE_FAILED');
420
+ delete packed._jobCommentCrops;
421
+ const cache = new Map<string, string>();
422
+ for (const [path, sha256] of references) {
423
+ if (!Array.isArray(path) || !path.every(key => typeof key === 'string') || path.at(-1) !== 'png' ||
424
+ typeof sha256 !== 'string' || !/^[a-f0-9]{64}$/.test(sha256)) throw new JobError('JOB_STORAGE_FAILED');
425
+ let owner: any = packed;
426
+ for (const key of path.slice(0, -1)) {
427
+ if (!owner || typeof owner !== 'object' || !Object.hasOwn(owner, key)) throw new JobError('JOB_STORAGE_FAILED');
428
+ owner = owner[key];
429
+ }
430
+ if (owner?.png !== 'job-crop:' + sha256 || owner.sha256 !== sha256 ||
431
+ owner.path !== `comment-crops/${sha256}.png`) throw new JobError('JOB_STORAGE_FAILED');
432
+ if (!cache.has(sha256)) cache.set(sha256, 'data:image/png;base64,' + this.readCrop(sha256).toString('base64'));
433
+ owner.png = cache.get(sha256);
434
+ }
435
+ return value;
362
436
  }
363
437
 
364
438
  /** Close never grows or rewrites the bounded historical document. */
package/src/job-worker.ts CHANGED
@@ -1,8 +1,4 @@
1
- import {randomUUID} from 'node:crypto';
2
- import { createJobHostPorts } from './job-api.ts';
3
- import { JobSession, type JobSessionOptions } from './job-session.ts';
4
- import type { JobHostPorts } from './job-contract.ts';
5
- import { JobError } from './job-store.ts';
1
+ import type {JobSessionOptions} from './job-session.ts';
6
2
 
7
3
  export interface JobWorkerOptions extends JobSessionOptions {
8
4
  readonly port?: number;
@@ -16,45 +12,3 @@ export interface JobWorkerOptions extends JobSessionOptions {
16
12
  readonly fetchCapability: string;
17
13
  }) => void | Promise<void>;
18
14
  }
19
-
20
- /** Backend host only. Lane B mounts these same ports in its managed front and
21
- * supplies the owner UI. This listener serves semantic API requests only and
22
- * never serves a private snapshot directory or starts a browser/producer.
23
- */
24
- export async function startJobWorker(options: JobWorkerOptions): Promise<{
25
- readonly session: JobSession;
26
- readonly ports: JobHostPorts;
27
- readonly origin: string;
28
- readonly listenerIncarnation: string;
29
- stop(): void;
30
- }> {
31
- const session = new JobSession(options);
32
- const listenerIncarnation = randomUUID();
33
- let ports: JobHostPorts;
34
- let stopped = false;
35
- const server = Bun.serve({
36
- hostname: '127.0.0.1', port: options.port ?? 0, idleTimeout: 0,
37
- fetch(request) {
38
- const url = new URL(request.url);
39
- if (url.pathname === `/jobs/${session.jobId}/api`) return ports.handleJobApi(request);
40
- return Response.json({ error: 'JOB_REQUEST_INVALID' }, {
41
- status: 404, headers: { 'Cache-Control': 'no-store', 'X-Content-Type-Options': 'nosniff' },
42
- });
43
- },
44
- });
45
- const origin = `http://127.0.0.1:${server.port}`;
46
- ports = createJobHostPorts(session, origin);
47
- const stop = () => {
48
- if (stopped) return;
49
- stopped = true;
50
- server.stop(true);
51
- session.dispose();
52
- };
53
- try {
54
- await options.installWriterBinding?.({ ...session.writerGrant(), origin });
55
- return { session, ports, origin, listenerIncarnation, stop };
56
- } catch {
57
- stop();
58
- throw new JobError('JOB_AUTHORITY_REFUSED', 'Writer binding installation failed');
59
- }
60
- }
package/src/manifest.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import {readSceneInspection,scenePlateBytes,type SceneInspection} from './scene-inspection.ts';
1
2
  import {DIRECTION_MAX_BYTES, readDirectionInspection, type DirectionInspection} from './direction-inspection.ts';
2
3
  import {discoverTurnDials} from './turn-pad.ts';
3
4
  import { createHash } from 'node:crypto';
@@ -17,7 +18,7 @@ export interface Reference { id: string; label: string; type: 'image' | 'video'
17
18
  export interface Checkpoint { id: string; title: string; time?: number; animation?: string; reference?: string; note?: string; workspace?: 'modeling' | 'motion'; camera?: { zoom: number; x: number; y: number }; axis?: {id:string;value:number} }
18
19
  export interface ReviewManifest {
19
20
  schema: 'rig-review/1'; id: string; title: string; revision: string; model?: string; motion?: string;
20
- direction?: string; sets?: string;
21
+ direction?: string; scene?: string; sets?: string;
21
22
  references: Reference[]; animations: { id: string; label?: string; duration?: number }[];
22
23
  checkpoints: Checkpoint[]; authoring: { label: string; path: string }[];
23
24
  axes: { id: string; label: string; animation: string; min: number; max: number }[];
@@ -27,7 +28,7 @@ export interface ReviewManifest {
27
28
  panels?: JobPanelComposition;
28
29
  }
29
30
  export interface ReviewedSource { readonly packageRevision:string; readonly viewerVersion:string; readonly runtimeVersion:string; readonly rig:{readonly path:string;readonly sha256:string}|null; readonly motion:{readonly path:string;readonly sha256:string}|null; readonly handoff?:HandoffRecord }
30
- export interface ReviewPackage { direction?:DirectionInspection; setsHash?:string; referenceHashes?:Record<string,string>; root: string; manifestPath: string; manifest: ReviewManifest; sourceHash: string; reviewedSource:ReviewedSource; files: Set<string>; report:ReportSeeds|null; feedbackCatalog:FeedbackCatalog;
31
+ export interface ReviewPackage { scene?:SceneInspection; direction?:DirectionInspection; setsHash?:string; referenceHashes?:Record<string,string>; root: string; manifestPath: string; manifest: ReviewManifest; sourceHash: string; reviewedSource:ReviewedSource; files: Set<string>; report:ReportSeeds|null; feedbackCatalog:FeedbackCatalog;
31
32
  /** The resolved producer handoff (#101) and, when there is none, the refusal line naming where it was looked for. */
32
33
  handoff: Handoff|null; handoffReason: string|null; handoffInputs?: HandoffFlags;
33
34
  /** #187: the rig-parts build root ({@link isBuildRoot}) whose `check/` this package is, however it was opened; review state stays outside it. */
@@ -76,6 +77,7 @@ export function parseManifest(input: unknown): ReviewManifest {
76
77
  schema: 'rig-review/1', id: id(m.id, 'id'), title: string(m.title, 'title'), revision: string(m.revision, 'revision'),
77
78
  model: m.model === undefined ? undefined : packagePath(m.model, 'model'),
78
79
  ...(m.direction===undefined?{}:{direction:packagePath(m.direction,'direction')}),
80
+ ...(m.scene===undefined?{}:{scene:packagePath(m.scene,'scene')}),
79
81
  ...(m.sets===undefined?{}:{sets:packagePath(m.sets,'sets')}),
80
82
  motion:m.motion===undefined?undefined:packagePath(m.motion,'motion'),
81
83
  references: list(m.references, 'references', (v,f) => ({ id:id(v.id,f+'.id'), label:string(v.label,f+'.label'), type:choice(v.type,['image','video','pose'],f+'.type'), path:packagePath(v.path,f+'.path'), width:v.width===undefined?undefined:number(v.width,f+'.width',Number.EPSILON), height:v.height===undefined?undefined:number(v.height,f+'.height',Number.EPSILON) })),
@@ -89,6 +91,7 @@ export function parseManifest(input: unknown): ReviewManifest {
89
91
  };
90
92
  if(manifest.model&&!manifest.model.endsWith('.model.json'))fail('model','compiled model path ending .model.json (the play runtime input)');
91
93
  if(manifest.sets&&!manifest.model)fail('sets','compiled model declaration');
94
+ if(manifest.scene&&!manifest.direction)throw new Error('SCENE_REQUIRED: scene requires direction');
92
95
  if(manifest.direction&&!manifest.model)fail('direction','compiled model declaration');
93
96
  for (const c of manifest.checkpoints) { if(c.reference && !manifest.references.some(r=>r.id===c.reference)) fail(`checkpoint ${c.id}.reference`,'declared reference id'); if(c.animation && !manifest.animations.some(a=>a.id===c.animation)) fail(`checkpoint ${c.id}.animation`,'declared animation id'); }
94
97
  for (const c of manifest.audio.cues) { if(!manifest.audio.clips.some(a=>a.id===c.clip)) fail(`cue ${c.id}.clip`,'declared audio clip id'); if(c.animation && !manifest.animations.some(a=>a.id===c.animation)) fail(`cue ${c.id}.animation`,'declared animation id'); }
@@ -132,9 +135,25 @@ export async function loadReview(input: string, options: { handoff?: HandoffFlag
132
135
  const {handoff,reason:handoffReason}=await resolveHandoff(root,manifest.producer,options.handoff,{starts:[options.cwd??process.cwd()]});
133
136
  // #329: the source painting the handoff knows is the first reference, outside the package's own files.
134
137
  const painting=sourcePainting(manifest,handoff,directory);
138
+ let scene:SceneInspection|undefined;
139
+ const sceneBytes=new Map<string,Buffer>();
140
+ if(manifest.scene){
141
+ let bytes:Buffer;try{bytes=await readFile(await safeFile(root,manifest.scene));}catch{throw new Error('SCENE_REQUIRED: '+manifest.scene);}
142
+ if(bytes.length>DIRECTION_MAX_BYTES)throw new Error('SCENE_SOURCE_MISMATCH: '+manifest.scene);
143
+ const dirBytes=await readFile(await safeFile(root,manifest.direction!));
144
+ const direction=readDirectionInspection(JSON.parse(dirBytes.toString()),{path:manifest.direction!,sha256:createHash('sha256').update(dirBytes).digest('hex')},{path:manifest.model!,sha256:modelBytesHash!});
145
+ const sha256=createHash('sha256').update(bytes).digest('hex');
146
+ if(direction.scene?.path!==manifest.scene||direction.scene.sha256!==sha256)throw new Error('SCENE_SOURCE_MISMATCH: '+manifest.scene);
147
+ const model=object(JSON.parse((await readFile(await safeFile(root,manifest.model!))).toString()),'model');
148
+ let sceneInput:unknown;try{sceneInput=JSON.parse(bytes.toString());}catch{throw new Error('SCENE_SOURCE_MISMATCH: '+manifest.scene);}
149
+ scene=readSceneInspection(sceneInput,{path:manifest.scene,sha256},direction,model);
150
+ sceneBytes.set(manifest.scene,bytes);sceneBytes.set(manifest.direction!,dirBytes);
151
+ for(const [path,bytes] of await scenePlateBytes(root,scene))sceneBytes.set(path,bytes);
152
+ for(const path of sceneBytes.keys())files.add(path);
153
+ }
135
154
  const hash = createHash('sha256');hash.update(JSON.stringify(manifest));hash.update('\0');const fileHashes=new Map<string,string>();
136
155
  for(const p of [...files].sort()) { const full=await safeFile(root,p); const before=await stat(full); hash.update(p);hash.update('\0');hash.update(String(before.size));hash.update('\0'); const fileHash=createHash('sha256');const metadataChunks:Buffer[]=[];const isDirection=p===manifest.direction;let bytesRead=0;
137
- if(isDirection&&before.size>DIRECTION_MAX_BYTES)throw new Error('DIRECTION_SIZE: direction exceeds 256 KiB');for await(const chunk of createReadStream(full)){hash.update(chunk);fileHash.update(chunk);if(isDirection&&(bytesRead+=chunk.length)>DIRECTION_MAX_BYTES)throw new Error('DIRECTION_SIZE: direction exceeds 256 KiB');if(p===reportPath||p===manifest.model||isDirection)metadataChunks.push(chunk);}fileHashes.set(p,fileHash.digest('hex')); const after=await stat(full); if(before.size!==after.size||before.mtimeMs!==after.mtimeMs) throw new Error(`Asset ${p} changed while hashing; retry with stable package inputs`);
156
+ if(isDirection&&before.size>DIRECTION_MAX_BYTES)throw new Error('DIRECTION_SIZE: direction exceeds 256 KiB');for await(const chunk of createReadStream(full)){hash.update(chunk);fileHash.update(chunk);if(isDirection&&(bytesRead+=chunk.length)>DIRECTION_MAX_BYTES)throw new Error('DIRECTION_SIZE: direction exceeds 256 KiB');if(p===reportPath||p===manifest.model||isDirection)metadataChunks.push(chunk);}fileHashes.set(p,fileHash.digest('hex'));if(sceneBytes.has(p)&&createHash('sha256').update(sceneBytes.get(p)!).digest('hex')!==fileHashes.get(p))throw new Error('SCENE_SOURCE_MISMATCH: '+p); const after=await stat(full); if(before.size!==after.size||before.mtimeMs!==after.mtimeMs) throw new Error(`Asset ${p} changed while hashing; retry with stable package inputs`);
138
157
  // The parser and package hash consume the same bytes, never two file reads.
139
158
  if(p===manifest.model){if(fileHashes.get(p)!==modelBytesHash)throw new Error(`Model ${p} changed while hashing; retry with stable package inputs`);modelMetadata=object(JSON.parse(Buffer.concat(metadataChunks).toString('utf8')),'model');}
140
159
  if(isDirection)directionInput=JSON.parse(Buffer.concat(metadataChunks).toString('utf8'));
@@ -146,7 +165,7 @@ export async function loadReview(input: string, options: { handoff?: HandoffFlag
146
165
  const reviewedSource:ReviewedSource={packageRevision:manifest.revision,...await toolVersions(),rig:rigPath?{path:rigPath,sha256:fileHashes.get(rigPath)!}:null,motion:motionPath?{path:motionPath,sha256:fileHashes.get(motionPath)!}:null,...(handoff?{handoff:handoff.record}:{})};
147
166
  const direction=manifest.direction?readDirectionInspection(directionInput,{path:manifest.direction,sha256:fileHashes.get(manifest.direction)!},reviewedSource.rig):undefined;
148
167
  const feedbackCatalog:FeedbackCatalog={rig:manifest.id,bones:modelNames(modelMetadata,'bones'),slots:modelNames(modelMetadata,'slots'),animations:modelAnimations(modelMetadata),clock:report?.clock??null,clockAnimation:report?.animation??null,...(discoverTurnDials(modelMetadata).length?{turnDials:discoverTurnDials(modelMetadata)}:{})};
149
- return {...(direction?{direction}:{}),...(manifest.sets?{setsHash:fileHashes.get(manifest.sets)!}:{}),referenceHashes:Object.fromEntries(manifest.references.map(r=>[r.id,r.id===painting?.id?painting.sha256:fileHashes.get(r.path)!])),root,manifestPath,manifest,sourceHash:hash.digest('hex'),reviewedSource,files,report,feedbackCatalog,handoff,handoffReason,...(handoff?.flags?{handoffInputs:handoff.flags}:{}),...(buildRoot?{buildRoot}:{}),...(painting?{sourcePainting:painting}:{}),...(options.cwd?{cwd:options.cwd}:{})};
168
+ return {...(scene?{scene}:{}),...(direction?{direction}:{}),...(manifest.sets?{setsHash:fileHashes.get(manifest.sets)!}:{}),referenceHashes:Object.fromEntries(manifest.references.map(r=>[r.id,r.id===painting?.id?painting.sha256:fileHashes.get(r.path)!])),root,manifestPath,manifest,sourceHash:hash.digest('hex'),reviewedSource,files,report,feedbackCatalog,handoff,handoffReason,...(handoff?.flags?{handoffInputs:handoff.flags}:{}),...(buildRoot?{buildRoot}:{}),...(painting?{sourcePainting:painting}:{}),...(options.cwd?{cwd:options.cwd}:{})};
150
169
  }
151
170
 
152
171
  /** #329: the reference id and served path of the handoff's source painting; the path is a name, never a package file. */
package/src/open.ts CHANGED
@@ -15,7 +15,6 @@ import {startServer} from './server.ts';
15
15
  import {startCompareServer} from './compare-server.ts';
16
16
  import {selectAnimation,AnimationSelectionError,type AnimationSelection} from './animation-selection.ts';
17
17
  import {capabilityHeader,capabilityPattern,type OpenIdentity} from './open-protocol.ts';
18
- import {ensureFront,frontPort} from './front.ts';
19
18
  import {playBuildConditions} from './build.ts';
20
19
  import {playPackagePath} from './versions.ts';
21
20
  import {HandoffError,HANDOFF_FLAGS,isBuildRoot,type HandoffFlags,type HandoffRecord} from './handoff.ts';
@@ -150,12 +149,12 @@ export async function prepareOpenTarget(inputs: OpenInputs, options: OpenOptions
150
149
  return {package:p,key,fingerprint,stateDir,viewOnly,cwd:resolve(options.cwd??process.cwd()),build};
151
150
  }
152
151
  export async function openReview(inputs:OpenInputs,options:OpenOptions={}):Promise<{url:string;reused:boolean;nonce:string;inputs:OpenInputs;selection:AnimationSelection|null;direct:boolean;build:BuildOpen|null}>{
153
- const direct=options.direct??inputs.direct??false,port=direct?0:frontPort(options.frontPort);
152
+ const direct=true;
154
153
  const prepared=await prepareOpenTarget(inputs,options);
155
154
  const {package:p,key,fingerprint,stateDir,viewOnly,build}=prepared;
156
155
  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');
157
156
  const worker=await ensureWorker(p,key,fingerprint,stateDir,canonicalControl,options.idleMs??DEFAULT_UNOPENED_TIMEOUT_MS,options.graceMs,viewOnly,options.cwd);
158
- const url=direct?openUrl(worker.row):openUrl(worker.row,await ensureFront({control:canonicalControl,port,fingerprint,idleMs:options.frontIdleMs}));
157
+ const url=openUrl(worker.row);
159
158
  // #149: the check package of a rig-parts build root says which package it opened and which config the handoff took.
160
159
  return {url,reused:worker.reused,nonce:worker.row.nonce,inputs:p.inputs,selection:p.selection,direct,build};
161
160
  }
@@ -0,0 +1,50 @@
1
+ /** Closed, byte-bound inspection of Create's scene@1. Project authority remains Create-owned. */
2
+ import {createHash} from 'node:crypto';
3
+ import {readFile} from 'node:fs/promises';
4
+ import {object, packagePath, safeFile} from './manifest.ts';
5
+ import {sceneDocumentShape} from './interview-scene.ts';
6
+ import type {DirectionInspection} from './direction-inspection.ts';
7
+ export type SceneBox = {x:number;y:number;width:number;height:number};
8
+ type Binding = {path:string;sha256:string};
9
+ export interface SceneInspection {
10
+ file:Binding;n:number;rigVersion:number;animation:string;stage:SceneBox;
11
+ plates:{role:'background'|'foreground';path:string;sha256:string;width:number;height:number;rect:SceneBox}[];
12
+ }
13
+ const fail=(code:string,field:string):never=>{throw new Error(`${code}: ${field}`);};
14
+ const hash=(bytes:Buffer)=>createHash('sha256').update(bytes).digest('hex');
15
+ /** Parse the full closed shape before opening its declared plate files. */
16
+ export function readSceneInspection(value:unknown,file:Binding,direction:DirectionInspection,model:Record<string,unknown>):SceneInspection{
17
+ let d:Record<string,unknown>;try{d=object(value,'scene');}catch{return fail('SCENE_SOURCE_MISMATCH',file.path);}
18
+ if(Array.isArray(d.plates))for(const raw of d.plates){let p:Record<string,unknown>;try{p=object(raw,'scene.plate');}catch{return fail('SCENE_SOURCE_MISMATCH','scene.plate');}
19
+ if(!Number.isSafeInteger(p.width)||!Number.isSafeInteger(p.height)||Number(p.width)<=0||Number(p.height)<=0)fail('SCENE_PLATE_DIMENSIONS',String(p.path));}
20
+ if(!sceneDocumentShape(d,direction.scene?.n))fail('SCENE_SOURCE_MISMATCH',file.path);
21
+ const r=object(d.rig,'scene.rig'),m=object(r.model,'scene.rig.model'),anim=object(r.animation,'scene.rig.animation');
22
+ if(r.version!==direction.rigVersion||m.path!==direction.model.path||m.sha256!==direction.model.sha256)fail('SCENE_MODEL_MISMATCH',file.path);
23
+ if(!Array.isArray(model.animations)||!model.animations.some(v=>object(v,'animation').name===anim.name))fail('SCENE_ANIMATION_MISSING',String(anim.name));
24
+ const f=object(d.frame,'scene.frame'),stage=object(f.stage,'scene.frame.stage') as SceneBox;
25
+ const modelStage=object(model.stage,'model.stage');
26
+ if(Object.entries(stage).some(([k,v])=>!Number.isFinite(v)||modelStage[k]!==v)||stage.width<=0||stage.height<=0)fail('SCENE_MODEL_MISMATCH','scene.frame');
27
+ if((d.plates as unknown[]).length<1||(d.plates as unknown[]).length>2)fail('SCENE_LAYER_ORDER','scene.plates');
28
+ const plates:SceneInspection['plates']=(d.plates as unknown[]).map((raw,index)=>{
29
+ const name=`scene.plates[${index}]`,row=object(raw,name);
30
+ let path:string;try{path=packagePath(row.path,name);}catch{return fail('SCENE_SOURCE_MISMATCH',name);}
31
+ const b={path,sha256:String(row.sha256)},rect=object(row.rect,name+'.rect') as SceneBox;
32
+ const x=rect.width*Number(row.height),y=rect.height*Number(row.width);
33
+ if(!Object.values(rect).every(Number.isFinite)||rect.width<=0||rect.height<=0||!Number.isFinite(x)||!Number.isFinite(y)||Math.abs(x-y)>1e-9*Math.max(Math.abs(x),Math.abs(y)))fail('SCENE_PLATE_DIMENSIONS',b.path);
34
+ return {role:row.role as 'background'|'foreground',...b,width:Number(row.width),height:Number(row.height),rect};
35
+ });
36
+ const expected=plates.length===2?['background','rig','foreground']:['background','rig'];
37
+ if(plates.filter(p=>p.role==='background').length!==1||plates.filter(p=>p.role==='foreground').length!==plates.length-1||JSON.stringify(d.layers)!==JSON.stringify(expected)||new Set(plates.map(p=>p.path)).size!==plates.length||new Set(plates.map(p=>p.sha256)).size!==plates.length)fail('SCENE_LAYER_ORDER','scene.layers');
38
+ return {file,n:Number(d.n),rigVersion:Number(r.version),animation:String(anim.name),stage,plates};
39
+ }
40
+ /** Read contained plate bytes once; these exact bytes subsequently enter the package hash. */
41
+ export async function scenePlateBytes(root:string,scene:SceneInspection):Promise<Map<string,Buffer>>{
42
+ const result=new Map<string,Buffer>();
43
+ for(const plate of scene.plates){
44
+ let bytes:Buffer;try{bytes=await readFile(await safeFile(root,plate.path));}catch{return fail('SCENE_REQUIRED',plate.path);}
45
+ if(hash(bytes)!==plate.sha256)fail('SCENE_PLATE_CHANGED',plate.path);
46
+ if(bytes.length<24||bytes.subarray(0,8).toString('hex')!=='89504e470d0a1a0a'||bytes.toString('ascii',12,16)!=='IHDR'||bytes.readUInt32BE(16)!==plate.width||bytes.readUInt32BE(20)!==plate.height)fail('SCENE_PLATE_DIMENSIONS',plate.path);
47
+ result.set(plate.path,bytes);
48
+ }
49
+ return result;
50
+ }
package/src/server.ts CHANGED
@@ -215,7 +215,7 @@ export async function createReviewRequestContext(p: ReviewPackage | null, option
215
215
  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'}"`}});
216
216
  }
217
217
  if(req.method!=='GET'&&req.method!=='HEAD')return json({error:'Method not allowed'},405);
218
- 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:{...(joined?.available?{interview:true}:{}),...(joined?.draft?{preRig:true}:{}),playback:!!p.manifest.model,modeling:false,motion:false,feedback:!joined?.draft,audio:true}});}
218
+ if(url.pathname==='/api/review'){await unchanged();return json({manifest:p.manifest,...(p.scene?{scene:p.scene}:{}),...(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:{...(joined?.available?{interview:true}:{}),...(joined?.draft?{preRig:true}:{}),playback:!!p.manifest.model,modeling:false,motion:false,feedback:!joined?.draft,audio:true}});}
219
219
  if(url.pathname==='/api/session'){await unchanged();return json(await readSession(p,options.stateDir));}
220
220
  if(url.pathname==='/api/rebuild')return json(await rebuilds.describe());
221
221
  if(url.pathname==='/api/rebuild/history')return json(await rebuilds.history());
package/web/catalog-en.ts CHANGED
@@ -1,4 +1,14 @@
1
1
  export const enCatalog: Readonly<Record<string, string>> = {
2
+ "JOB_DIRECTION_MISSING": "JOB_DIRECTION_MISSING",
3
+ "job.refusal.JOB_DIRECTION_MISSING": "This post has no direction. The producer must publish direction data with the model.",
4
+ "JOB_PARTS_MISSING": "JOB_PARTS_MISSING",
5
+ "job.refusal.JOB_PARTS_MISSING": "This draft has no parts. The producer must publish the draft parts before requesting a parts review.",
6
+ "JOB_MODEL_MISSING": "JOB_MODEL_MISSING",
7
+ "job.refusal.JOB_MODEL_MISSING": "This request has no compiled model. The producer must publish a compiled model before requesting a rig verdict.",
8
+ "JOB_ASK_UNSUPPORTED": "JOB_ASK_UNSUPPORTED",
9
+ "job.refusal.JOB_ASK_UNSUPPORTED": "This request lacks a supported source or checkpoint mapping. The producer must publish the matching source and plan mapping before asking again.",
10
+ "Comment · C": "Comment · C",
11
+
2
12
  "project.json": "project.json",
3
13
  'job.commentsFromWorkspace': 'Comments from the workspace are included. Close this request to add or edit comments.',
4
14
  'Add general comment': 'Add general comment',
@@ -29,8 +39,6 @@ export const enCatalog: Readonly<Record<string, string>> = {
29
39
  "PARTS_MESH_GENERATED": "PARTS_MESH_GENERATED",
30
40
  "PARTS_MESH_GENERATED: No mesh geometry is available for this part.": "PARTS_MESH_GENERATED: No mesh geometry is available for this part.",
31
41
  "JOB_STILL_CAPTURE_FAILED": "JOB_STILL_CAPTURE_FAILED · The displayed Rig frame could not be captured. Wait for a successful draw and try again.",
32
- "JOB_STILL_CAMERA_NOT_FIXED": "JOB_STILL_CAMERA_NOT_FIXED · Restore the default Rig framing before submitting this verdict.",
33
- "JOB_STILL_VIEW_UNSUPPORTED": "JOB_STILL_VIEW_UNSUPPORTED · Show the whole Rig without solo, highlight or comparison layers before submitting.",
34
42
  "JOB_STILL_BINDING_MISMATCH": "JOB_STILL_BINDING_MISMATCH · The displayed source, page or drawn frame changed. Start a new verdict attempt.",
35
43
  "JOB_REVIEW_READ_ONLY": "JOB_REVIEW_READ_ONLY · This job subject is read only here: producer tools and rebuilds are unavailable.",
36
44
  "JOB_ACT_NOTHING_TO_SUBMIT": "JOB_ACT_NOTHING_TO_SUBMIT · Choose Approve, Changes requested or a checkpoint outcome before submitting.",
@@ -193,6 +201,20 @@ export const enCatalog: Readonly<Record<string, string>> = {
193
201
  "DIRECTION_SOURCE_CHANGED: undeclared playback input": "DIRECTION_SOURCE_CHANGED: undeclared playback input",
194
202
  "DIRECTION_SOURCE_CHANGED: playback bytes differ from the bound SHA-256": "DIRECTION_SOURCE_CHANGED: playback bytes differ from the bound SHA-256",
195
203
  "direction.title": "Direction inspection",
204
+ 'direction.planes': 'Plates: {0}',
205
+ 'direction.threePlanes': 'background → rig → foreground',
206
+ 'direction.twoPlanes': 'background → rig',
207
+ 'direction.noScene': 'Plain rig view: this publication does not declare a scene.',
208
+ 'direction.legacyTake': 'Plain rig view: direction@1 has no scene composition.',
209
+ "scene.required": "SCENE_REQUIRED: {0}",
210
+ "scene.plateChanged": "SCENE_PLATE_CHANGED: {0}",
211
+ "scene.plateDimensions": "SCENE_PLATE_DIMENSIONS: {0}",
212
+ "scene.canvasRequired": "SCENE_REQUIRED: canvas renderer required.",
213
+ "direction.summary": "Direction{0} · {1} s · {2} · {3}",
214
+ "direction.loop": "loop",
215
+ "direction.once": "once",
216
+ "direction.fixedCamera": "fixed camera",
217
+ "direction.movingCamera": "moving camera",
196
218
  "direction.inspected": "Inspected model · {0} · SHA-256 {1}",
197
219
  "direction.scratch": "Scratch model · {0} · SHA-256 {1}",
198
220
  "direction.modelUnavailable": "MODEL_UNAVAILABLE · No compiled model loaded.",
@@ -3447,27 +3469,30 @@ export const enCatalog: Readonly<Record<string, string>> = {
3447
3469
  "CHECKPOINT_EVIDENCE_HASH_MISMATCH": "CHECKPOINT_EVIDENCE_HASH_MISMATCH",
3448
3470
  "CHECKPOINT_EVIDENCE_PNG_INVALID": "CHECKPOINT_EVIDENCE_PNG_INVALID",
3449
3471
  "CHECKPOINT_EVIDENCE_TABLE_INVALID": "CHECKPOINT_EVIDENCE_TABLE_INVALID",
3450
- "job.imageSetTitle": "Image comparison",
3451
- "job.imageSetDigest": "Image set SHA-256",
3452
3472
  "job.imageNote": "Optional image note",
3453
3473
  "job.imageRole.source": "Source",
3454
3474
  "job.imageRole.candidate": "Candidate",
3455
3475
  "job.imageRole.reference": "Reference",
3456
3476
  "job.identicalImages": "Identical bytes appear elsewhere in this set.",
3457
- "image-set": "image-set",
3458
3477
  "plate-adoption": "plate-adoption",
3459
3478
  "image-review": "image-review",
3460
- "rig-review-job-image-set/1": "rig-review-job-image-set/1",
3461
- "JOB_IMAGE_SET_UNSUPPORTED": "JOB_IMAGE_SET_UNSUPPORTED",
3462
- "JOB_IMAGE_SET_INVALID": "JOB_IMAGE_SET_INVALID",
3463
- "JOB_IMAGE_SET_DUPLICATE_NAME": "JOB_IMAGE_SET_DUPLICATE_NAME",
3464
- "JOB_IMAGE_SET_DUPLICATE_PATH": "JOB_IMAGE_SET_DUPLICATE_PATH",
3465
- "JOB_IMAGE_SET_ROLE_INVALID": "JOB_IMAGE_SET_ROLE_INVALID",
3466
- "JOB_IMAGE_SET_PATH_REFUSED": "JOB_IMAGE_SET_PATH_REFUSED",
3467
3479
  "JOB_ASK_INVALID": "JOB_ASK_INVALID",
3468
3480
  "JOB_ASK_SUPERSEDED": "JOB_ASK_SUPERSEDED",
3469
3481
  "JOB_AUTHORITY_REFUSED": "JOB_AUTHORITY_REFUSED",
3470
3482
  "JOB_BODY_LIMIT": "JOB_BODY_LIMIT",
3483
+ "client: submission": "client: submission",
3484
+ "client: event stream": "client: event stream",
3485
+ "client: preload": "client: preload",
3486
+ "{0} {1} \u00b7 {2} bytes \u00b7 HTTP {3}": "{0} {1} \u00b7 {2} bytes \u00b7 HTTP {3}",
3487
+ "job.submit.refused": "The request was refused — refresh the review, check the pending request and try again.",
3488
+ "job.submit.JOB_ACT_NOTHING_TO_SUBMIT": "No decision was selected — choose Approved, Changes requested or a checkpoint outcome.",
3489
+ "job.submit.JOB_STILL_CAPTURE_FAILED": "The rig image could not be captured — wait for the rig to finish drawing and try again.",
3490
+ "job.submit.JOB_STILL_BINDING_MISMATCH": "The displayed frame or source changed — wait for the current rig to load and submit again.",
3491
+ "job.submit.JOB_BODY_LIMIT": "The images attached to your comments or the rig still make this review too large to send — remove some image comments, or keep the draft until this is fixed.",
3492
+ "job.submit.JOB_ACT_SOURCE_STALE": "The review source changed — refresh the review and inspect the current source before submitting.",
3493
+ "job.submit.JOB_STILL_UNAVAILABLE": "The retained rig image is unavailable — reopen the current rig review and try again.",
3494
+ "job.submit.JOB_STILL_OUTPUT_FAILED": "The rig image could not be saved — ask the host operator to check the output destination.",
3495
+ "Review was not submitted: {0}": "Review was NOT submitted: {0}",
3471
3496
  "JOB_CAPABILITY_REQUIRED": "JOB_CAPABILITY_REQUIRED",
3472
3497
  "JOB_CLOSED": "JOB_CLOSED",
3473
3498
  "JOB_CURSOR_INVALID": "JOB_CURSOR_INVALID",
@@ -3513,21 +3538,6 @@ export const enCatalog: Readonly<Record<string, string>> = {
3513
3538
  "JOB_SOURCE_MISMATCH": "JOB_SOURCE_MISMATCH",
3514
3539
  "JOB_SOURCE_UNRETAINABLE": "JOB_SOURCE_UNRETAINABLE",
3515
3540
  "JOB_STORAGE_FAILED": "JOB_STORAGE_FAILED",
3516
- "rig-review-job-hub/1": "rig-review-job-hub/1",
3517
- "JOB_HUB_ALREADY_RUNNING": "JOB_HUB_ALREADY_RUNNING",
3518
- "JOB_HUB_EXTERNAL_HOST": "JOB_HUB_EXTERNAL_HOST",
3519
- "JOB_HUB_HOST_UNRESPONSIVE": "JOB_HUB_HOST_UNRESPONSIVE",
3520
- "JOB_HUB_CLOSED": "JOB_HUB_CLOSED",
3521
- "JOB_HUB_LIMIT": "JOB_HUB_LIMIT",
3522
- "JOB_HUB_STATE_INVALID": "JOB_HUB_STATE_INVALID",
3523
- "JOB_HUB_REQUEST_REFUSED": "JOB_HUB_REQUEST_REFUSED",
3524
- "rig-review-job-hub-ready/1": "rig-review-job-hub-ready/1",
3525
- "rig-review-job-hub-visibility/1": "rig-review-job-hub-visibility/1",
3526
- "job.hubTitle": "Review jobs",
3527
- "job.hubJobs": "Review jobs",
3528
- "job.hubHint": "Select a job. Drafts stay with their original source.",
3529
- "job.hubClosed": "Explicitly closed",
3530
- "job.hubPending": "Active · {0} pending asks",
3531
3541
  "JOB_STREAM_FAILED": "JOB_STREAM_FAILED",
3532
3542
  "JOB_STREAM_INCOMPLETE": "JOB_STREAM_INCOMPLETE",
3533
3543
  "JOB_UNKNOWN": "JOB_UNKNOWN",