allternit-ai/src/components/bots/meet/. One build serves Allternit Desktop, ai.allternit.com (desktop and phone layouts) and the m.allternit.com PWA. User guide: Meet your bots.
With no main bot,
BotModeRail still opens Set up your main bot first; the card follows once there is one.
Files
Finishing
Nothing is created before Start the job.runFinish() then runs in order, recording each item as ok, skipped or failed with the reason:
- Main bot:
setUpPrimaryBot(A://, dressed with the picked look) or the connected bot the picker connected, thensetMainBot. - Team bots: each template through the same apply path as the template gallery, skipping templates already on the account (
config.templateId). Each wears its template’slook(castAvatarConfig).skipRoutinesstops the template from installing its own routines. - Routines: each kept draft with its edited cron and on/off state.
- Thread #1: the bot’s main chat, with the edited job text sent once as the user’s message.
handoffs not on the team) are created with their routines paused.
Seen flag
src/lib/bots/bots-intro.ts: one flag for both entries, Clerk user.unsafeMetadata.botsIntroSeenAt. Web and the PWA read and write it with the Clerk client. Desktop has no Clerk client, only a session JWT, so it reads it once from GET /api/v1/me/flags on the cloud API (waiting up to 3 s before deciding) and writes it with PUT (see Me API). If this device saw the card before the account knew, it tells the account. localStorage allternit-bots-intro-seen is the cache, and the fallback when signed out, offline, or the endpoint answers 404/503. Set on finish and on skip. requestBotsIntroReplay() (Bots rail ⋯ → Replay intro, the Bots header on a phone) reopens it in botmode.
Routines scheduler
src/components/bots/schedule/ is shared by the card and Bot Mode → Routines → Calendar (views/bots/home/BotRoutinesSchedule.tsx):
routine-rule.ts:RoutineRule(daily·weekdays·weekly·monthly·intervalwith a window),ruleFromCron/ruleFromSchedule/ruleToCron(round-trips every built-in template cron),ruleLabel,moveRule,ruleForSlot. Intervals are limited to the editor’s choices (30 min, 1–4 h); anything else stays off the calendar and is listed under it.RoutineScheduler.tsx: controlled Day (default) / Week hour grids from 6 AM to 10 PM and a Month view. Empty-slot click →onRequestNew(day, minute); chip click →onRequestEdit(id); vertical drag →onMove(id, minute)in 15-minute steps. Interval routines draw as one striped band.RoutineEditor.tsx: dialog (bottom sheet on phones), portalled todocument.body, Escape in the capture phase.- Bot Mode saves through
bot-routine.service.ts:createBotRoutineOnCron,updateBotRoutine(PUT/api/v1/automation/routines/:idwithschedule_type: cron; metadata is merged onto the stored row because the server replaces it whole) anddeleteBotRoutineById. The API resetsnext_run_aton a schedule change.
Seeing it locally
Run Vite and open/preview-meet.html?entry=setup or ?entry=botmode (&theme=dark), at desktop or phone width. The preview is not a production rollup input.