import { C as OpenClawPluginApi } from "../../types-zNvdN8-r.js"; //#region extensions/workboard/src/types.d.ts declare const WORKBOARD_STATUSES: readonly ["backlog", "todo", "running", "review", "blocked", "done"]; declare const WORKBOARD_PRIORITIES: readonly ["low", "normal", "high", "urgent"]; declare const WORKBOARD_EXECUTION_ENGINES: readonly ["codex", "claude"]; declare const WORKBOARD_EXECUTION_MODES: readonly ["autonomous", "manual"]; declare const WORKBOARD_EXECUTION_STATUSES: readonly ["idle", "running", "review", "blocked", "done"]; declare const WORKBOARD_EVENT_KINDS: readonly ["created", "edited", "moved", "linked", "claimed", "heartbeat", "execution_updated", "attempt_started", "attempt_updated", "comment_added", "link_added", "proof_added", "artifact_added", "diagnostic", "notification", "archived", "unarchived", "stale"]; declare const WORKBOARD_ATTEMPT_STATUSES: readonly ["running", "succeeded", "failed", "blocked", "stopped"]; declare const WORKBOARD_LINK_TYPES: readonly ["blocks", "blocked_by", "relates_to"]; declare const WORKBOARD_PROOF_STATUSES: readonly ["passed", "failed", "skipped", "unknown"]; declare const WORKBOARD_TEMPLATE_IDS: readonly ["bugfix", "docs", "release", "pr_review", "plugin"]; declare const WORKBOARD_DIAGNOSTIC_KINDS: readonly ["stranded_ready", "running_without_heartbeat", "blocked_too_long", "repeated_failures", "missing_proof", "orphaned_session"]; declare const WORKBOARD_DIAGNOSTIC_SEVERITIES: readonly ["warning", "error", "critical"]; declare const WORKBOARD_NOTIFICATION_KINDS: readonly ["completed", "failed", "stale"]; type WorkboardStatus = (typeof WORKBOARD_STATUSES)[number]; type WorkboardPriority = (typeof WORKBOARD_PRIORITIES)[number]; type WorkboardExecutionEngine = (typeof WORKBOARD_EXECUTION_ENGINES)[number]; type WorkboardExecutionMode = (typeof WORKBOARD_EXECUTION_MODES)[number]; type WorkboardExecutionStatus = (typeof WORKBOARD_EXECUTION_STATUSES)[number]; type WorkboardEventKind = (typeof WORKBOARD_EVENT_KINDS)[number]; type WorkboardAttemptStatus = (typeof WORKBOARD_ATTEMPT_STATUSES)[number]; type WorkboardLinkType = (typeof WORKBOARD_LINK_TYPES)[number]; type WorkboardProofStatus = (typeof WORKBOARD_PROOF_STATUSES)[number]; type WorkboardTemplateId = (typeof WORKBOARD_TEMPLATE_IDS)[number]; type WorkboardDiagnosticKind = (typeof WORKBOARD_DIAGNOSTIC_KINDS)[number]; type WorkboardDiagnosticSeverity = (typeof WORKBOARD_DIAGNOSTIC_SEVERITIES)[number]; type WorkboardNotificationKind = (typeof WORKBOARD_NOTIFICATION_KINDS)[number]; type WorkboardExecution = { id: string; kind: "agent-session"; engine: WorkboardExecutionEngine; mode: WorkboardExecutionMode; status: WorkboardExecutionStatus; model: string; sessionKey?: string; runId?: string; startedAt: number; updatedAt: number; }; type WorkboardEvent = { id: string; kind: WorkboardEventKind; at: number; fromStatus?: WorkboardStatus; toStatus?: WorkboardStatus; sessionKey?: string; runId?: string; }; type WorkboardRunAttempt = { id: string; status: WorkboardAttemptStatus; startedAt: number; endedAt?: number; engine?: WorkboardExecutionEngine; mode?: WorkboardExecutionMode; model?: string; sessionKey?: string; runId?: string; error?: string; }; type WorkboardComment = { id: string; body: string; createdAt: number; updatedAt?: number; }; type WorkboardLink = { id: string; type: WorkboardLinkType; createdAt: number; targetCardId?: string; title?: string; url?: string; }; type WorkboardProof = { id: string; status: WorkboardProofStatus; createdAt: number; label?: string; command?: string; url?: string; note?: string; }; type WorkboardArtifact = { id: string; createdAt: number; label?: string; url?: string; path?: string; mimeType?: string; }; type WorkboardStaleState = { detectedAt: number; lastSessionUpdatedAt?: number; reason: string; }; type WorkboardClaim = { ownerId: string; token: string; claimedAt: number; lastHeartbeatAt: number; expiresAt?: number; }; type WorkboardDiagnosticAction = { kind: "claim" | "unblock" | "reassign" | "add_proof" | "open_session"; label: string; }; type WorkboardDiagnostic = { kind: WorkboardDiagnosticKind; severity: WorkboardDiagnosticSeverity; title: string; detail: string; firstSeenAt: number; lastSeenAt: number; count: number; actions: WorkboardDiagnosticAction[]; }; type WorkboardNotification = { id: string; kind: WorkboardNotificationKind; createdAt: number; message: string; sessionKey?: string; runId?: string; }; type WorkboardMetadata = { attempts?: WorkboardRunAttempt[]; comments?: WorkboardComment[]; links?: WorkboardLink[]; proof?: WorkboardProof[]; artifacts?: WorkboardArtifact[]; claim?: WorkboardClaim; diagnostics?: WorkboardDiagnostic[]; notifications?: WorkboardNotification[]; templateId?: WorkboardTemplateId; archivedAt?: number; stale?: WorkboardStaleState; failureCount?: number; }; type WorkboardCard = { id: string; title: string; notes?: string; status: WorkboardStatus; priority: WorkboardPriority; labels: string[]; agentId?: string; sessionKey?: string; runId?: string; taskId?: string; sourceUrl?: string; execution?: WorkboardExecution; position: number; createdAt: number; updatedAt: number; startedAt?: number; completedAt?: number; events?: WorkboardEvent[]; metadata?: WorkboardMetadata; }; type WorkboardListResult = { cards: WorkboardCard[]; statuses: readonly WorkboardStatus[]; }; //#endregion //#region extensions/workboard/src/store.d.ts type PersistedWorkboardCard = { version: 1; card: WorkboardCard; }; type WorkboardKeyedStore = { register(key: string, value: PersistedWorkboardCard): Promise; lookup(key: string): Promise; delete(key: string): Promise; entries(): Promise>; }; type WorkboardCardInput = { title?: unknown; notes?: unknown; status?: unknown; priority?: unknown; labels?: unknown; agentId?: unknown; sessionKey?: unknown; runId?: unknown; taskId?: unknown; sourceUrl?: unknown; execution?: unknown; metadata?: unknown; templateId?: unknown; position?: unknown; }; type WorkboardCardPatch = Partial; type WorkboardCommentInput = { body?: unknown; }; type WorkboardLinkInput = { type?: unknown; targetCardId?: unknown; title?: unknown; url?: unknown; }; type WorkboardProofInput = { status?: unknown; label?: unknown; command?: unknown; url?: unknown; note?: unknown; }; type WorkboardArtifactInput = { label?: unknown; url?: unknown; path?: unknown; mimeType?: unknown; }; type WorkboardClaimInput = { ownerId?: unknown; token?: unknown; ttlSeconds?: unknown; }; type WorkboardHeartbeatInput = { token?: unknown; ownerId?: unknown; note?: unknown; }; type WorkboardBulkInput = { ids?: unknown; patch?: unknown; archived?: unknown; }; type WorkboardMutationScope = { ownerId?: unknown; token?: unknown; }; type WorkboardDiagnosticsResult = { diagnostics: Array<{ card: WorkboardCard; diagnostics: WorkboardDiagnostic[]; }>; count: number; }; declare class WorkboardStore { private readonly store; private mutationQueue; constructor(store: WorkboardKeyedStore); private enqueueMutation; private updateMetadata; list(): Promise; get(id: string): Promise; create(input: WorkboardCardInput): Promise; update(id: string, patch: WorkboardCardPatch): Promise; private updateCard; move(id: string, status: unknown, position: unknown): Promise; delete(id: string): Promise<{ deleted: boolean; }>; addComment(id: string, input: WorkboardCommentInput, scope?: WorkboardMutationScope): Promise; addLink(id: string, input: WorkboardLinkInput): Promise; addProof(id: string, input: WorkboardProofInput, scope?: WorkboardMutationScope): Promise; addProofWithArtifact(id: string, proofInput: WorkboardProofInput, artifactInput: WorkboardArtifactInput, scope?: WorkboardMutationScope): Promise; addArtifact(id: string, input: WorkboardArtifactInput, scope?: WorkboardMutationScope): Promise; claim(id: string, input: WorkboardClaimInput): Promise<{ card: WorkboardCard; token: string; }>; heartbeat(id: string, input: WorkboardHeartbeatInput): Promise; releaseClaim(id: string, input?: WorkboardHeartbeatInput & { status?: unknown; }): Promise; unblock(id: string, scope?: WorkboardMutationScope): Promise; bulkUpdate(input: WorkboardBulkInput): Promise<{ cards: WorkboardCard[]; }>; archive(id: string, archived: unknown): Promise; exportCards(): Promise<{ cards: WorkboardCard[]; exportedAt: number; }>; diagnostics(now?: number): Promise; refreshDiagnostics(now?: number): Promise; buildWorkerContext(id: string): Promise; static open(openKeyedStore: (options: { namespace: string; maxEntries: number; }) => WorkboardKeyedStore): WorkboardStore; } //#endregion //#region extensions/workboard/src/gateway.d.ts declare function registerWorkboardGatewayMethods(params: { api: OpenClawPluginApi; store?: WorkboardStore; }): void; //#endregion export { type WorkboardCard, type WorkboardClaim, type WorkboardDiagnostic, type WorkboardListResult, type WorkboardPriority, type WorkboardStatus, registerWorkboardGatewayMethods };