Review Studio Client, Snapshots and Native Workbench
reviewStudioR-api.RdAuthenticated, revision-aware access to classical and recursive review workflows. The service owns scientific rules and mutable state; the client preserves complete role-filtered snapshots.
Usage
review_studio_app(url = "http://127.0.0.1:8020")
rs_add_edge(client, pid, ..., revision, request_id = rs_request_id())
rs_adjudicate(client, pid, ..., revision, request_id = rs_request_id())
rs_assist(client, pid, task = c("screen", "extract"), report, route = c("local", "cloud"),
asset = NULL, field = NULL, target = NULL, start = NULL, end = start)
rs_clock(client, pid, ..., revision, request_id = rs_request_id())
rs_close(client, pid, ..., revision, request_id = rs_request_id())
rs_command(client, pid, op, data = list(), revision, request_id = rs_request_id())
rs_connect(url = "http://127.0.0.1:8020", token, timeout = 30)
rs_correct_report(client, pid, ..., revision, request_id = rs_request_id())
rs_create_project(client, spec)
rs_data(x)
rs_define_field(client, pid, ..., revision, request_id = rs_request_id())
rs_disconnect(client)
rs_download_original(client, pid, asset, path, overwrite = FALSE, sha256 = NULL)
rs_download_page(client, pid, asset, page, path, overwrite = FALSE)
rs_download_release(client, pid, path, overwrite = FALSE)
rs_example()
rs_file_index(client, pid, asset)
rs_finish_run(client, pid, ..., revision, request_id = rs_request_id())
rs_fork(client, pid, reason, changes = list())
rs_freeze_baseline(client, pid, ..., revision, request_id = rs_request_id())
rs_freeze_forward(client, pid, ..., revision, request_id = rs_request_id())
rs_health(client)
rs_import_file(client, pid, path, run, format = c("csv", "ris", "nbib", "bib"), revision, request_id = rs_request_id())
rs_import_records(client, pid, ..., revision, request_id = rs_request_id())
rs_inspect(client, pid, ..., revision, request_id = rs_request_id())
rs_job(client, pid, job)
rs_link(client, pid, ..., revision, request_id = rs_request_id())
rs_merge_reports(client, pid, ..., revision, request_id = rs_request_id())
rs_metadata(x)
rs_new_result(data, metadata, payload = list(), kind = c("projects", "snapshot"))
rs_payload(x)
rs_project_state(client, pid)
rs_projection(x, collection = c("occurrences", "runs", "obligations", "links", "results", "assessments",
"jobs", "suggestions"), verified_only = FALSE)
rs_projects(client)
rs_protocol(title, mode = c("classical", "rsr"), backward = c("none", "one_pass"), cutoff, narrow,
broad, seed_rule, synthesis, sources, reasons, members = character(), cloud = FALSE, review_process = c("human_dual",
"automated_demonstration"))
rs_record_gap(client, pid, ..., revision, request_id = rs_request_id())
rs_register_run(client, pid, ..., revision, request_id = rs_request_id())
rs_request_id()
rs_resolve_link(client, pid, ..., revision, request_id = rs_request_id())
rs_retrieve(client, pid, ..., revision, request_id = rs_request_id())
rs_save_assessment(client, pid, ..., revision, request_id = rs_request_id())
rs_save_result(client, pid, ..., revision, request_id = rs_request_id())
rs_set_membership(client, pid, ..., revision, request_id = rs_request_id())
rs_set_rights(client, pid, ..., revision, request_id = rs_request_id())
rs_split_record(client, pid, ..., revision, request_id = rs_request_id())
rs_upload_pdf(client, pid, path, report, name = basename(path), revision, request_id = rs_request_id())
rs_validate(x)
rs_verify_assessment(client, pid, ..., revision, request_id = rs_request_id())
rs_verify_release(path, event_chain = FALSE, python = Sys.which("python3"))
rs_verify_result(client, pid, ..., revision, request_id = rs_request_id())
rs_vote(client, pid, ..., revision, request_id = rs_request_id())
rs_wait_job(client, pid, job, timeout = 120, interval = 0.5)
run_review_studio(url = "http://127.0.0.1:8020", host = "127.0.0.1", port = NULL, launch.browser = interactive(),
...)Arguments
- url
Explicit service origin; HTTP is limited to loopback.
- client
A client returned by
rs_connect().- pid
Sixteen-character lowercase hexadecimal project ID.
- ...
Named action fields listed in Details, or additional arguments to shiny::runApp().
- revision
The observed nonnegative server revision; mandatory on mutations.
- request_id
Stable 8 to 100 byte request ID. Reuse only with the same operation and body after reconciliation.
- task
Screen or extract suggestion task.
- report
Report identifier, distinct from a study identifier.
- route
Configured local or authorized cloud route.
- asset
Opaque document asset identifier.
- field
Registered extraction field identifier.
- target
Requested comparison, population and visit.
- start
Inclusive first supplied page.
- end
Inclusive last supplied page.
- op
Public backend command name.
- data
A data frame for a result constructor, or a uniquely named command-data list.
- token
Personal bearer token. Kept in process-local memory, never serialized in the client.
- timeout
Positive timeout in seconds.
- spec
A validated protocol.
- x
An S3 result or snapshot.
- path
Local source or destination file path.
- overwrite
Explicit consent to replace an existing destination.
- sha256
Optional expected SHA-256 of original bytes.
- page
One-based document page.
- reason
Documented reason for an amendment.
- changes
Named changes to the protocol carried into an amended version.
- run
Registered source-run identifier.
- format
Original bibliography format.
- job
Queued job identifier.
- metadata
A named list describing the snapshot revision or project directory.
- payload
The complete lossless role-filtered server response.
- kind
Result kind: projects or snapshot.
- collection
Role-filtered collection to project as a display table.
- verified_only
Retain only current accepted results or assessments.
- title
Review title.
- mode
Classical or recursive saturation review.
- backward
Classical backward policy: none or one_pass. RSR always uses recursive.
- cutoff
Prespecified evidence cutoff as YYYY-MM-DD.
- narrow
Narrow original-study eligibility and synthesis question.
- broad
Broad retrieval question.
- seed_rule
Prospective rule defining sources eligible for citation inspection.
- synthesis
Prespecified synthesis.
- sources
Named source list separated by newlines.
- reasons
Clinical exclusion codes separated by vertical bars.
- members
Character vector of assigned account names; an empty vector is allowed.
- cloud
Whether the protocol permits separately authorized report-specific cloud routing.
- review_process
Independent human review or explicitly labelled computational demonstration; the latter does not claim human validation.
- name
Name of an uploaded document.
- event_chain
Verify Python-canonical event hashes as well as member digests.
- python
Path to Python 3 for canonical event verification.
- interval
Positive polling interval in seconds.
- host
Shiny listening host, loopback by default.
- port
Shiny port; NULL uses Shiny defaults.
- launch.browser
Whether to open an interactive browser.
Details
All mutation wrappers accept named fields in .... Required strings are nonempty; choices and numeric or logical fields are validated before transport. Every write has an explicit observed revision and a stable request identifier. A timeout after a write is an uncertain outcome, never an instruction to submit a new request. Project creation and fork have no idempotency key and must be reconciled manually.
rs_register_runRegister source run. Required fields: id, source, platform, query, date, phase. Optional: seeds, filters, archive, peer_review. Choices: phase = direct/forward/update/other.
rs_import_recordsImport source records. Required fields: run, rows.
rs_finish_runFinish source run. Required fields: run, count, status. Optional: note. Choices: status = done/gap.
rs_merge_reportsMerge duplicate reports. Required fields: from_report, into_report, basis.
rs_split_recordSplit an occurrence. Required fields: report, record, new_report, title, basis. Optional: abstract, doi, pmid.
rs_correct_reportCorrect report metadata. Required fields: report, title, basis. Optional: abstract.
rs_voteSubmit independent role vote. Required fields: report, stage, original, seed, kind, basis, location. Optional: reason, lists. Choices: stage = abstract/full; original = yes/no/unclear; seed = yes/no/unclear; kind = primary/companion/review/mixed/protocol/registry/other.
rs_adjudicateAdjudicate two votes. Required fields: report, stage, original, seed, kind, basis, location. Optional: reason, lists. Choices: stage = abstract/full; original = yes/no/unclear; seed = yes/no/unclear; kind = primary/companion/review/mixed/protocol/registry/other.
rs_retrieveRecord retrieval. Required fields: report, status, basis. Choices: status = retrieved/awaiting/unavailable.
rs_record_gapDocument exhausted retrieval. Required fields: report, basis.
rs_linkPropose study linkage. Required fields: report, study, component, basis.
rs_resolve_linkResolve proposed linkage. Required fields: report, study, component, basis, status. Choices: status = confirmed/rejected/gap.
rs_freeze_forwardFreeze forward seeds. Required fields: none.
rs_freeze_baselineFreeze common baseline. Required fields: none.
rs_add_edgeAdd citation edge. Required fields: task, title, component, relation, location, date. Optional: report, doi, pmid, abstract. Choices: component = original/review/shared.
rs_inspectComplete source list. Required fields: task, status, basis. Optional: count. Choices: status = inspected/confirmed_empty/irretrievable.
rs_set_rightsSet report processing rights. Required fields: report, allow, basis.
rs_clockRecord active work. Required fields: action. Optional: segment, stage. Choices: action = start/pause; segment = common/one_pass/incremental.
rs_closeClose discovery corpus. Required fields: status, basis. Choices: status = complete/with_documented_gaps/truncated.
rs_define_fieldDefine extraction field. Required fields: id, label, instruction, type. Choices: type = text/number/integer/boolean.
rs_save_resultSave extraction draft. Required fields: study, report, component, comparison, outcome, visit, population, field, measurement, basis. Optional: arm, value, units, uncertainty, anchors, manual_location, manual_excerpt, suggestion, supersedes. Choices: measurement = reported/measured_unavailable/unmeasured/unknown; arm = overall/one_pass/recursive.
rs_verify_resultVerify extraction draft. Required fields: id, verdict, basis. Choices: verdict = accept/reject.
rs_save_assessmentSave assessment draft. Required fields: outcome, basis, scope, tool, version, domain, judgement, location, comparison, result. Optional: study, supersedes. Choices: scope = risk_of_bias/certainty/narrative.
rs_verify_assessmentVerify assessment draft. Required fields: id, verdict, basis. Choices: verdict = accept/reject.
rs_set_membershipAdjudicate reference membership. Required fields: study, eligible, independent, heldout, basis. Choices: eligible = yes/no/unclear; independent = yes/no/unknown; heldout = yes/no/unknown.
The rows import field is an unnamed list of report objects (each with title and optional report, doi, pmid, abstract). The anchors result field is an unnamed list with asset, page, id and quote. Votes at full text may register additional pipe-separated lists. A source-only review cannot supply a primary result.
rs_data() returns stable typed project or report rows. Projects have id, title, mode, revision, closed and created; reports have report, title, doi, pmid, abstract and cloud_ok. Empty responses preserve these column types. Snapshot metadata contains project_id, revision, mode, closure, origin and fetched_at. rs_payload() preserves all server fields including state and jobs. rs_projection() is a display projection: scalar values are character, nested values are JSON, unavailable values are NA, and an empty collection has an id column. Use payload for analysis and exact types.
Credentials live behind a per-client opaque process-local handle. Printing, default str() and serialization do not contain the token. Restored clients in another process require reconnection. Explicit disconnection or garbage collection removes the credential. There is no global active identity. All POSTs send X-Review-Client; public health checks omit authentication. Redirects are refused. GETs have at most two attempts; writes are never automatically retried.
Typed failures inherit rs_error and include rs_validation_error, rs_unauthenticated, rs_forbidden, rs_conflict, rs_timeout, rs_connection_error, rs_server_error, rs_http_error, rs_redirect_error, rs_content_type_error, rs_response_error, rs_request_too_large, rs_response_too_large, rs_integrity_error, rs_file_error and rs_dependency_error. Conditions retain safe status and request ID, never private response bodies.
PDF and bibliography uploads stream bytes with 30 MiB and 8 MiB limits. Decoded JSON responses are limited to 64 MiB during transfer; downloads are limited to 512 MiB. Downloads are staged beside the destination and checked for content type and magic bytes. Replacements use an atomic rename; non-overwriting downloads use an exclusive hard link and fail safely if the filesystem does not support it. Partial downloads are removed. A review release is private. Manifest verification hashes original member bytes. Full event-chain verification invokes the bundled Python canonicalizer. Unsafe archive paths, duplicate names, ambiguous manifest keys and incomplete manifests are rejected without extraction. Archives are limited to 512 MiB compressed and expanded bytes and 1,000 members. Hash and event-chain consistency do not authenticate the origin of an archive.
Job lookup distinguishes queued, running, done, failed and unknown. Unknown includes jobs no longer present in the last 100 server jobs. A completed screening suggestion may remain masked. Polling has a deadline and does not cancel server work.
The optional Shiny app uses native forms and exported client functions. It does not expose a generic chat endpoint or automatically promote suggestions to decisions. Shiny is loaded only when the app is requested.
Value
Connections return rs_client; protocols return rs_protocol; directories and project states return validated rs_result objects (rs_projects or rs_snapshot). Mutations return named lists containing the revision, project ID, asset or job ID. Download helpers return path, SHA-256, byte length and content type. Accessors return a copy of the corresponding plain R value. rs_validate returns its input invisibly. rs_disconnect returns NULL invisibly. rs_verify_release returns explicit manifest/event-chain status. review_studio_app returns shiny.appobj; run_review_studio runs it.
Examples
x <- rs_example()
rs_data(x)
#> report title doi pmid abstract cloud_ok
#> 1 A1 Fictional trial A Constructed teaching example FALSE
#> 2 R Fictional source review Constructed review-only seed FALSE
rs_metadata(x)$provenance
#> [1] "Constructed offline fixture; no empirical review was run."
rs_request_id()
#> [1] "962dc66a1327653348aa0f5bb1b240375c3e88412acb17e2"