Document apiReferenceClipboard

clipboard.insert

Insert a parsed clipboard plan, v2 fragment, or raw ClipboardPayload through the v2 pasteFragment kernel operation.

mutates documenttracked modedry runnon-idempotent
doc.clipboard.insert(…)

Expected result

Returns a ClipboardInsertResult with inserted refs, diagnostics, and one paste transaction receipt, or a named fail-closed reason.

Inputs

payloadobject
planobject
fragmentobject
targetobject
changeMode"direct" | "tracked"
fallback"reject-rich" | "plain-with-warning"

Result

Output fields
true
successtruerequired
idstring
insertedEntityAddress[]
updatedEntityAddress[]
removedEntityAddress[]
invalidatedRefsAffectedRef[]
remappedRefsAffectedRefRemapping[]
affectedStoriesStoryLocator[]
textRangeShiftsTextRangeShift[]
txIdstring
false
successfalserequired
failureobjectrequired
Fields
code"INVALID_INPUT" | "INVALID_TARGET" | "INVALID_PAYLOAD" | "EMPTY_FRAGMENT" | "INVALID_FRAGMENT" | "CAPABILITY_UNSUPPORTED" | "CAPABILITY_UNAVAILABLE" | "REVISION_MISMATCH" | "PRECONDITION_FAILED"required
messagestringrequired
detailsunknown

Failures

Pre-apply throws

  • TARGET_NOT_FOUND
  • INVALID_TARGET
  • INVALID_INPUT
1 more codes
  • CAPABILITY_UNAVAILABLE

Non-applied receipt codes

  • INVALID_INPUT
  • INVALID_TARGET
  • INVALID_PAYLOAD
6 more codes
  • EMPTY_FRAGMENT
  • INVALID_FRAGMENT
  • CAPABILITY_UNSUPPORTED
  • CAPABILITY_UNAVAILABLE
  • REVISION_MISMATCH
  • PRECONDITION_FAILED

Raw schemas

Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.

View raw JSON schemas