import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent"; import { type FollowerRuntimeDiagnostic, type SlackBridgeSettings } from "./helpers.js"; import { type LoggedActivityLogEntry } from "./activity-log.js"; import { type SlackScopeDiagnostics } from "./slack-scope-diagnostics.js"; import type { SlackBridgeRuntimeMode } from "./runtime-mode.js"; import type { RalphSnoozeStatus } from "./ralph-loop.js"; import type { SubtreeBrokerStatus, SubtreeSpawnInput, SubtreeSpawnResult } from "./subtree-broker-runtime.js"; export interface PinetCommandsDeps { pinetEnabled: () => boolean; pinetRegistrationBlocked: () => boolean; runtimeMode: () => SlackBridgeRuntimeMode; runtimeConnected: () => boolean; brokerRole: () => "broker" | "follower" | null; agentName: () => string; agentEmoji: () => string; agentOwnerToken: () => string; agentPersonality: () => string | null; agentAliases: () => Set; botUserId: () => string | null; activeSkinTheme: () => string | null; lastDmChannel: () => string | null; followerRuntimeDiagnostic: () => FollowerRuntimeDiagnostic | null; threads: () => Map; allowedUsers: () => Set | null; inboxLength: () => number; recentActivityLogEntries: (limit: number) => ReadonlyArray; slackScopeDiagnostics: () => SlackScopeDiagnostics; settings: () => SlackBridgeSettings; lastBrokerMaintenance: () => { pendingBacklogCount: number; assignedBacklogCount: number; reapedAgentIds: string[]; repairedThreadClaims: number; anomalies: string[]; } | null; ralphSnoozeStatus?: () => RalphSnoozeStatus | null; snoozeRalphLoop?: (input: { durationMs: number; reason?: string | null; }) => RalphSnoozeStatus; clearRalphSnooze?: () => RalphSnoozeStatus; getBrokerControlPlaneHomeTabViewerIds: () => string[]; lastBrokerControlPlaneHomeTabRefreshAt: () => string | null; lastBrokerControlPlaneHomeTabError: () => string | null; subtreeBrokerStatus: () => SubtreeBrokerStatus; getPinetRegistrationBlockReason: () => string; connectAsBroker: (ctx: ExtensionContext) => Promise; connectAsFollower: (ctx: ExtensionContext) => Promise; reloadPinetRuntime: (ctx: ExtensionContext) => Promise; disconnectFollower: (ctx: ExtensionContext) => Promise<{ unregisterError: string | null; }>; startSubtreeBroker: (ctx: ExtensionContext) => Promise; stopSubtreeBroker: () => Promise; spawnSubtreeWorker: (ctx: ExtensionContext, input: SubtreeSpawnInput) => Promise; sendPinetAgentMessage: (target: string, body: string) => Promise<{ messageId: number; target: string; }>; signalAgentFree: (ctx: ExtensionContext, options: { requirePinet?: boolean; }) => Promise<{ queuedInboxCount: number; drainedQueuedInbox: boolean; }>; applyLocalAgentIdentity: (name: string, emoji: string, personality: string | null) => void; setExtStatus: (ctx: ExtensionContext, state: "ok" | "reconnecting" | "error" | "off") => void; setExtCtx: (ctx: ExtensionContext) => void; } export type PinetCommandAction = "start" | "follow" | "unfollow" | "reload" | "exit" | "free" | "status" | "logs" | "rename" | "snooze" | "subtree"; export declare function formatPinetCommandHelp(): string; export declare function runPinetCommandAction(deps: PinetCommandsDeps, action: PinetCommandAction, args: string, ctx: ExtensionContext, usageCommand?: string): Promise; export declare function registerPinetCommands(pi: ExtensionAPI, deps: PinetCommandsDeps): void;