Design reviews API
Engineers discuss a project where the work is: on a screen element, on a line of a PLC program, on a tag. Before a change reaches the operators, a site can require that other people review and sign it. The review is bound to the exact content the deploy publishes, so a change saved after the approval needs a new review.
This page is the HTTP API the studio uses. Every route is under /api/collab/ and needs a signed-in user. Unknown routes under /api/collab/ answer 404 with a JSON body.
Editions
Section titled “Editions”| Edition | Comments | Review requests and the one-approver policy | Two-person policy |
|---|---|---|---|
| Free | yes | yes | yes |
| Starter | yes | no: 403 |
no: 403 |
| Pro | yes | yes | no: 403 |
| Enterprise | yes | yes | yes |
Free includes everything for evaluation, like every other feature. A refusal names the edition required (edition_required).
The AI assistant’s check of a project review needs Pro or Enterprise with the AI assistant (features collab_review and assistant), enabled and set up.
Searching reviews and comments needs Pro or Enterprise (feature collab_search). Unlike the rest of this page, Free does not include it: Free and Starter answer 403.
If the licence changes to an edition without reviews while the policy is on, the policy stays in force. Deploys are then refused until an administrator sets the policy to off.
Who may do what
Section titled “Who may do what”| Action | Who |
|---|---|
| Read comments | any signed-in user with the read right on the object: the screen’s read right, the tag’s read right; a PLC’s comments any signed-in user |
| Write comments (open, reply, resolve, reopen) | Lead_Engineer or Administrator, with the read right on the object |
| Request a review, withdraw one’s own | Lead_Engineer or Administrator |
| Approve or reject | a person with a login session, at the policy’s minimum level (default Lead_Engineer, level 80), named as a reviewer when the review names reviewers, never the requester |
| Make the policy stricter | Lead_Engineer or Administrator |
| Weaken the policy or switch it off | Administrator |
The AI co-pilot’s account never writes comments, never requests a review here and never signs. A request authenticated with an API token never signs.
On an HA cluster, every write is refused on a standby node, or on a primary without quorum, with 409 and status ha_standby (or 503 and ha_no_quorum), as other studio changes are. Reads work on every node.
Anchors
Section titled “Anchors”A thread is anchored with a reference in one of these forms:
| Reference | Pins | Completed by the server |
|---|---|---|
screen:<project>/<screen>#<element> |
a designer element (without #<element>: the screen) |
@<commit>: the screen’s newest version when the server keeps a version history |
plc:<plc>:program:<pou>:<line> |
a line of an ST program, 1-based in the source text | @<version>: the first 16 hex digits of the SHA-256 of the source; a fingerprint of lines line-1, line and line+1 (trimmed) |
tag:<path> |
a tag | nothing |
Names in a reference use the characters A-Z a-z 0-9 _ . -.
How a thread is placed when it is read:
- Screen. The pin follows its element while the element exists in the saved screen. When the element is gone, the thread has
outdated: true,outdated_reason: "element removed in <commit>"andoutdated_in: <commit>. When the screen is gone, the reason isscreen deleted. - ST line. In the version it was written against, the thread keeps its line. In another version it is re-attached by its fingerprint: first an exact match of the three lines anywhere in the source (the nearest to the old line), then within 20 lines of the old line the line itself plus one of its neighbours. Otherwise it is
outdated. The re-attached line iscurrent_line.
Threads
Section titled “Threads”GET /api/collab/threads
Section titled “GET /api/collab/threads”Lists the threads of one object, oldest first. Name the object with one of:
ref=<anchor>: with#<element>(screen) or:<line>(ST), only the threads on that element or line;screen=<project>/<screen>;tag=<path>;plc=<plc>&pou=<pou>.
state=open or state=resolved filters. Answer: {"object": "...", "threads": [Thread...]}.
POST /api/collab/threads
Section titled “POST /api/collab/threads”{"ref": "screen:plant1/boiler#valve_12", "text": "The label shows °F; the tag is °C."}An ST anchor also sends "source": the text the ST editor shows (at most 2 MiB). The project, the screen and the named element must exist now (404 otherwise), and an ST line must be inside the source. Answer 201 with the thread.
GET /api/collab/threads/{id}
Section titled “GET /api/collab/threads/{id}”One thread, placed.
POST /api/collab/threads/{id}/replies
Section titled “POST /api/collab/threads/{id}/replies”{"text": "..."}. A reply to a resolved thread reopens it.
POST /api/collab/threads/{id}/resolve and .../reopen
Section titled “POST /api/collab/threads/{id}/resolve and .../reopen”No body.
POST /api/collab/plc/threads
Section titled “POST /api/collab/plc/threads”{"plc": "plc-01", "pou": "Mixer", "source": "..."}: the POU’s threads placed against source (the ST editor’s text), with current_line or outdated.
Thread
Section titled “Thread”| Field | Meaning |
|---|---|
id |
the thread id (a 26-character ULID) |
anchor |
ref (as anchored), scheme (screen, plc, tag), object, and per scheme project, page, element, commit; plc, pou, line, version, fingerprint; tag |
state |
open or resolved; resolved_by, resolved_at |
created_by, created_at |
the author and the time (Unix ms) |
comments |
id, author, member (the person’s collaboration id, h-<username>), at, text |
outdated, outdated_reason, outdated_in, current_line |
the placement, worked out when the thread is read |
Comment text is plain text, at most 4 KiB, and a thread holds at most 100 comments. Clients show it escaped.
Reviews
Section titled “Reviews”A review is of one thing a deploy publishes:
- A project (
kind: "project"):hashis the deploy manifest hash. This is the SHA-256 of the manifest that an explicit Deploy of the project would publish at the time of the request: every screen as saved (itsupdated_atincluded), the pages, docks, dashboards and navigation. The deploy time and the deployer are not part of it. With live editing on, an automatic deploy publishes screens held for an explicit deploy as they were last deployed, so its manifest can differ from the reviewed one. When it does, the automatic deploy is refused. - A PLC program (
kind: "plc"):hashis the SHA-256 of the ST source exactly as the deploy sends it.
POST /api/collab/reviews
Section titled “POST /api/collab/reviews”{"project": "plant1", "title": "Boiler labels", "description": "...", "reviewers": ["mkhan", "jdoe"], "assistant": false}or, for a PLC, exactly one of {"plc": "plc-01", "source": "PROGRAM ...", ...}, {"plc": "plc-01", "project_revision": 3, ...} (a revision of the PLC’s project: the review covers that revision’s linked program text) or {"plc": "plc-01", "rollback_commit": "<stored version>", ...} (a version stored on the PLC: its program.st, read from the PLC with the requester’s credential). Anything else is 400. A signed-in person may also send this request with the PLC token this server issued at sign-in (the eaxPLC IDE does), for a PLC review by project_revision or rollback_commit only: any other target answers 403 plc_token_target, and the token of an eaxCloud remote session is refused. Such a review is named as requested “via the eaxPLC IDE”. reviewers are usernames. When the list is not empty, only they may decide. The requester cannot be a reviewer. assistant: true asks for the AI assistant’s advisory check of a project review, started in the background as the requester (it is never an approver; see The AI assistant’s check). When the assistant cannot review the project, the request is refused 409 {"code": "assistant_unavailable", "error": "the AI assistant cannot review project <id>: <reason>"}, and 403 when the edition has no AI assistant. The AI co-pilot account is never a reviewer (400). Answer 201 with the review.
The review carries a code_diff card: base and head are the first 12 hex digits of the deployed manifest’s hash and of the reviewed one, and files holds one unified diff per changed file:
project.jsonfor the project’s own settings;screens/<id>.jsonfor each screen added, changed or removed;program.stfor a PLC program, compared with the program the PLC runs.
A file shows at most 400 lines, and a review at most 40 files. diff_note says what was left out.
GET /api/collab/reviews?project=<id> or ?plc=<id>
Section titled “GET /api/collab/reviews?project=<id> or ?plc=<id>”The reviews of a target, newest first, without their diff. Answer: {"kind", "target", "current_hash", "policy", "reviews": [...]}.
GET /api/collab/reviews/{id}
Section titled “GET /api/collab/reviews/{id}”| Field | Meaning |
|---|---|
id, number |
the review id and its number (Review #12) |
kind, target, hash |
what is reviewed |
title, description, requester, reviewers, assistant |
as requested |
state |
pending, approved, rejected or withdrawn |
decisions |
each signed decision: user, decision, level (the signer’s level when signing), at, meaning, signature (the signature manifest), ticket_hash, comment |
code_diff, diff_note |
the diff |
policy_at_request |
the site policy when the review was requested |
current_hash |
for a project review, the hash a deploy would publish now |
stale, stale_reason |
the review is of another hash: “Review #12 approved a different manifest (…); the project now deploys …. Request a re-review.” |
meanings |
the exact text each decision signs, for example Approve review #12 of project plant1 deploy manifest a91f0c2d7e44. Show it to the signer as it is. |
assistant_check |
project reviews: the AI assistant’s check, absent when none ran (see the check) |
assistant_availability |
project reviews: whether the assistant can review the project now: available, provider, location, reason |
assistant_check_error |
the check could not be read |
Signing a decision
Section titled “Signing a decision”Signing takes two calls. A decision is an electronic signature bound to the person, the review, the review’s hash and the decision.
POST /api/collab/reviews/{id}/signature-ticketwith{"password": "...", "decision": "approve"}(or"reject"). The password is checked like every electronic signature, and failures count toward the account lockout. The answer is a one-time ticket:{"ticket": "eso_…", "expires_at", "object": "approval:<id>", "hash", "decision", "meaning"}. It lives 60 seconds. Only its hash is stored (on an HA cluster, in the cluster’s shared store, so it is used once cluster-wide). The call is refused before the password is checked when the person may not decide.POST /api/collab/reviews/{id}/decidewith{"decision": "approve", "hash": "<the review's hash>", "ticket": "eso_…", "comment": "...", "assistant_check_seen": "<digest>"}.assistant_check_seenis thedigestof the AI assistant’s completed check: an approval sends it when that check has findings, to confirm the approver saw them.
The decision is refused when:
- an approval is sent while the assistant’s check of the review is running, or the completed check has findings and
assistant_check_seenis not its digest (409 {"status": "assistant_findings_unseen", "code": "assistant_findings_unseen", "error"}; the ticket is not used up); - the ticket is someone else’s, for another review, hash or decision, used, or expired (
403; a mismatched ticket is burnt); hashis not the review’s (409);- the project changed since the review was requested (
409: request a re-review); - the person already decided, or the review was rejected or withdrawn (
409).
A tag-write signature ticket (est_…) is never accepted here, and a review ticket never signs a tag write.
A review becomes approved when it holds the approvals the policy needs: one with the policy off or one, two with two_person. A rejection makes it rejected.
- Configuration or deploy
- Refusal
Read as text
A review of a project or of a PLC program starts as pending. Signed approvals move it to approved once the site policy has the approvals it needs: one, or two by different people under the two-person policy. One signed rejection moves it to rejected, also after it was approved. The requester can withdraw it. A deploy is let through only by an approved review of exactly the manifest being deployed; when the manifest changed since the request, the deploy is refused and a new review is needed.
States
- pending (state): waits for approvals
- approved (state): the policy is met
- withdrawn (state): lets no deploy through
- rejected (state): blocks this manifest
- Not deployed (outcome): request a re-review
- Deploy let through (outcome): by the review gate
Transitions
- Start → pending (transition). A review is requested, of the manifest a project deploy would publish now or of one PLC program.
- pending → pending (transition): 1 of 2 approvals. Under the two-person policy the first signed approval leaves the review pending: one more is needed.
- pending → approved (transition): the approvals the policy needs, signed. One approver: one signed approval. Two-person review: two, by two different people. An approval by the requester, or by someone below the policy's level, is refused.
- pending → withdrawn (transition): requester withdraws
- approved → withdrawn (transition): requester withdraws. The Studio offers Withdraw on a pending review; the server also accepts the requester's withdrawal of an approved one.
- pending → rejected (transition): a signed rejection
- approved → rejected (transition): a signed rejection. A reviewer who has not decided yet can still reject an approved review. A rejected review of a manifest refuses every deploy of that manifest.
- approved → Not deployed (refusal): deploy of a changed manifest. Something was saved after the review was requested: the review approved a different manifest. A decision on a pending review is refused for the same reason.
- approved → Deploy let through (configuration or deploy): deploy of exactly this manifest. Where the site policy also requires the AI assistant's check, a project deploy needs that check too.
POST /api/collab/reviews/{id}/withdraw
Section titled “POST /api/collab/reviews/{id}/withdraw”Only the requester can withdraw a review. A withdrawn review lets no deploy through.
The site policy: approve before deploy
Section titled “The site policy: approve before deploy”The policy collab.deploy.require_review is a project setting, stored with the project and replicated with it on an HA cluster:
"collab": {"deploy": {"require_review": "two_person", "min_level": 80, "assistant_check": true}}assistant_check (default false) also requires the AI assistant’s check: see The required check.
require_review |
A deploy needs |
|---|---|
off (default) |
nothing: deploys behave as without reviews |
one |
a review of exactly the manifest to deploy, approved by one person other than the requester |
two_person |
the same, approved by two distinct people, neither the requester |
min_level is the lowest role level an approval counts at (0: Lead_Engineer, 80). The gate applies the policy in force at deploy time. A review approved by one person under one does not satisfy two_person. A review of the same hash that someone rejected blocks that hash.
GET /api/collab/policy?project=<id>
Section titled “GET /api/collab/policy?project=<id>”Answers {"project", "policy": {"require_review", "min_level", "assistant_check"}, "default_min_level": 80, "assistant_check_stored", "assistant": {"available", "provider", "location", "reason"}}, with the project’s revision as ETag. policy is the policy in force: its assistant_check is present and true only while the review policy is on and the assistant can review the project. assistant_check_stored is the setting as stored, and assistant says whether the assistant can review the project now and why not.
PUT /api/collab/policy?project=<id>
Section titled “PUT /api/collab/policy?project=<id>”{"require_review": "one", "min_level": 80, "assistant_check": true}, sent with If-Match: <ETag> (409 stale when the project changed). A body without assistant_check keeps the stored value. A stricter policy (more approvers, a higher level, assistant_check switched on) needs Lead_Engineer. A weaker one, or off, needs an Administrator; switching assistant_check off is a weakening even while the assistant is unavailable. one needs Pro, two_person Enterprise. The AI co-pilot account cannot change the policy (403). The change does not change the project’s deploy manifest.
The gate
Section titled “The gate”When the policy is on, the gate runs before every other deploy check, on both deploy paths:
- Explicit deploy,
POST /api/dev/projects/{id}/deploy. The server builds the manifest that this deploy would publish and hashes it. It refuses the deploy unless a review of exactly that hash holds the approvals the policy needs. The deploy is then bound to that hash: the manifest is built and hashed again at the moment it is written, and a change saved in between refuses the deploy. - Automatic deploy (live editing on). It passes the same gate and fails closed. When there is no matching approval, when the review store does not answer, or when held screens make its manifest differ from the approved one, it is not made. The previous deploy stays live, and
GET /api/dev/projects/{id}/deploy-statusshowsauto_deploy_refusedwith the reason. - Every PLC program change sent through the server: deploy, project deploy, rollback, online test and online accept, on every path (the PLC API proxy, the AI assistant, the MCP gateway, remote PLC Studio). It is refused before it reaches the PLC unless a PLC review approved exactly the program the PLC will load: the source sent, the project revision’s linked program text, the stored version’s
program.st(read from the PLC with the requester’s credential), or for an online accept the program under test. When that program cannot be determined, nothing is deployed. The policy is the active project’s. The assistant and MCP keep PLC source byte for byte (no whitespace trimming), so the deployed text is exactly the reviewed text.
A refused explicit deploy answers:
HTTP/1.1 409 Conflict{"status": "REVIEW_REQUIRED", "code": "REVIEW_REQUIRED", "error": "Review #12 approved a different deploy manifest (a91f0c2d7e44); this one is 7c0d…. Request a re-review.", "gate": {"allowed": false, "policy": {...}, "kind": "project", "target": "plant1", "hash": "...", "stale_review": {...}}}A refused PLC deploy fails with an error that starts with REVIEW_REQUIRED:.
The PLC’s own gate. When the gate lets a PLC program deploy through on an approved review of exactly that program, and the deploy is forwarded to the PLC by this server (the proxy, the AI assistant, the MCP gateway), the server adds a review_approval member to the deploy body (only when the body carries none; a client’s own approval is forwarded unchanged). eaxPLC, with its setting Require a signed review approval to deploy on, verifies it. The approval (eaxPLC deploy approval v1) holds v, plc, program_hash (the review’s hash, the sha256 of the source), review_id, review_number, approvers, issued_at, expires_at (5 minutes later), key_id and sig: an Ed25519 signature by the PLC token key the PLC already pins, over a domain prefix of its own (eaxplc.deploy-approval.v1), so a sign-in token never passes as an approval or the reverse. A deploy from the eaxPLC Web Studio gets its approval from POST /api/collab/plc-approval (below). See eaxPLC deploy settings.
The review is an extra gate: the deploy’s other checks (plant e-stop, lint gate) still run after it.
- Product
- Service or process
- Data or telemetry
- Configuration or deploy
- Refusal
Read as text
A PLC with the setting "Require a signed review approval to deploy" on loads a program it has not deployed before only with an approval signed by eaxScada. The diagram shows the two ways a deploy gets one. From the eaxPLC Web Studio, the PLC asks eaxScada for the approval of exactly the program being deployed, and the deploy carries it. A deploy that goes through eaxScada passes the review gate there, in force when the site review policy is on, which adds the approval. In both cases the PLC verifies the approval itself and refuses the deploy when it is missing or invalid.
Participants
- Web Studio (service or process): of eaxPLC
- eaxPLC (product): the PLC
- eaxScada (product): server
- Other deploys (service or process): through eaxScada
Steps, in order
- eaxScada: A review of the program is approved: bound to the sha256 of its source
- From the Web Studio:
- Web Studio → eaxPLC (data or telemetry): Asks for the approval. POST /api/deploy/review-approval
- eaxPLC → eaxScada (data or telemetry): Forwards, as the engineer. POST /api/collab/plc-approval this PLC, the sha256 it computed
- eaxScada: Issues an approval only: to Lead_Engineer or Administrator; for a review the site policy needs; approved for this PLC and sha256
- Refused:
- eaxScada → eaxPLC (refusal): 409 no_approved_review. PLC_APPROVAL_REFUSED recorded; 403 to a token or another role
- eaxPLC → Web Studio (refusal): No approved review. the dialog sends no deploy
- Approved:
- eaxScada → eaxPLC (reply): Signed approval, valid 5 minutes. PLC_APPROVAL_ISSUED recorded first
- eaxPLC → Web Studio (reply): The approval, as signed
- Web Studio → eaxPLC (configuration or deploy): Deploys, with the approval
- Through eaxScada:
- Other deploys → eaxScada (configuration or deploy): Deploys a program. forwarded deploy, AI assistant, MCP client
- eaxScada: Review gate (site policy on): an approved review of this sha256
- No such review:
- eaxScada → Other deploys (refusal): REVIEW_REQUIRED. DEPLOY_GATED recorded, nothing is forwarded
- Approved:
- eaxScada → eaxPLC (configuration or deploy): Forwards the deploy. DEPLOY_REVIEW_SATISFIED recorded first; adds the approval if the deploy has none
- eaxPLC: Checks every deploy itself: a program it deployed before needs no approval; the approval names this PLC and this sha256; it is not expired, and signed with the pinned key
- Missing or invalid:
- eaxPLC → Web Studio (refusal): Refuses the deploy. review_approval_required, review_approval_invalid
- eaxPLC → eaxScada (refusal): The same answer. to a deploy through eaxScada
- Valid:
- eaxPLC: Loads the program
GET /api/collab/deploy-gate?project=<id>
Section titled “GET /api/collab/deploy-gate?project=<id>”What an explicit Deploy would publish now (hash) and whether the gate would let it through: allowed, review, approvers, reason. For a project review with an assistant check, assistant_check is {state, hash, findings, counts, card, required, reason}: the check’s state, the manifest it checked, the number of findings and their counts by severity, its summary card, whether the policy requires it, and why it does not satisfy the requirement (empty when it does, or when it is not required). The deploy dialog shows it.
POST /api/collab/plc-approval
Section titled “POST /api/collab/plc-approval”{"plc": "plc-01", "program_hash": "<sha256 of the source, 64 lower-case hex digits>"}: the review approval of one program for one PLC, for a deploy from the eaxPLC Web Studio (the PLC asks for it with the user’s credential, POST /api/deploy/review-approval on the PLC). It is issued exactly as for a deploy through this server: only when the gate, under the active project’s site policy, allows exactly this hash for exactly this PLC on an approved review. Valid 5 minutes.
Who: a signed-in person at Lead_Engineer level or above, with a login session or the PLC token this server issued at sign-in. It is one of the few routes that accept a PLC token (with POST /api/collab/reviews and the AI assistant’s; the assistant refuses the PLC token of an eaxCloud remote session). The AI co-pilot account and API tokens are refused.
| HTTP | Answer |
|---|---|
200 |
{"plc", "program_hash", "review_approval", "review", "approvers", "expires_at"} |
409 |
{"code": "no_approved_review", "error": "No approved review for this program: <reason>"} |
403 |
the caller is refused (AI co-pilot, API token, no signed-in person, below Lead_Engineer) |
404 |
the PLC is not configured on this server |
400 |
the body is not {"plc", "program_hash"}, or the hash is not a sha256 |
Every answer that reaches the gate is journaled: PLC_APPROVAL_ISSUED (the review, its approvers, the key and the validity) or PLC_APPROVAL_REFUSED (the reason). eaxPLC stays the authority: it verifies the approval when the deploy arrives.
GET /api/collab/deploy-gate?plc=<id>
Section titled “GET /api/collab/deploy-gate?plc=<id>”The PLC’s own deploy gate, read from the PLC (GET /api/deploy/policy) with the user’s own rights: plc, reachable, server_key_id (the key this server signs approvals with) and, when the PLC answered, require_esign, require_review_approval, trusted_approval_key, trust_detail and trusts_server_key. When the PLC cannot be read, reachable is false with an error, and no setting is reported. 404 for a PLC this server does not know. The Deploy gate on PLC card of a PLC program review shows it. Read only.
The AI assistant’s check
Section titled “The AI assistant’s check”A project review can carry an advisory check by the AI assistant. The assistant is never an approver: the check writes only its own record and comment threads, and a decision coming from it is refused. How to use it: Let the AI assistant check a deploy.
The assistant is available to a project when the build has it, the configuration has not switched it off, the edition has it, it is set up, and the project’s provider policy allows an enabled provider. The check runs on the project’s provider: its default when allowed and enabled, else the first allowed enabled one. It reads the deploy preview and each changed screen’s elements, and may read the project with read tools only, as the person who started the check, through GET requests only. Any other tool is refused before it reaches the server and listed in refused. PLC program reviews get no check.
POST /api/collab/reviews/{id}/assistant-check
Section titled “POST /api/collab/reviews/{id}/assistant-check”No body. Runs the check of a project review (again: after a failure, or when none ran) in the background. Who: Lead_Engineer or Administrator, never the AI co-pilot account (403). Answer 202 with the review, its assistant_check in state running.
Refused (409, nothing started) when:
- the assistant cannot review the project (the error gives the reason);
- the review is rejected or withdrawn;
- the review’s manifest is no longer the one to deploy (request a re-review);
- a check of the review is running;
- the check completed and approvals were given on the review: request a re-review to check again.
A PLC program review answers 400, and an edition without reviews 403.
The check
Section titled “The check”assistant_check on GET /api/collab/reviews/{id}:
| Field | Meaning |
|---|---|
review_id, review_number, kind, target |
the review |
hash |
the deploy manifest the check was given |
state |
running, completed or failed. A check whose project changed while it ran ends failed (“the project changed while the assistant was checking it”) and does not count. |
run_id, requested_by, started_at, finished_at |
the run, the person who started it, the times (Unix ms) |
provider, location |
the provider’s configured name, and local or cloud |
summary |
the assistant’s summary |
findings |
each: id, severity (info, low, medium, high, blocking), title, detail, screen, element, tag, ref (the anchor its thread was posted on) and thread_id |
counts |
findings per severity |
digest |
what an approver confirms having seen (the run and its findings); empty until completed |
error |
why it failed |
tool_calls, refused |
the read tools the assistant ran, and the tools it asked for that were refused |
advisory |
always true |
Each finding on a screen element is posted as a comment thread on that element, written by ai-assistant (member a-assistant), its comments marked "ai": true; the studio labels them AI · advisory. A finding whose element is no longer on the screen pins the screen; a finding with no place stays on the check.
A finding of any severity, blocking included, never blocks a deploy by itself. Instead, an approval is refused while the check runs, and must name the completed check’s digest in assistant_check_seen when it has findings (409 assistant_findings_unseen otherwise; see Signing a decision). The decision records the digest.
The required check
Section titled “The required check”With assistant_check on in the policy and the review policy on, the gate also needs the approving review’s check to have completed on exactly the manifest the deploy publishes. A check not run, running, failed, or completed on another manifest refuses the deploy 409 REVIEW_REQUIRED with the reason. Only approvals that confirmed the check’s findings count toward the approvals the policy needs. The verdict’s assistant_check says why (GET /api/collab/deploy-gate).
While the assistant is unavailable to the project, the check is not required, even when the setting is stored: the policy in force shows assistant_check off, and assistant_check_stored keeps the setting.
A check started just before an approval is signed can still be running when the approval is stored; the required check still waits for it to complete.
Search reviews and comments
Section titled “Search reviews and comments”One read-only route finds past reviews, signed decisions, comments and the AI assistant’s checks of a project or a PLC. How to use it from the studio: Search reviews and comments.
Editions: Pro and Enterprise (feature collab_search, listed in the edition status). Free and Starter answer 403 with “Search reviews and comments requires a Pro licence or higher.” and edition_required. Free still evaluates reviews themselves.
GET /api/collab/search
Section titled “GET /api/collab/search”Who: any signed-in user, never the AI co-pilot account (403, code ai_copilot_refused).
| Parameter | Meaning |
|---|---|
project or plc |
the scope, exactly one: a project’s reviews, decisions, checks and screen comments, or a PLC’s program reviews and ST comments |
q |
words that must all appear, case-insensitive; at most 256 bytes, the first 8 words count. Empty: the filters alone. |
kind |
review, decision, comment, assistant_check, or ai (written by the AI assistant: its comments and its checks); comma-separated or repeated. None: every kind. |
from, to |
RFC 3339, a day (yyyy-mm-dd, UTC) or Unix milliseconds. from is inclusive; as to, a day includes the whole day. to must be after from. |
author |
a username, exact (case-insensitive) |
limit |
1 to 200, default 50; a larger value is capped to 200 |
Answer 200, newest first:
{"project": "<id>", "query": "valve", "results": [...], "limit": 50, "truncated": false, "building": false}(plc instead of project for a PLC.) truncated: there were more matches than limit. building: the archive’s first scan of the stored reviews and comments has not finished, so older records may be missing.
Each result:
| Field | Meaning |
|---|---|
kind |
review, decision, comment or assistant_check |
id |
the comment, review, decision or check |
thread_id, review_id, review_number |
the thread of a comment; the review of a review, decision or check |
ref, page, element |
a comment’s anchor: its reference, screen and element |
plc, pou, line |
an ST comment’s anchor |
author, ai, at |
who wrote it, whether the AI assistant did, when (Unix ms) |
state |
a review’s state, a decision (approve, reject), a check’s state; empty for a comment |
title, snippet |
the review’s title, and the text around the first match |
Empty fields are left out.
What a caller finds is what the routes the records come from let them read, checked inside the archive’s query: each access key of the scope is granted or not for the caller, and only records whose key is granted are selected.
- Reviews, their decisions and the assistant’s checks: any signed-in user, as
GET /api/collab/reviewsand a review’s page. - A comment on a screen: the screen’s read right, as
GET /api/collab/threads(an Administrator reads every screen). - A PLC’s ST comments: any signed-in user, as the PLC thread route.
- Comments on tags are not archived (their read right is per tag). The assistant’s threads on tags are found through its check’s text only.
The archive holds every person’s review discussion, so the AI co-pilot account is refused here even though the AI account gate already keeps it off non-MCP routes. The assistant reads a review’s threads through its own read tools, as the requesting person.
Every value is a bound query parameter; wildcards in the words are escaped. Thread state (open, resolved) is not a filter, and there is no relevance ranking.
Refusals:
| Status | When |
|---|---|
400 |
a bad parameter: no scope or both, a bad kind, date or limit, to not after from, text too long or with control characters |
403 |
the AI co-pilot account (ai_copilot_refused), or an edition without the feature |
501 archive_not_built |
a build without the columnar engine |
503 archive_unavailable |
the archive cannot be opened or read: “reviews and comments are not affected”, try again |
A 503 never affects reviews, decisions, comments or deploys: they do not depend on the archive.
The archive
Section titled “The archive”The search reads a local file, <data>/collab/archive.duckdb, held by the columnar engine. It is derived from the collaboration store (see Storage): opened on the first search, and at start-up once it exists, it reads every current review, decision, check and comment thread, then follows each write as it is stored, on this node or another. Writing a review or a comment never waits on it. When it cannot be read the search answers 503; when it opens again it catches up (the scan is idempotent, records are deduplicated by id).
Deleting the file loses nothing: it is rebuilt from the store. It is not encrypted (the store it mirrors is not either) and is not in backups.
Read routes for the studio
Section titled “Read routes for the studio”These only read. They change no thread, review, policy or deploy.
GET /api/collab/members
Section titled “GET /api/collab/members”The people the studio offers as reviewers and @mentions: active accounts at Lead_Engineer level (80) or above, never the AI co-pilot. Each is username, full_name, level and role, and nothing else. Only Lead_Engineer or Administrator may read it (403 otherwise). The user directory itself stays an administrator’s.
GET /api/collab/thread-counts?project=<id>&screen=<id>&tag=<path>
Section titled “GET /api/collab/thread-counts?project=<id>&screen=<id>&tag=<path>”The thread counts behind the display tree and tag badges. Name up to 500 screens of the project (screen=, repeated; project= is then required) and tags (tag=, repeated). Answer: {"project", "screens": {<id>: counts}, "tags": {<path>: counts}}, where counts are open (outdated ones included), outdated and resolved. A screen or tag the user may not read is left out.
GET /api/collab/plc/source?plc=<id>
Section titled “GET /api/collab/plc/source?plc=<id>”The program the PLC runs now, read from the PLC with the user’s own rights: {"plc", "source", "version", "hash"}. version is what an ST anchor records; hash is what a PLC review of this source signs. Lead_Engineer or Administrator. 404 when the PLC is not configured, 502 when it cannot be read. Without plc=, the server’s default PLC.
GET /api/collab/plc/targets?plc=<id>
Section titled “GET /api/collab/plc/targets?plc=<id>”What a review of the PLC’s program can cover, for the review dialog: the current project revision and the PLC’s stored versions, each read from the PLC with the user’s own rights. Who: as for GET /api/collab/plc/source (Lead_Engineer or Administrator, never the AI co-pilot). It only reads; a review reads the program itself when it is requested. A part that cannot be read is null with its error, and the other is still answered. A review records the target it was requested for (plc_target).
Every write is recorded in the audit trail (the hash-chained ledger) and in the security audit:
| Ledger category | Events |
|---|---|
COLLAB |
COLLAB_THREAD_CREATED, COLLAB_REPLY, COLLAB_THREAD_RESOLVED, COLLAB_THREAD_REOPENED |
REVIEW |
REVIEW_REQUESTED, REVIEW_APPROVED, REVIEW_REJECTED (with the signature manifest), REVIEW_WITHDRAWN, REVIEW_POLICY_CHANGED, DEPLOY_GATED (a refused deploy), DEPLOY_REVIEW_SATISFIED (a deploy the gate let through, with the review and its approvers), PLC_APPROVAL_ISSUED, PLC_APPROVAL_REFUSED (approvals for eaxPLC Web Studio deploys), ASSISTANT_REVIEW_STARTED (written first, by the person), ASSISTANT_REVIEW_COMPLETED (by ai-assistant, before the check is stored: the card, the digest, the tools run and refused), ASSISTANT_REVIEW_FAILED |
Each finding’s comment thread is a COLLAB_THREAD_CREATED by ai-assistant. The security audit also records ESIG_VERIFIED, ESIG_OBJECT_TICKET_ISSUED, ESIG_OBJECT_TICKET_REDEEMED and ESIG_OBJECT_TICKET_REJECTED, and AI_REVIEW / AI_REVIEW_FAILED with the provider, the tokens and the tools. A refused automatic deploy is recorded as AUTO_DEPLOY_REFUSED once per set of changes.
Live updates
Section titled “Live updates”After any change, the server sends {"type": "COLLAB_CHANGED", "kind": "thread"} (or "review") on the studio’s WebSocket. The message carries no content. The client reads the change again with its own rights.
Storage
Section titled “Storage”Threads and reviews are kept by the server’s embedded NATS broker in an account of their own, EAX_COLLAB. The server’s own connection is the only client in that account. No user, device or browser connection can read or write it: browsers use this HTTP API. On an HA cluster the data is replicated to the three nodes.
The search reads a local archive derived from this store, rebuilt from it when needed: see The archive.