import { CancellationToken } from "../../../../base/common/cancellation.js"; import { IObservable, IReader } from "../../../../base/common/observable.js"; import { OnboardingOutcome, IOnboardingScenario } from "./onboardingScenario.js"; export declare const IOnboardingScenarioService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; /** * The presentation-agnostic onboarding engine. It decides *when* and *whether* * a scenario runs (eligibility, scheduling, once-per-user persistence) and * delegates *how* it is rendered to a registered presentation. */ export interface IOnboardingScenarioService { readonly _serviceBrand: undefined; /** Whether a scenario is queued or presenting, so other onboarding surfaces can wait for it. */ readonly isPresenting: IObservable; /** * Begin watching scenario eligibility. Automatic scenarios may start as soon * as they become eligible. Safe to call multiple times (no-op after first). */ start(): void; /** * Run on demand, bypassing the once-per-user and `onboarding.enabled` gates but serialized with other scenarios. * Cancellation aborts the queued or active run (including joined callers) and waits for presentation cleanup. */ runScenario(id: string, token?: CancellationToken): Promise; /** * All registered scenarios (across presentation kinds). Useful for a tutorial * page that lists everything the user can replay. */ getScenarios(): readonly IOnboardingScenario[]; /** Whether the scenario has already been shown to the user. */ hasBeenShown(id: string): boolean; /** Checks eligibility before a pre-tour nudge and records experiment exposure in both arms. A reader tracks assignment resolution. */ shouldShowNudge(id: string, reader?: IReader): boolean; /** Clear persisted and in-memory "shown" state so a single scenario can be retried. */ reset(id: string): void; /** Clear persisted "shown" state for all scenarios without resetting developer-mode replay guards. */ resetAll(): void; }