import { shouldPauseAtGate, type CodeMode, type CommitBoundaryActionId, type GatedStepId, type HardFloorCategory } from '../../services/code/mode-gate.js'; import type { checkStalePresence } from '../../services/skills/skill-presence-service.js'; import { type ProgramIO } from '../cli-helpers.js'; /** The mode-gate `should-pause` action's option bag (verbatim commander shape). */ export type ShouldPauseOptions = { step: string; mode: string; hardFloor?: string; recommended?: string; project?: string; ignoreStalePresence?: boolean; commitBoundaryAction?: string; json?: boolean; }; /** Reader for the active session id (module-private to `code-mode-gate-commands.ts`). */ export type ReadActiveSid = (projectRoot: string) => string | null; /** The `checkStalePresence` return the caller narrowed to `.stale === true`. */ export type StalePresence = ReturnType; /** The mode-gate decision this file renders. */ export type ShouldPauseDecision = ReturnType; /** The values the action's validation branch handed down to the envelope builders. */ export type ShouldPauseValidated = { mode: CodeMode; step: GatedStepId; hardFloor: HardFloorCategory | undefined; commitBoundaryActionId: CommitBoundaryActionId | undefined; }; type HandleStaleArgs = { io: ProgramIO; opts: ShouldPauseOptions; mode: CodeMode; step: GatedStepId; readActiveSid: ReadActiveSid; }; /** * Build the envelope manually so we can attach the extra structured fields * (stalePresence, logLine) and emit a dedicated observability event tagged * with reason='stale-presence'. */ export declare function handleStalePresence(args: HandleStaleArgs, stalePresence: StalePresence): void; type HandleDecisionArgs = { io: ProgramIO; opts: ShouldPauseOptions; validated: ShouldPauseValidated; readActiveSid: ReadActiveSid; }; /** * Slice C of v2.11.1 — observability hook #4/7. Fire-and-forget per PRD Q4 * (full-auto must never fail-loud). projectRoot resolution mirrors * observability-commands.ts (findProjectRoot → cwd fallback). * * --commit-boundary-action flag into the service-layer boolean. The CLI accepts * the action id (e.g. "git-push") for ergonomic machine consumption; the * service layer only cares that *some* commit-boundary action triggered the * override. The actual action id is echoed in the JSON envelope below. */ export declare function handleDecision(args: HandleDecisionArgs): void; export {};