telys_upsert
Insert new text entries and replace existing ones by external ID, persisting versioned updates so repeated calls converge without duplicates.
Instructions
Add-or-replace text rows by external id: new ids are inserted; existing ids are re-embedded and replaced as a versioned update (never a duplicate physical row), then persisted. Use when the caller owns the ids and a repeated call must converge instead of conflicting — this is the idempotent write path. Required: collection, texts, ids (explicit JSON null is treated as omitted = plain telys_add with generated ids). Optional: metadata (one object per text) and partition_by (default 'scope'; the collection is auto-created when absent). Fails on ids/texts length mismatch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | ||
| texts | Yes | ||
| metadata | No | ||
| collection | Yes | ||
| partition_by | No | scope |