Document operators
PublicThe Document family contains 4 operators. Read/write the current document’s metadata and CRDT subdocs.
Operators in this family
Section titled “Operators in this family”document.clone
Section titled “document.clone”Duplicates a source document into a new document row, copying all four subdoc snapshots (graph, draw, meta, comments). Defaults to the current run’s document. Collaborators are not copied.
Version 1.0.0 · Semantics side_effect · Visibility advanced
Config
Section titled “Config”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
new_slug | string | no | — | Slug for the new document. Defaults to null (set via Document Write later). |
new_title | string | no | — | Title for the new document. Defaults to ‘<source title> (copy)’. |
source_document_id | string | no | — | UUID of the document to clone. Defaults to the current run’s document. |
Input ports
Section titled “Input ports”No input ports.
Output ports
Section titled “Output ports”| Port | Type | Required | Description |
|---|---|---|---|
output | object | no | Cloned Document |
document.extract
Section titled “document.extract”Extracts text, tables, or metadata from documents (PDF, DOCX, etc.).
Version 1.0.0 · Semantics passthrough · Visibility advanced
Config
Section titled “Config”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
extract_mode | ”text” | “tables” | “metadata” | “all” | no | "text" | |
page_range | string | no | — | Page range (e.g. ‘1-5’). Blank = all pages. |
Input ports
Section titled “Input ports”| Port | Type | Required | Description |
|---|---|---|---|
input | any | yes | File |
Output ports
Section titled “Output ports”| Port | Type | Required | Description |
|---|---|---|---|
metadata | object | no | Metadata |
text | string | no | Text |
document.list_collaborators
Section titled “document.list_collaborators”Returns the collaborator roster for a document with their permission bits. Defaults to the current run’s document. The email and name fields are surfaced as null — the collaborator row carries only the opaque user id.
Version 1.0.0 · Semantics passthrough · Idempotent · Visibility advanced
Config
Section titled “Config”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
document_id | string | no | — | UUID of the document to list collaborators for. Defaults to the current run’s document. |
Input ports
Section titled “Input ports”No input ports.
Output ports
Section titled “Output ports”| Port | Type | Required | Description |
|---|---|---|---|
output | object | no | Collaborators |
document.publish
Section titled “document.publish”Captures all four subdocs of the target document (graph, draw, meta, comments) into a new revision row, marks the revision as published, and sets it as the document’s published_revision_id.
Version 1.0.0 · Semantics side_effect · Visibility advanced
Config
Section titled “Config”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
document_id | string | no | — | UUID of the document to publish. Defaults to the current run’s document. |
revision_label | string | no | — | Optional label echoed in the output. Defaults to ‘publish-<timestamp>’. |
Input ports
Section titled “Input ports”No input ports.
Output ports
Section titled “Output ports”| Port | Type | Required | Description |
|---|---|---|---|
output | object | no | Published Revision |
Source schemas
Section titled “Source schemas”Every operator above is rendered from its JSON schema in /opt/glyph/schemas/operators/:
schemas/operators/document.clone.jsonschemas/operators/document.extract.jsonschemas/operators/document.list_collaborators.jsonschemas/operators/document.publish.json