feat(wechat): add Intent Transaction Layer with unified task schema
Introduce Draft → Confirm → Commit flow for WeChat schedule intents behind feature flags, plus h5_tasks dual-write/read aggregation and rollout scripts so reminders and automations get explicit user confirmation before persisting. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
export function isIntentTransactionEnabled(env = process.env) {
|
||||
return String(env.H5_INTENT_TRANSACTION_ENABLED ?? '').trim() === '1';
|
||||
}
|
||||
|
||||
export function intentDraftTtlMs(env = process.env) {
|
||||
const raw = Number(env.H5_INTENT_DRAFT_TTL_MS ?? 30 * 60 * 1000);
|
||||
return Number.isFinite(raw) && raw > 0 ? raw : 30 * 60 * 1000;
|
||||
}
|
||||
Reference in New Issue
Block a user