opbox

The stored_file.* family (5 verbs). Every verb enters through the one front door: it is capability-checked, permission-checked, scope-checked and audited before it runs (see Security & permissions). Each entry below lists its capability, risk class (which fixes the minimum autonomy level), the minimum caller permission, its availability tier, whether it is idempotent, and any outbound egress.

Createstored_file.create

PropertyValue
Capabilitystored_file.write
Risk classWrite - autonomy L1
Min. permissionMember
AvailabilityOn demand (MCP tier 2)
IdempotentNo
EgressNone - in-box (pure Postgres, no outbound call)

Insert-only first-write at version=1; a unique-key collision NEVER overwrites - it returns {committed

, reason:‘concurrent_write’} (the no-CAS first-write race fix). { key, filename, mimeType, fileSize, contentBase64?, checksum?, storageBackend?=DB, createdById? }.

Call POST /v/stored_file.create with a JSON body; returns JSON (or { error, code }). Also exposed as the MCP tool stored_file.create.

Deletestored_file.delete

PropertyValue
Capabilitystored_file.write
Risk classWrite - autonomy L1
Min. permissionMember
AvailabilityOn demand (MCP tier 2)
IdempotentYes
EgressNone - in-box (pure Postgres, no outbound call)

Delete by key or keys:[...], workspace-fenced (idempotent). Returns count. { key | keys }.

Call POST /v/stored_file.delete with a JSON body; returns JSON (or { error, code }). Also exposed as the MCP tool stored_file.delete.

Getstored_file.get

PropertyValue
Capabilitystored_file.read
Risk classRead - autonomy L0
Min. permissionMember
AvailabilityCore - always on (MCP tier 1)
IdempotentNo
EgressNone - in-box (pure Postgres, no outbound call)
Render schemaYes - drives an inline chat artefact and a GUI panel

a frontend StoredFile by its storage key (or /api/documents URL) and return the decrypted bytes as base64 plus metadata. This is the kernel seam that lets legacy step handlers (BUNDLE, ANNOTATE, PAYMENT) read files that live in the app’s storage backend (DB/S3/disk) without the kernel owning the storage implementation.

Call POST /v/stored_file.get with a JSON body; returns JSON (or { error, code }). Also exposed as the MCP tool stored_file.get.

Get metadatastored_file.get_metadata

PropertyValue
Capabilitystored_file.read
Risk classRead - autonomy L0
Min. permissionMember
AvailabilityCore - always on (MCP tier 1)
IdempotentNo
EgressNone - in-box (pure Postgres, no outbound call)
Render schemaYes - drives an inline chat artefact and a GUI panel

only the metadata of a frontend StoredFile by key.

Call POST /v/stored_file.get_metadata with a JSON body; returns JSON (or { error, code }). Also exposed as the MCP tool stored_file.get_metadata.

Putstored_file.put

PropertyValue
Capabilitystored_file.write
Risk classWrite - autonomy L1
Min. permissionMember
AvailabilityOn demand (MCP tier 2)
IdempotentNo
EgressNone - in-box (pure Postgres, no outbound call)

CAS-or-upsert a stored file. When expectedVersion is present: a single-row compare-and-swap UPDATE WHERE key+version+workspace (version+1); 0 rows -> {committed

, reason:‘concurrent_write’|‘missing’} (PRESERVES the docx round-trip CAS). When absent: upsert with version increment (create at version=1). { key, filename, mimeType, fileSize, contentBase64?, checksum?, storageBackend?=DB, createdById?, expectedVersion? }.

Call POST /v/stored_file.put with a JSON body; returns JSON (or { error, code }). Also exposed as the MCP tool stored_file.put.