artifact_edit: Change an artifact the project already holds: reword one element, patch one section's frame file with search/replace edits, write a slide's whole file, insert, remove or reorder a slide, revise from an instruction, set a section's text, move it to another folder, or change the schemas artifacts are written under. Creating one is the update node's own work and is not here.Teamruns on a thread, stream it
| Field | Type | Required | Description |
|---|
| action | string | required | one of set_element | patch | write_frame | insert_frame | remove_frame | reorder | revise | refresh | move | schema_upsert | schema_fork | schema_delete |
| artifactId | string | optional | the artifact to change; required for every action but the schema ones |
| instruction | string | optional | for revise: the one change to make, in plain words |
| paragraphId | string | optional | for patch, write_frame, remove_frame, reorder, revise and refresh: the section or slide it lands on, as the outline lists it |
| baseVersion | number | optional | for patch, write_frame and insert_frame: the version the outline or frame read answered |
| edits | object | optional | for patch: [{"old": text copied exactly from the frame, occurring once, "new": its replacement}] |
| after | string | optional | for insert_frame and reorder: the slide it follows, as the outline lists it; empty places it first |
| content | string | optional | for set_element: the element's new text; for write_frame and insert_frame: the slide's whole <section> file |
| elementId | string | optional | for set_element: the element to change, as artifact_read's elements lists it |
| folder | string | optional | for move: the folder path the artifact moves to |
| schemaId | string | optional | for schema_fork and schema_delete: the schema to fork or remove |
| schema | object | optional | for schema_upsert: the whole schema, which replaces what is stored under its id |
Contract A small change is set_element or patch; a new or redesigned slide is write_frame or insert_frame; never regenerate the whole artifact to change part of it.
Contract A patch or write built on a version the artifact has left is refused with the frame as it now stands: merge onto that and retry, and after three refusals stop and report.
Contract A revise runs the model over the artifact; name the section and it lands as a patch of that section's frame, leave it out and the whole artifact is rewritten.
Contract refresh brings ONE section artifact_read marks stale to its cited cells' current values, and runs only when the person asks for it.
Contract set_element changes ONE element: a headline, a bullet, a paragraph or a table cell is reworded where it stands and nothing else moves, so a small change to a slide or a section is this, never a revise.
Contract schema_upsert replaces the stored schema under its id, so read it with artifact_read first and carry forward every section to keep. Deleting a schema never deletes the artifacts written under it.