Services and events
A background service runs small tasks on a schedule instead of keeping a loop open inside the extension. The service interface lets Glixo start, retry, check and stop those tasks, and save a checkpoint for the next run.
The Mail Watch source checks a Microsoft Graph mailbox for new Inbox messages and emits a mail.received event.
Email and event flow
- The user approves the mailbox connection and the extension's permissions.
- Glixo wakes Mail Watch on its schedule.
- Mail Watch reads changes from Microsoft Graph for the selected folder.
- It saves Graph's continuation value so the next run can continue from the same point.
- It emits an event for each new message and stores its progress.
- Other parts of Glixo can display a notification or use an explicitly configured workflow rule.
The example reads Inbox metadata. Reading message bodies requires a separate permission. Handle repeat deliveries without creating duplicate work: mailbox changes and events can be delivered more than once.
Account configuration
The example requires a protected oauth connection with Microsoft Graph Mail.ReadBasic. Glixo supplies access through the approved connection; the extension does not store the user's token.
maxPagesPerWake limits the number of Graph pages read in one run. It accepts integers from 1 to 5 and defaults to 5. Undeclared configuration fields are rejected. See the configuration schema for its configuration schema.
Events and workflows
Glixo stores events so they can be replayed and acknowledged. SignalR tells connected apps when new data is available; they then read the stored data.
An event does not automatically send content to a model or start an agent. A workflow must have an explicit rule that responds to that event.
Where a service runs
A service runs on the selected Glixo server or cell, not in an open UI panel. A headless cell can run a mailbox listener without a desktop window. On a desktop machine, the Glixo desktop app must remain open to run its local services. Mobile background execution depends on the selected host and the operating system.
Continue with the Mail Watch tutorial. It demonstrates the event flow using development tests, not a supported live-mail integration.