rig-review 2.8.0 → 3.7.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/DESIGN.md +1 -1
- package/docs/REVIEW_PACKAGE.md +2 -2
- package/docs/STABILITY.md +1 -1
- package/docs/WORKFLOWS.md +1 -1
- package/package.json +3 -3
- package/skills/rig-review/SKILL.md +1 -1
- package/src/build.ts +10 -2
- package/src/front.ts +2 -1
- package/src/job-contract.ts +1 -1
- package/src/open-workspace-launch.ts +2 -2
- package/src/open.ts +2 -1
- package/src/versions.ts +7 -7
- package/web/catalog-en.ts +1 -1
- package/web/catalog-ko.ts +1 -1
package/docs/DESIGN.md
CHANGED
|
@@ -162,7 +162,7 @@ their missing consumer contracts; no tools are fabricated for them.
|
|
|
162
162
|
- **One standing window and owner visual gate.** Every owner visual, question, choice, correction and verdict goes through one standing Review window/link plus one what-to-look-at line. Internal agent and HQ media remain internal. A missing required visual (`visual.status` set to `'unavailable'`) is an immediate stop plus a Create-filed on-path Review card, never a chat fallback.
|
|
163
163
|
- **Human UI authority vs agent verbs.** People submit finalized acts through the browser UI (`actor` set to `'human'`, `channel` set to `'review-ui'`) under a bootstrap-declared `reviewer` (`id` and `role` as `'owner'` or `'delegate'`). That reviewer binding is declared by trusted host bootstrap, cannot be typed or overridden in the browser UI, represents provenance rather than keyboard-user authentication, and maps to Create's existing `by` authority. Agents use `publish`, `ask`, `next` and `close` with `expectedGeneration` CAS and `idempotencyKey`. `publish` requires an explicit producer-held freeze (`freeze.kind` set to `'producer-held'`, `holdId`, `record`) held until acknowledgment as a caller obligation, with no watched-root or automatic-close guarantee. Only explicit `close` ends an active job.
|
|
164
164
|
- **Exact displayed source, cursor replay and draft retention.** Finalized acts and job events replay through durable cursors (`next` and `subscribeJob`). The daemon derives `JobSourceBinding` from validated retained bytes and the page-scoped `displayedNonce` receipt rather than browser-supplied hashes. When a new publication updates the displayed source, old local drafts remain retained for their original source binding and are flagged without rebinding onto the new publication.
|
|
165
|
-
- **Enabled vs reserved act kinds.** Five act kinds are enabled (`interview-picks`, `checkpoint`, `parts-verdict`, `review-verdict`, `signoff`) while `described-correction` (awaiting the joint [Create #182](https://github.com/rig-c/create/issues/182) context allowlist) and `mesh-edit` (awaiting the joint [Parts #1159](https://github.com/rig-c/parts/issues/1159) freeze) stay reserved and disabled (`JOB_ACT_KIND_DISABLED`). Checkpoint acts carry `pass` or `fail` only (`pending` is UI draft only) and require `words` as a string preserved verbatim including empty or whitespace-only text, with `planStepId` copied by the daemon from the validated ask and stage derived by Create. Signoff acts carry `approved` only with required verbatim `words` (empty or whitespace-only allowed) and remain separate from verdicts and Create stage transitions. Plan-bound signoffs (`plan-approved`, `rigging-interview`, `post-interview`) and checkpoints use step IDs and hashes published by [Create #184](https://github.com/rig-c/create/issues/184) without Review recomputing `stepHash`. C4 binds the exact public `partsFileReferences(dir)` array from `@rig-c/parts/src/parts.ts`, whose contract is frozen at Parts 2.25.0. The trusted host resolves an installed version in `JOB_PARTS_ENUMERATOR_RANGE` (`>=2.25.0 <
|
|
165
|
+
- **Enabled vs reserved act kinds.** Five act kinds are enabled (`interview-picks`, `checkpoint`, `parts-verdict`, `review-verdict`, `signoff`) while `described-correction` (awaiting the joint [Create #182](https://github.com/rig-c/create/issues/182) context allowlist) and `mesh-edit` (awaiting the joint [Parts #1159](https://github.com/rig-c/parts/issues/1159) freeze) stay reserved and disabled (`JOB_ACT_KIND_DISABLED`). Checkpoint acts carry `pass` or `fail` only (`pending` is UI draft only) and require `words` as a string preserved verbatim including empty or whitespace-only text, with `planStepId` copied by the daemon from the validated ask and stage derived by Create. Signoff acts carry `approved` only with required verbatim `words` (empty or whitespace-only allowed) and remain separate from verdicts and Create stage transitions. Plan-bound signoffs (`plan-approved`, `rigging-interview`, `post-interview`) and checkpoints use step IDs and hashes published by [Create #184](https://github.com/rig-c/create/issues/184) without Review recomputing `stepHash`. C4 binds the exact public `partsFileReferences(dir)` array from `@rig-c/parts/src/parts.ts`, whose contract is frozen at Parts 2.25.0. The trusted host resolves an installed version in `JOB_PARTS_ENUMERATOR_RANGE` (`>=2.25.0 <4.0.0`), supplies its actual version and official callback through `partsEnumerator`, and declares `partsEnumeratorId`. `JobPartsIdentity.enumeratorVersion` carries that actual version. Manifest paths are work-root-relative and image paths are relative to the manifest directory. Each image carries `path`, bounded-string `role` and raw-byte `sha256`. Review compares the claimed array positionally with the official array, preserving its role/order/duplicate semantics. Upstream roles include `part`, `alternate`, `depth`, `painting` and `figure_mask`. Review bounds shape and paths, refuses traversal/symlinks, decodes PNGs and hashes retained bytes. Missing references refuse with row, role and path, including a missing sibling figure mask when a render copy exists. Unreferenced extras stay outside this parts identity. Composite source hashes use `rig-review-job-source/2`. Create #184 production reader/projection and official-hook wiring remain pending.
|
|
166
166
|
- **Writer-owned sibling fetch, public host seam and legacy file handoffs.** [Create #182](https://github.com/rig-c/create/issues/182) and [Create #184](https://github.com/rig-c/create/issues/184) own direct writer publication and `fetch-act` reads via a private writer-owned sibling binding outside `project.json` (`writer-owned-sibling-fetch-capability`, pending Create #184 production reader/writer integration), never tracked in version control or unstaged project output, never constructed or carried by agents, dead at explicit `close`, and renewed on each job incarnation. In the public managed-host startup seam (`startJobHost` from `@rig-c/review/job-host`, frozen in [Public API stability](STABILITY.md#managed-owner-host)), hook-bearing host callers declare `readerId`, `bindingId` and `partsEnumeratorId`; equality plus API/act schemas and actual enumerator version govern authenticated active-listener reuse and missing or mismatched IDs refuse by name (`JOB_HOST_OPTION_ID_INVALID`, `JOB_HOST_REUSE_MISMATCH`) with no function hashes. Future mesh acts will be fetched by Create and passed in process to Parts' public exported API owned by [Parts #1159](https://github.com/rig-c/parts/issues/1159) without Parts reading Review or Create storage, while standalone `--delta` remains legacy outside the active cycle. Agents never build, parse, reshape or carry Review session, picks, verdict or applied-record storage files, and existing `--picks-file`, saved verdict path, reshaped feedback JSON and `--verbatim-file` handoffs are legacy/history bypass findings for the active cycle.
|
|
167
167
|
- **Direction scope.** Direction carriage in `#484` is metadata-only and distinct from [Review #482](https://github.com/rig-c/review/issues/482) preview and [Review #483](https://github.com/rig-c/review/issues/483) actual plated take playback, while [Review #373](https://github.com/rig-c/review/issues/373) remains parked.
|
|
168
168
|
|
package/docs/REVIEW_PACKAGE.md
CHANGED
|
@@ -611,7 +611,7 @@ Browser players retain play's default DOM mode and default mesh backend. Rigid
|
|
|
611
611
|
parts remain DOM images; a WebGL mesh label does not claim full-frame GL drawing.
|
|
612
612
|
WebGL is requested by the published default, with Canvas2D as the supported mesh
|
|
613
613
|
fallback. Accurate public actual-flush telemetry requires play 1.11.1 or later;
|
|
614
|
-
this checkout consumes pinned
|
|
614
|
+
this checkout consumes pinned 3.7.0. The consumer does not probe GL or inspect
|
|
615
615
|
private renderer state. The separate Node strip exporter remains Canvas2D.
|
|
616
616
|
|
|
617
617
|
The backend badge is sampled only after successful draw/frame calls. Fresh mesh
|
|
@@ -1148,7 +1148,7 @@ signatures and the host-owned integration example are in
|
|
|
1148
1148
|
- **`review-verdict`.** The original model branch carries `stage` (`'rig-review'` or `'direction-review'`), `verdict` and `words`, requiring a `rig` or `post` selector and non-null `source.model` with runtime stage, selector and direction consistency checks. The HQ-approved #522 image branch uses `'image-review'`, `source.subject = "image-set"`, daemon-derived image identities, digest and duplicate groups, with `model` and `selector` absent. It retains the same human verdict act and supports optional name-bound image notes. [Image-set verdict extension](STABILITY.md#image-set-verdict-extension).
|
|
1149
1149
|
- **`signoff`.** `JobActValues['signoff']` carries `stage` (validated by Create's writer), `decision` restricted to `'approved'` only (changes requested are a verdict, never a signoff) and required `words` preserved verbatim including empty or whitespace-only strings. A verdict, a signoff and a Create stage transition are three separate writes, and `JobAct` grants no transition authority. Every stage in `JOB_PLAN_BOUND_SIGNOFF_STAGES` (`'plan-approved'`, `'rigging-interview'`, `'post-interview'`) requires non-null `source.plan` with exact displayed step IDs and hashes before act creation, while other stages keep `source.plan` nullable where appropriate.
|
|
1150
1150
|
- **Create-published step IDs and hashes.** `JobPlanIdentity` holds `steps` (`id` and `hash`) published by [Create #184](https://github.com/rig-c/create/issues/184) for the displayed plan. Review retains these values without importing or recomputing Create's internal `stepHash`. Create validates them through its existing `steps` and `step_hashes` writer logic, with no separate plan revision hash or additional revision gate in this contract.
|
|
1151
|
-
- **C4 manifest-referenced parts PNG identity.** C4 binds the exact public `partsFileReferences(dir)` array from `@rig-c/parts/src/parts.ts`, whose contract is frozen at Parts 2.25.0. The trusted host resolves an installed version in `JOB_PARTS_ENUMERATOR_RANGE` (`>=2.25.0 <
|
|
1151
|
+
- **C4 manifest-referenced parts PNG identity.** C4 binds the exact public `partsFileReferences(dir)` array from `@rig-c/parts/src/parts.ts`, whose contract is frozen at Parts 2.25.0. The trusted host resolves an installed version in `JOB_PARTS_ENUMERATOR_RANGE` (`>=2.25.0 <4.0.0`), supplies its actual version and official callback through `partsEnumerator`, and declares `partsEnumeratorId`. `JobPartsIdentity.enumeratorVersion` carries that actual version. Manifest paths are work-root-relative and image paths are relative to the manifest directory. Each image carries `path`, bounded-string `role` and raw-byte `sha256`. Review compares the claimed array positionally with the official array, preserving its role/order/duplicate semantics. Upstream roles include `part`, `alternate`, `depth`, `painting` and `figure_mask`. Review bounds shape and paths, refuses traversal/symlinks, decodes PNGs and hashes retained bytes. Missing references refuse with row, role and path, including a missing sibling figure mask when a render copy exists. Unreferenced extras stay outside this parts identity. Composite source hashes use `rig-review-job-source/2`. Create #184 production reader/projection and official-hook wiring remain pending.
|
|
1152
1152
|
|
|
1153
1153
|
### Image-set publication and human comparison
|
|
1154
1154
|
|
package/docs/STABILITY.md
CHANGED
|
@@ -732,7 +732,7 @@ without aliases or copied wire shapes.
|
|
|
732
732
|
|
|
733
733
|
## Parts enumeration boundary
|
|
734
734
|
|
|
735
|
-
C4 binds the exact public `partsFileReferences(dir)` array from `@rig-c/parts/src/parts.ts`, whose contract is frozen at Parts 2.25.0. The trusted host resolves an installed version in `JOB_PARTS_ENUMERATOR_RANGE` (`>=2.25.0 <
|
|
735
|
+
C4 binds the exact public `partsFileReferences(dir)` array from `@rig-c/parts/src/parts.ts`, whose contract is frozen at Parts 2.25.0. The trusted host resolves an installed version in `JOB_PARTS_ENUMERATOR_RANGE` (`>=2.25.0 <4.0.0`), supplies its actual version and official callback through `partsEnumerator`, and declares `partsEnumeratorId`. `JobPartsIdentity.enumeratorVersion` carries that actual version. Manifest paths are work-root-relative and image paths are relative to the manifest directory. Each image carries `path`, bounded-string `role` and raw-byte `sha256`. Review compares the claimed array positionally with the official array, preserving its role/order/duplicate semantics. Upstream roles include `part`, `alternate`, `depth`, `painting` and `figure_mask`. Review bounds shape and paths, refuses traversal/symlinks, decodes PNGs and hashes retained bytes. Missing references refuse with row, role and path, including a missing sibling figure mask when a render copy exists. Unreferenced extras stay outside this parts identity. Composite source hashes use `rig-review-job-source/2`. Create #184 production reader/projection and official-hook wiring remain pending.
|
|
736
736
|
|
|
737
737
|
The directory passed to the public callback holds the retained `parts.json` bytes. The original paths resolve from the directory holding the bound manifest. The host owns the official import and same-installation version check. A supplied version string alone does not authenticate a replaced callback. Review has no Parts runtime dependency and never installs the producer. Its dev-only 2.25.1 fixture is synthetic reference evidence. Missing or out-of-range versions name the required range and received value through `PARTS_ENUMERATOR_VERSION_MISMATCH`. A claimed version differing from the host installation also refuses.
|
|
738
738
|
|
package/docs/WORKFLOWS.md
CHANGED
|
@@ -683,7 +683,7 @@ the source-bound result and deduplicate by `actId`.
|
|
|
683
683
|
- **Explicit producer-held freeze and explicit close.** Every `publish` request designates a root-relative `result` (`path` and `selector`, never a command) and carries an explicit producer-held freeze (`freeze.kind` set to `'producer-held'`, `holdId`, `record` as `JobFileIdentity` or `null` for a declared non-Create root) held until acknowledgment. Review validates retained bytes, detects a moved record (`JOB_RECORD_MOVED`, `JOB_RECORD_INCOMPLETE`, `JOB_FREEZE_REQUIRED`, `JOB_SOURCE_MISMATCH`, `JOB_SOURCE_UNRETAINABLE`, `JOB_ROOT_REPLACED`) and commits local generation CAS (`JOB_GENERATION_STALE`, `JOB_IDEMPOTENCY_CONFLICT`). The freeze assertion is a caller obligation rather than a lock Review can impose on independent writers. Review offers no watched-root or automatic-close guarantee, and only explicit `close` ends an active job.
|
|
684
684
|
- **Exact displayed source and retained drafts.** The daemon derives `JobSourceBinding` from validated retained bytes and the actual displayed publication (`ackDisplayed` returning a page-scoped `displayedNonce` receipt, pinned same-origin `routes` with no mutable current alias). All metadata, images, runtime assets, routes and pending form dependencies prepare before the visible swap; paint and the single `displayedNonce` acknowledgment precede retirement of the previous view, and failed preparation or acknowledgment restores the prior view and draft. Clients never supply trusted source hashes or transfer prior approval onto a new binding. When a new publication updates the displayed source or a browser tab reconnects to the same job, the window shows an explicit changed-version notice, preserves compatible camera, animation, time, repeat, part/solo, reference and panel state (flagging incompatible selections explicitly), and retains old local drafts in storage for their original source binding without rebinding onto the new publication.
|
|
685
685
|
- **Finalized acts, five enabled kinds and cursor replay.** `next` (`after` cursor and bounded abortable `waitMs` that never consumes an act) and `subscribeJob` replay complete durable `JobEvent` records (`published`, `pending`, `act`, `closed`). Only five act kinds are enabled (`interview-picks`, `checkpoint`, `parts-verdict`, `review-verdict`, `signoff`). `described-correction` (awaiting the joint [Create #182](https://github.com/rig-c/create/issues/182) context allowlist) and `mesh-edit` (awaiting the joint [Parts #1159](https://github.com/rig-c/parts/issues/1159) freeze) stay reserved and disabled (`JOB_ACT_KIND_DISABLED`).
|
|
686
|
-
- **Checkpoints, signoffs, plan steps and parts PNGs.** In `checkpoint` acts, `outcome` is `'pass'` or `'fail'` only (`'pending'` stays in the UI draft and never produces a finalized act), and required `words` is preserved verbatim as a string including empty or whitespace-only text. The browser sends `checkpointId`, `outcome` and `words` only while the daemon copies resolved `planStepId` from the validated ask, and Create derives execution stage from its authoritative step phase and order without Review stamping a stage. Only `'pass'` is eligible for Create's checkpoint sign-off writer, while `'fail'` is feedback or a named consumer refusal. In `signoff` acts, `decision` is `'approved'` only (changes requested are a verdict) with required `words` preserved verbatim including empty or whitespace-only text. A verdict, a signoff and a Create stage transition are three separate writes, and plan-bound signoff stages (`plan-approved`, `rigging-interview`, `post-interview`) require `source.plan` with exact displayed step IDs and hashes published by [Create #184](https://github.com/rig-c/create/issues/184) without Review recomputing `stepHash`. C4 binds the exact public `partsFileReferences(dir)` array from `@rig-c/parts/src/parts.ts`, whose contract is frozen at Parts 2.25.0. The trusted host resolves an installed version in `JOB_PARTS_ENUMERATOR_RANGE` (`>=2.25.0 <
|
|
686
|
+
- **Checkpoints, signoffs, plan steps and parts PNGs.** In `checkpoint` acts, `outcome` is `'pass'` or `'fail'` only (`'pending'` stays in the UI draft and never produces a finalized act), and required `words` is preserved verbatim as a string including empty or whitespace-only text. The browser sends `checkpointId`, `outcome` and `words` only while the daemon copies resolved `planStepId` from the validated ask, and Create derives execution stage from its authoritative step phase and order without Review stamping a stage. Only `'pass'` is eligible for Create's checkpoint sign-off writer, while `'fail'` is feedback or a named consumer refusal. In `signoff` acts, `decision` is `'approved'` only (changes requested are a verdict) with required `words` preserved verbatim including empty or whitespace-only text. A verdict, a signoff and a Create stage transition are three separate writes, and plan-bound signoff stages (`plan-approved`, `rigging-interview`, `post-interview`) require `source.plan` with exact displayed step IDs and hashes published by [Create #184](https://github.com/rig-c/create/issues/184) without Review recomputing `stepHash`. C4 binds the exact public `partsFileReferences(dir)` array from `@rig-c/parts/src/parts.ts`, whose contract is frozen at Parts 2.25.0. The trusted host resolves an installed version in `JOB_PARTS_ENUMERATOR_RANGE` (`>=2.25.0 <4.0.0`), supplies its actual version and official callback through `partsEnumerator`, and declares `partsEnumeratorId`. `JobPartsIdentity.enumeratorVersion` carries that actual version. Manifest paths are work-root-relative and image paths are relative to the manifest directory. Each image carries `path`, bounded-string `role` and raw-byte `sha256`. Review compares the claimed array positionally with the official array, preserving its role/order/duplicate semantics. Upstream roles include `part`, `alternate`, `depth`, `painting` and `figure_mask`. Review bounds shape and paths, refuses traversal/symlinks, decodes PNGs and hashes retained bytes. Missing references refuse with row, role and path, including a missing sibling figure mask when a render copy exists. Unreferenced extras stay outside this parts identity. Composite source hashes use `rig-review-job-source/2`. Create #184 production reader/projection and official-hook wiring remain pending.
|
|
687
687
|
- **No agent file carriage, writer-owned sibling fetch and public host seam.** Agents never build, parse, reshape or carry Review session, picks, verdict or applied-record storage files. [Create #182](https://github.com/rig-c/create/issues/182) and [Create #184](https://github.com/rig-c/create/issues/184) own direct writer publication and act fetch through a private writer-owned sibling binding outside `project.json` (`writer-owned-sibling-fetch-capability`, pending Create #184 production reader/writer integration). That binding is never tracked in version control or unstaged project output, dies at explicit `close` with a new grant per job incarnation, and grants read-only `fetch-act` over loopback with `Authorization`. In the public managed-host startup seam (`startJobHost` from `@rig-c/review/job-host`, frozen in [Public API stability](STABILITY.md#managed-owner-host)), hook-bearing host callers declare `readerId` for `readPublished` and `bindingId` for `installWriterBinding` and `partsEnumeratorId` for `partsEnumerator`; missing or invalid IDs refuse with `JOB_HOST_OPTION_ID_INVALID`, and listener reuse requires equal `readerId`, `bindingId` and `partsEnumeratorId` or refuses with `JOB_HOST_REUSE_MISMATCH` (with no function hashes). Future mesh-edit consumption is owned by [Parts #1159](https://github.com/rig-c/parts/issues/1159), where Create fetches a finalized mesh act and passes its typed value in process to Parts' public exported API without Parts reading Review or Create storage.
|
|
688
688
|
- **Direction metadata vs playback.** Direction carriage in `#484` is metadata-only (`source.direction` and `direction-review`) and is distinct from [Review #482](https://github.com/rig-c/review/issues/482) preview and [Review #483](https://github.com/rig-c/review/issues/483) actual plated take playback, while [Review #373](https://github.com/rig-c/review/issues/373) stays parked.
|
|
689
689
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rig-review",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local human rig inspection and structured feedback export",
|
|
6
6
|
"license": "MIT",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@napi-rs/canvas": "1.0.11",
|
|
23
|
-
"@rig-c/play": "
|
|
23
|
+
"@rig-c/play": "3.7.0",
|
|
24
24
|
"@types/pngjs": "6.0.5",
|
|
25
25
|
"pngjs": "7.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@rig-c/parts": "
|
|
28
|
+
"@rig-c/parts": "3.7.0",
|
|
29
29
|
"@types/bun": "^1.3.0",
|
|
30
30
|
"typescript": "^5.9.3"
|
|
31
31
|
},
|
|
@@ -141,7 +141,7 @@ rig-review session close http://127.0.0.1:<port>/jobs/<job-id> \
|
|
|
141
141
|
- **Explicit producer-held freeze and explicit close.** Every `publish` carries an explicit producer-held freeze (`freeze.kind` set to `'producer-held'`, `holdId`, `record` as `JobFileIdentity` or `null` for a declared non-Create root) held until acknowledgment as a caller obligation. Review validates retained bytes, detects a moved record and commits local generation CAS. No watched-root or automatic-close guarantee exists, and only explicit `close` ends an active job.
|
|
142
142
|
- **Exact displayed source, cursor replay and draft retention.** `next` (`after` cursor and bounded abortable `waitMs` that never consumes an act) replays complete durable `JobEvent` items (`published`, `pending`, `act`, `closed`). The daemon derives `JobSourceBinding` from validated retained bytes and the page-scoped `displayedNonce` receipt rather than browser-supplied hashes. When a new publication replaces or updates the displayed source, old local drafts remain retained for their original source binding and are flagged without rebinding onto the new publication.
|
|
143
143
|
- **Five enabled act kinds and two reserved disabled kinds.** Enabled kinds are `interview-picks`, `checkpoint`, `parts-verdict`, `review-verdict` and `signoff`. Reserved kinds `described-correction` (awaiting the joint [Create #182](https://github.com/rig-c/create/issues/182) context allowlist) and `mesh-edit` (awaiting the joint [Parts #1159](https://github.com/rig-c/parts/issues/1159) freeze) stay disabled (`JOB_ACT_KIND_DISABLED`) and cannot be asked or submitted.
|
|
144
|
-
- **Checkpoints, signoffs, plan steps and parts PNGs.** Finalized `checkpoint` acts carry `outcome` `'pass'` or `'fail'` only (`'pending'` stays in the UI draft), require `words` as a string preserved verbatim including empty or whitespace-only text, copy `planStepId` from the validated ask on the daemon while the browser sends `checkpointId`, `outcome` and `words` only, and leave stage derivation to Create (only `'pass'` is eligible for Create's checkpoint sign-off writer). Finalized `signoff` acts carry `decision` `'approved'` only with required `words` preserved verbatim including empty or whitespace-only text, remain separate from verdicts and Create stage transitions, and require `source.plan` with exact displayed step IDs and hashes published by [Create #184](https://github.com/rig-c/create/issues/184) (without Review recomputing `stepHash`) on `plan-approved`, `rigging-interview` and `post-interview`. C4 binds the exact public `partsFileReferences(dir)` array from `@rig-c/parts/src/parts.ts`, whose contract is frozen at Parts 2.25.0. The trusted host resolves an installed version in `JOB_PARTS_ENUMERATOR_RANGE` (`>=2.25.0 <
|
|
144
|
+
- **Checkpoints, signoffs, plan steps and parts PNGs.** Finalized `checkpoint` acts carry `outcome` `'pass'` or `'fail'` only (`'pending'` stays in the UI draft), require `words` as a string preserved verbatim including empty or whitespace-only text, copy `planStepId` from the validated ask on the daemon while the browser sends `checkpointId`, `outcome` and `words` only, and leave stage derivation to Create (only `'pass'` is eligible for Create's checkpoint sign-off writer). Finalized `signoff` acts carry `decision` `'approved'` only with required `words` preserved verbatim including empty or whitespace-only text, remain separate from verdicts and Create stage transitions, and require `source.plan` with exact displayed step IDs and hashes published by [Create #184](https://github.com/rig-c/create/issues/184) (without Review recomputing `stepHash`) on `plan-approved`, `rigging-interview` and `post-interview`. C4 binds the exact public `partsFileReferences(dir)` array from `@rig-c/parts/src/parts.ts`, whose contract is frozen at Parts 2.25.0. The trusted host resolves an installed version in `JOB_PARTS_ENUMERATOR_RANGE` (`>=2.25.0 <4.0.0`), supplies its actual version and official callback through `partsEnumerator`, and declares `partsEnumeratorId`. `JobPartsIdentity.enumeratorVersion` carries that actual version. Manifest paths are work-root-relative and image paths are relative to the manifest directory. Each image carries `path`, bounded-string `role` and raw-byte `sha256`. Review compares the claimed array positionally with the official array, preserving its role/order/duplicate semantics. Upstream roles include `part`, `alternate`, `depth`, `painting` and `figure_mask`. Review bounds shape and paths, refuses traversal/symlinks, decodes PNGs and hashes retained bytes. Missing references refuse with row, role and path, including a missing sibling figure mask when a render copy exists. Unreferenced extras stay outside this parts identity. Composite source hashes use `rig-review-job-source/2`. Create #184 production reader/projection and official-hook wiring remain pending.
|
|
145
145
|
- **No agent file carriage, writer-owned sibling fetch and public host seam.** Agents never build, parse, reshape or carry Review session, picks, verdict or applied-record storage files. [Create #182](https://github.com/rig-c/create/issues/182) and [Create #184](https://github.com/rig-c/create/issues/184) own direct writer publication and `fetch-act` reads using a private writer-owned sibling binding outside `project.json` (`writer-owned-sibling-fetch-capability`, pending Create #184 production reader/writer integration) that is never tracked in version control or unstaged project output, dies at explicit `close` and receives a new grant on each job incarnation. In the public managed-host startup seam (`startJobHost` from `@rig-c/review/job-host`, frozen in [Public API stability](https://github.com/rig-c/review/blob/main/docs/STABILITY.md#managed-owner-host)), hook-bearing host callers declare `readerId`, `bindingId` and `partsEnumeratorId`; equality plus API/act schemas and actual enumerator version govern authenticated active-listener reuse and missing or mismatched IDs refuse by name (`JOB_HOST_OPTION_ID_INVALID`, `JOB_HOST_REUSE_MISMATCH`) with no function hashes. Future mesh acts will be fetched by Create and passed in process to Parts' public exported API owned by [Parts #1159](https://github.com/rig-c/parts/issues/1159) without Parts reading Review or Create storage, while standalone `--delta` remains legacy outside this cycle.
|
|
146
146
|
- **Direction metadata vs playback.** Direction carriage in `#484` is metadata-only (`source.direction` and `direction-review`) and is distinct from [Review #482](https://github.com/rig-c/review/issues/482) preview and [Review #483](https://github.com/rig-c/review/issues/483) actual plated take playback, while [Review #373](https://github.com/rig-c/review/issues/373) stays parked.
|
|
147
147
|
|
package/src/build.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
1
2
|
import { fileURLToPath } from 'node:url';
|
|
2
3
|
export const appRoot=fileURLToPath(new URL('..',import.meta.url));
|
|
3
|
-
export
|
|
4
|
-
|
|
4
|
+
export const PLAY_SOURCE_CONDITION='@rig-c/source';
|
|
5
|
+
export function playBuildConditions(root:string=appRoot):string[] {
|
|
6
|
+
try{return /[\\/]src[\\/]index\.ts$/.test(Bun.resolveSync('@rig-c/play',root))?[PLAY_SOURCE_CONDITION]:[];}
|
|
7
|
+
catch{return [];}
|
|
8
|
+
}
|
|
9
|
+
export async function buildWeb(mode:'single'|'compare'|'parts'|'interview'|'workspace'|'job-hub'='single',root:string=appRoot):Promise<Blob> {
|
|
10
|
+
const conditions=playBuildConditions(root);
|
|
11
|
+
const entry=join(root,mode==='job-hub'?'web/job-hub.ts':mode==='workspace'?'web/owner-workspace.ts':mode==='compare'?'web/compare.ts':mode==='parts'?'web/parts.ts':mode==='interview'?'web/interview.ts':'web/main.ts');
|
|
12
|
+
const result=await Bun.build({entrypoints:[entry],target:'browser',format:'esm',minify:false,...(conditions.length?{conditions}:{})});
|
|
5
13
|
if(!result.success)throw new Error(result.logs.map(v=>v.message).join('\n'));
|
|
6
14
|
const output=result.outputs.find(v=>v.path.endsWith('.js'));if(!output)throw new Error('frontend bundle: JavaScript output missing');return output;
|
|
7
15
|
}
|
package/src/front.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {lstat,readFile,readdir,realpath,rename,unlink,writeFile,open as openFile
|
|
|
12
12
|
import {dirname,join} from 'node:path';
|
|
13
13
|
import {fileURLToPath} from 'node:url';
|
|
14
14
|
import {acquireClaim,alive,openFingerprint,readRecord,releaseClaim,running,smallJson,type RecordFile} from './open.ts';
|
|
15
|
+
import {playBuildConditions} from './build.ts';
|
|
15
16
|
import {capabilityHeader,openKeyHeader,openNonceHeader,sameSecret} from './open-protocol.ts';
|
|
16
17
|
import {DEFAULT_CLOSE_GRACE_MS,LIVE_PATH} from './live-lifecycle.ts';
|
|
17
18
|
export const defaultFrontPort=4318; // Foreground `review <dir>` keeps 4317.
|
|
@@ -40,7 +41,7 @@ export async function ensureFront(options:{control:string;port:number;fingerprin
|
|
|
40
41
|
const row=await reuse();if(row)return row.origin;
|
|
41
42
|
request=join(control,`${name}.${nonce}.request.json`);const log=join(control,`${name}.${nonce}.log`);
|
|
42
43
|
const spec:FrontRequest={schema:'rig-review-front-request/1',control,request,record:recordPath,port,nonce,fingerprint,idleMs};await writeFile(request,JSON.stringify(spec),{mode:0o600,flag:'wx'});
|
|
43
|
-
const logHandle=await openFile(log,'a',0o600);try{child=spawn(process.execPath,[join(appRoot,'src/front-worker.ts'),request],{cwd:control,detached:true,stdio:['ignore',logHandle.fd,logHandle.fd],env:process.env});child.unref();}finally{await logHandle.close();}
|
|
44
|
+
const logHandle=await openFile(log,'a',0o600);try{child=spawn(process.execPath,[...playBuildConditions().map(c=>`--conditions=${c}`),join(appRoot,'src/front-worker.ts'),request],{cwd:control,detached:true,stdio:['ignore',logHandle.fd,logHandle.fd],env:process.env});child.unref();}finally{await logHandle.close();}
|
|
44
45
|
let exited:string|undefined;child.on('error',error=>{exited=error.message;});child.on('exit',(code,signal)=>{exited=`exit ${code} ${signal??''}`;});
|
|
45
46
|
while(performance.now()<deadline){const live=await reuse();if(live){handedOff=true;return live.origin;}
|
|
46
47
|
if(exited){if(/FRONT_PORT_BUSY/.test(await readFile(log,'utf8').catch(()=>'')))throw new Error(`FRONT_PORT_BUSY: 127.0.0.1:${port} is held by another listener; use --direct (or set RIG_REVIEW_FRONT_PORT)`);throw new Error(`FRONT_START: ${exited}; front log ${log}`);}
|
package/src/job-contract.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type JobApiSchema = typeof JOB_API_SCHEMA | typeof JOB_API_V3_SCHEMA;
|
|
|
29
29
|
export const jobStillByteLimit = 8 * 1024 * 1024;
|
|
30
30
|
export const jobCaptureBodyLimit = 12 * 1024 * 1024;
|
|
31
31
|
export const jobRawActMediaType = 'application/vnd.rig-review.act+json';
|
|
32
|
-
export const JOB_PARTS_ENUMERATOR_RANGE = '>=2.25.0 <
|
|
32
|
+
export const JOB_PARTS_ENUMERATOR_RANGE = '>=2.25.0 <4.0.0' as const;
|
|
33
33
|
|
|
34
34
|
export const JOB_ENABLED_ACT_KINDS = [
|
|
35
35
|
'interview-picks',
|
|
@@ -2,7 +2,7 @@ import {spawn} from 'node:child_process';
|
|
|
2
2
|
import {randomUUID} from 'node:crypto';
|
|
3
3
|
import {open, readFile, unlink} from 'node:fs/promises';
|
|
4
4
|
import {join} from 'node:path';
|
|
5
|
-
import {appRoot} from './build.ts';
|
|
5
|
+
import {appRoot, playBuildConditions} from './build.ts';
|
|
6
6
|
import {frontPort} from './front.ts';
|
|
7
7
|
import {acquireClaim, defaultStateDir, openFingerprint, prepareOpenTarget, readOpenStatus, releaseClaim,
|
|
8
8
|
type OpenInputs, type OpenOptions} from './open.ts';
|
|
@@ -61,7 +61,7 @@ export async function openWorkspace(inputs: readonly OpenInputs[], options: Open
|
|
|
61
61
|
const logPath = join(directory, nonce + '.log');
|
|
62
62
|
const log = await open(logPath, 'a', 0o600);
|
|
63
63
|
try {
|
|
64
|
-
child = spawn(process.execPath, [join(appRoot, 'src/open-workspace-worker.ts'), request],
|
|
64
|
+
child = spawn(process.execPath, [...playBuildConditions().map(c => `--conditions=${c}`), join(appRoot, 'src/open-workspace-worker.ts'), request],
|
|
65
65
|
{cwd: directory, detached: true, stdio: ['ignore', log.fd, log.fd], env: process.env});
|
|
66
66
|
child.unref();
|
|
67
67
|
} finally {await log.close();}
|
package/src/open.ts
CHANGED
|
@@ -16,6 +16,7 @@ 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
18
|
import {ensureFront,frontPort} from './front.ts';
|
|
19
|
+
import {playBuildConditions} from './build.ts';
|
|
19
20
|
import {playPackagePath} from './versions.ts';
|
|
20
21
|
import {HandoffError,HANDOFF_FLAGS,isBuildRoot,type HandoffFlags,type HandoffRecord} from './handoff.ts';
|
|
21
22
|
import {stateDirInside,stateRoots} from './state-dir.ts';
|
|
@@ -160,7 +161,7 @@ async function ensureWorker(p:OpenPackage,key:string,fingerprint:string,stateDir
|
|
|
160
161
|
const row=await reuse();if(row)return {row,reused:true};
|
|
161
162
|
const identity:OpenIdentity={key,contentHash:p.contentHash,nonce,fingerprint};request=join(canonicalControl,`${key}.${nonce}.request.json`);const log=join(canonicalControl,`${key}.${nonce}.log`);
|
|
162
163
|
const spec:WorkerRequest={schema:'rig-review-open-request/1',inputs:p.inputs,identity,stateDir,registry,request,idleMs,...(graceMs!==undefined?{graceMs}:{}),cwd,...(viewOnly?{viewOnly:true}:{}),...(p.inputs.control?{controlToken:randomUUID()}:{} )};await writeFile(request,JSON.stringify(spec),{mode:0o600,flag:'wx'});
|
|
163
|
-
const logHandle=await openFile(log,'a',0o600);let child;try{child=spawn(process.execPath,[join(appRoot,'src/open-worker.ts'),request],{cwd:canonicalControl,detached:true,stdio:['ignore',logHandle.fd,logHandle.fd],env:process.env});spawned=child;child.unref();}finally{await logHandle.close();}
|
|
164
|
+
const logHandle=await openFile(log,'a',0o600);let child;try{child=spawn(process.execPath,[...playBuildConditions().map(c=>`--conditions=${c}`),join(appRoot,'src/open-worker.ts'),request],{cwd:canonicalControl,detached:true,stdio:['ignore',logHandle.fd,logHandle.fd],env:process.env});spawned=child;child.unref();}finally{await logHandle.close();}
|
|
164
165
|
let exited:string|undefined;child.on('error',error=>{exited=error.message;});child.on('exit',(code,signal)=>{exited=`exit ${code} ${signal??''}`;});
|
|
165
166
|
while(performance.now()<deadline){const record=await reuse();if(record){handedOff=true;return {row:record,reused:false};}if(exited)throw new Error(`OPEN_START: ${exited}; worker log ${log}`);await sleep(30);}throw new Error(`OPEN_TIMEOUT: worker did not become ready; log ${log}`);
|
|
166
167
|
}finally{if(spawned&&!handedOff&&spawned.exitCode===null&&spawned.signalCode===null)spawned.kill('SIGTERM');await releaseClaim(claim,nonce);if(request)await unlink(request).catch(e=>{if(e.code!=='ENOENT')throw e;});}
|
package/src/versions.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import { existsSync } from 'node:fs';
|
|
2
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { dirname, join } from 'node:path';
|
|
4
4
|
import { fileURLToPath } from 'node:url';
|
|
5
5
|
function version(text:string,label:string):string {
|
|
@@ -7,14 +7,14 @@ function version(text:string,label:string):string {
|
|
|
7
7
|
if(typeof value.version!=='string'||!value.version)throw new Error(`${label}: package version missing`);
|
|
8
8
|
return value.version;
|
|
9
9
|
}
|
|
10
|
-
/** The runtime's manifest wherever the installer put it: nested in a checkout, hoisted beside this package in an install. */
|
|
11
|
-
export function playPackagePath():string {
|
|
12
|
-
let dir=dirname(Bun.resolveSync('@rig-c/play',
|
|
13
|
-
for(;;){const candidate=join(dir,'package.json');if(existsSync(candidate)
|
|
10
|
+
/** The runtime's manifest wherever the installer put it: nested in a checkout, hoisted beside this package in an install, or symlinked to a peer checkout. */
|
|
11
|
+
export function playPackagePath(root:string=fileURLToPath(new URL('.',import.meta.url))):string {
|
|
12
|
+
let dir=dirname(Bun.resolveSync('@rig-c/play',root));
|
|
13
|
+
for(;;){const candidate=join(dir,'package.json');if(existsSync(candidate)){try{if((JSON.parse(readFileSync(candidate,'utf8')) as {name?:unknown}).name==='@rig-c/play')return candidate;}catch{}}const parent=dirname(dir);if(parent===dir)throw new Error('@rig-c/play: package.json not found from resolved entry');dir=parent;}
|
|
14
14
|
}
|
|
15
15
|
/** Read installed tool versions; never treat a producer report's generic version as one. */
|
|
16
|
-
export async function toolVersions():Promise<{viewerVersion:string;runtimeVersion:string}>{
|
|
16
|
+
export async function toolVersions(root?:string):Promise<{viewerVersion:string;runtimeVersion:string}>{
|
|
17
17
|
const viewerVersion=version(await readFile(new URL('../package.json',import.meta.url),'utf8'),'review');
|
|
18
|
-
const runtimeVersion=version(await readFile(playPackagePath(),'utf8'),'@rig-c/play');
|
|
18
|
+
const runtimeVersion=version(await readFile(playPackagePath(root),'utf8'),'@rig-c/play');
|
|
19
19
|
return {viewerVersion,runtimeVersion};
|
|
20
20
|
}
|
package/web/catalog-en.ts
CHANGED
|
@@ -3425,7 +3425,7 @@ export const enCatalog: Readonly<Record<string, string>> = {
|
|
|
3425
3425
|
"PARTS_REFERENCE_LIMIT row={0} role={1} path={2}": "PARTS_REFERENCE_LIMIT row={0} role={1} path={2}",
|
|
3426
3426
|
"PARTS_ENUMERATOR_VERSION_MISMATCH range=\"{0}\" received={1}": "PARTS_ENUMERATOR_VERSION_MISMATCH range=\"{0}\" received={1}",
|
|
3427
3427
|
"PARTS_ENUMERATOR_VERSION_MISMATCH range=\"{0}\" received=\"{1}\" installed=\"{2}\"": "PARTS_ENUMERATOR_VERSION_MISMATCH range=\"{0}\" received=\"{1}\" installed=\"{2}\"",
|
|
3428
|
-
">=2.25.0 <
|
|
3428
|
+
">=2.25.0 <4.0.0": ">=2.25.0 <4.0.0",
|
|
3429
3429
|
"JOB_ROOT_REPLACED": "JOB_ROOT_REPLACED",
|
|
3430
3430
|
"JOB_SAME_ORIGIN_REQUIRED": "JOB_SAME_ORIGIN_REQUIRED",
|
|
3431
3431
|
"JOB_SOURCE_MISMATCH": "JOB_SOURCE_MISMATCH",
|
package/web/catalog-ko.ts
CHANGED
|
@@ -3425,7 +3425,7 @@ export const koCatalog: Readonly<Record<string, string>> = {
|
|
|
3425
3425
|
"PARTS_REFERENCE_LIMIT row={0} role={1} path={2}": "PARTS_REFERENCE_LIMIT row={0} role={1} path={2}",
|
|
3426
3426
|
"PARTS_ENUMERATOR_VERSION_MISMATCH range=\"{0}\" received={1}": "PARTS_ENUMERATOR_VERSION_MISMATCH range=\"{0}\" received={1}",
|
|
3427
3427
|
"PARTS_ENUMERATOR_VERSION_MISMATCH range=\"{0}\" received=\"{1}\" installed=\"{2}\"": "PARTS_ENUMERATOR_VERSION_MISMATCH range=\"{0}\" received=\"{1}\" installed=\"{2}\"",
|
|
3428
|
-
">=2.25.0 <
|
|
3428
|
+
">=2.25.0 <4.0.0": ">=2.25.0 <4.0.0",
|
|
3429
3429
|
"JOB_ROOT_REPLACED": "JOB_ROOT_REPLACED",
|
|
3430
3430
|
"JOB_SAME_ORIGIN_REQUIRED": "JOB_SAME_ORIGIN_REQUIRED",
|
|
3431
3431
|
"JOB_SOURCE_MISMATCH": "JOB_SOURCE_MISMATCH",
|