Tide · API
tide.ingest
tide.ingest records a fact: a write the host made, or an external signal. It stores one row in the ledger and returns the fact as stored. No reflex is matched and no effect executes until the next advance.
{
id: 'booking.confirm',
intent: 'Confirm a booking the moment it is made.',
on: { fact: { entity: 'bookings', op: 'insert' } },
effect: {
name: 'mail.send',
input: {
to: { $ref: '$.row.member' },
night: { $ref: '$.row.night' },
},
},
}{
kind: 'write',
entity: 'bookings',
op: 'insert',
row: {
id: 'B-2038',
member: 'mia',
night: '2026-10-23',
seats: 2,
},
at: 1792653120000,
}{
stored: {
kind: 'write',
entity: 'bookings',
op: 'insert',
row: {
id: 'B-2038',
member: 'mia',
night: '2026-10-23',
seats: 2,
},
at: 1792653120000,
depth: 0,
},
mailedBeforeAdvance: [],
mailedAfter: [{ to: 'mia', night: '2026-10-23' }],
}Runs in this page on the installed package. The input and the expected output are defined by the example.