import type { PartnerStore } from '../store.js'; import type { Companion } from '../domain.js'; import type { BrowserService } from '../browser/service.js'; import { type ContinuousTask, type ContinuousCharge } from './domain.js'; export interface ContinuousReview { scene: string; event: string; evidence: string; speak: boolean; ended: boolean; kind?: 'scene' | 'companionship'; } export interface ContinuousPorts { review(owner: Companion, task: ContinuousTask, signal: AbortSignal, conversation?: string): Promise; conversation?(task: ContinuousTask): string; wake(owner: string, task: ContinuousTask): Promise; busy(sessionId: string): boolean; cancel(task: ContinuousTask): void; warn(message: string): void; } export declare class ContinuousService { private store; private browser; private ports; private now; private timer; private closed; private jobs; constructor(store: PartnerStore, browser: BrowserService, ports: ContinuousPorts, now?: () => number); list(owner: string): { tasks: { pendingCount: number; id: string; routeId: string; sessionId: string; title: string; instruction: string; until: string; tabId: string; url: string; selector: string; browserRevision: number; revision: number; status: import("./domain.js").ContinuousStatus; phase: "waiting" | "checking" | "ready" | "budget" | "blocked"; reason: string; createdAt: number; updatedAt: number; checkedAt?: number; changedAt?: number; reviewedAt?: number; wakeAt?: number; nextCheckAt: number; nextReviewAt: number; failures: number; checks: number; changes: number; reviews: number; wakes: number; scene: string; lastEvent: string; lastEvidence?: string; endEvidence?: string; claim?: { messageId: string; revision: number; at: number; }; sourceEvidence: string; pendingEvent?: { text: string; evidence: string; at: number; }; budgetUntil?: number; nextSocialAt?: number; }[]; budget: number; used: number; budgetNotice: string; }; private owner; task(owner: string, id: string): ContinuousTask; current(owner: string, task: ContinuousTask): boolean; create(owner: string, raw: Record, evidence: string, signal?: AbortSignal): Promise; control(owner: string, id: string, action: 'pause' | 'resume' | 'stop' | 'complete', reason?: string, expected?: number): Promise; budget(owner: string, value: number): Promise; budgetResetAt(owner: string): number; reserve(owner: string, amount: number, kind: ContinuousCharge['kind']): Promise; settle(owner: string, id: string, used: number): Promise; recover(): Promise; patch(owner: string, id: string, revision: number, change: (task: ContinuousTask) => void): Promise; start(): void; tick(): void; check(owner: string, task: ContinuousTask, signal: AbortSignal): Promise; private deliverPending; close(): Promise; } export declare function readExpression(selector: string): string; //# sourceMappingURL=service.d.ts.map