diff --git a/README.md b/README.md index 894b003..bd0a90b 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,10 @@ intention — a fictional multi-entity group, six months of negotiation and a book of contracts already in force, so every list has something on its first screen. Sign in with `admin@objectos.ai` / `admin123`. +`pnpm demo` also turns on the platform's scheduled work, which is off by +default, so the daily reminder sweeps run on the demo book; a deployment that +wants those reminders in the inbox sets `OS_AUTOMATION_SCHEDULED_WORK_ENABLED=true`. + Point the two locales at different databases; they key their rows on localised titles, so seeding one on top of the other gives you both books. diff --git a/scripts/demo.mjs b/scripts/demo.mjs index 7d5ddbb..b8b8a46 100644 --- a/scripts/demo.mjs +++ b/scripts/demo.mjs @@ -63,6 +63,10 @@ import { connect, createServer } from 'node:net'; const DEMO_SEED_ENV_VAR = 'CLM_DEMO_SEED'; const SEED_LOCALE_ENV_VAR = 'OS_SEED_LOCALE'; +// The platform's switch for package-authored scheduled work (off by default +// since 17.5). The demo boot turns it on so the daily sweeps arm and M3's +// reminders reach the inbox; `pnpm dev` keeps the default (issue #82, ruling C). +const SCHEDULED_WORK_ENV_VAR = 'OS_AUTOMATION_SCHEDULED_WORK_ENABLED'; /** * The account name the fixture's `clm_review.reviewer` resolves against. @@ -653,6 +657,10 @@ const startDemo = () => { env: { ...process.env, [DEMO_SEED_ENV_VAR]: '1', + // Only when unset: an exported value, `false` included, is the operator's + // and wins. A value kept only in a `.env*` file does not — `os dev` never + // overrides a variable already in its environment. + [SCHEDULED_WORK_ENV_VAR]: process.env[SCHEDULED_WORK_ENV_VAR] ?? 'true', ...(process.env[SEED_LOCALE_ENV_VAR] === undefined ? {} : { [SEED_LOCALE_ENV_VAR]: process.env[SEED_LOCALE_ENV_VAR] }),