mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-07 07:55:47 +01:00
Add dormant provider contracts, qualified patched adapters, tenant-scoped persistence and lifecycle ownership without activating chat routes. Preserve the experimental integration as dependent PR #13038. Co-Authored-By: Paperclip <noreply@paperclip.ing>
15 lines
544 B
TypeScript
15 lines
544 B
TypeScript
import { pgSequence } from "drizzle-orm/pg-core";
|
|
|
|
// Telegram Stop updates contain a draft ID but no actor or generation. This
|
|
// content-free instance sequence must survive endpoint/company deletion and
|
|
// transaction rollback, so an old Stop can never name a newly allocated draft.
|
|
// Do not attach it to a table or cycle/reset it when clearing chat records.
|
|
export const chatTelegramDraftIds = pgSequence("chat_telegram_draft_ids", {
|
|
startWith: 1,
|
|
minValue: 1,
|
|
maxValue: 2_147_483_647,
|
|
increment: 1,
|
|
cache: 1,
|
|
cycle: false,
|
|
});
|