/**
 * AP.4 — read-side primitives for the workflow gate.
 *
 *   - `has_active_task` — is there an active task this session, and what is it?
 *     Used by the workflow gate (rule #8) AND the scope→task Gate A (AP.5).
 *   - `workflow_phases_complete` — are all 7 REQUIRED phases logged for the
 *     CURRENTLY-active task? Computed at read time against the live active task
 *     (so a new task never inherits a prior task's completion — see
 *     workflow_phases.ts).
 *
 * Both are read-only, no args, never throw. GF.4 (F6): a read failure returns the
 * conservative `ok` verdict ("no active task" / "not complete" / "not generated"),
 * NEVER an `err` — an `err` rule result is silently skipped by the dispatcher
 * (dispatch.ts:462), which would let a blocking gate fall through to ALLOW (fail-open).
 * Returning a conservative `ok` makes the gate fail CLOSED. `memoizable: false` is
 * load-bearing: the active task + phase ledger change within a session, so a memoized
 * result would be stale.
 *
 * Imports from: zod, ../runtime/result.js, ../runtime/session_state.js,
 *   ../runtime/workflow_phases.js.
 * Imported by: src/runtime/bootstrap.ts (registry wiring).
 */
import { z } from 'zod';
import type { FunctionDef } from './registry.js';
declare const NoArgs: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
interface HasActiveTaskResult {
    present: boolean;
    /** Harness numeric id, or '' when none. */
    id: string;
    /** Provenance track id (metadata.taskId), or '' when none — Gate A (AP.5) keys on this. */
    task_id: string;
}
export declare const HasActiveTask: FunctionDef<z.input<typeof NoArgs>, HasActiveTaskResult>;
interface WorkflowPhasesCompleteResult {
    /** Whether there is an active task at all. */
    active: boolean;
    /** True ⟺ an active task exists AND all 7 REQUIRED phases are logged for it. */
    complete: boolean;
}
export declare const WorkflowPhasesComplete: FunctionDef<z.input<typeof NoArgs>, WorkflowPhasesCompleteResult>;
interface HasGeneratedSpecResult {
    /** Whether there is an active task at all. */
    present: boolean;
    /** True ⟺ the active task carries a `spec` provenance path that resolves on disk. */
    generated: boolean;
}
/**
 * Does the active task have GENERATOR PROVENANCE — a `docs/tasks` 11-field spec
 * the scope→task pipeline produced? Backs scope→task Gate A (AP.5): a code-write
 * whose active task has no generated spec is blocked.
 *
 * Provenance = `active-task.json.spec` (copied by the AP.1 mirror from the
 * harness `metadata.spec`) resolving to a real file. H7: the spec lives in the
 * umbrella's PLANNING repo while the code-write may run in a member SUB-repo,
 * so an ABSOLUTE `spec` is checked directly and a RELATIVE one is resolved
 * against the event cwd AND each of its ancestors (the planning repo is an
 * ancestor in every real layout; T-FIX-TASKSTART-GUARD-MIRROR — the old
 * cwd-only resolution dangled from sub-repo cwds and false-fired the FU.11
 * task_unscoped reset mid-flow). No active task OR no spec OR a path found
 * nowhere → not generated (the conservative verdict — Gate A blocks).
 */
export declare const HasGeneratedSpec: FunctionDef<z.input<typeof NoArgs>, HasGeneratedSpecResult>;
interface TaskListGeneratedResult {
    /** True ⟺ every open (pending/in_progress) task carries a `metadata.taskId` provenance stamp. */
    all_generated: boolean;
    /** Harness ids of open tasks missing the provenance stamp (the smuggled-in tasks). */
    ungenerated: string[];
}
/**
 * Gate B (AP.5) read-side: does the ENTIRE open task list have generator
 * provenance? Walks the harness store (via AP.1's isolated reader) and flags any
 * pending/in_progress task lacking `metadata.taskId` — the stamp scope→task
 * generation applies (H6). Closes Gate A's loophole: a task smuggled into the
 * list manually (no spec, no pre-research) would otherwise let code through once
 * loaded. Completed/deleted tasks are ignored (only open work must be generated).
 */
export declare const TaskListGenerated: FunctionDef<z.input<typeof NoArgs>, TaskListGeneratedResult>;
interface OpenTaskCountResult {
    count: number;
}
/**
 * AF.6 — the number of OPEN (pending|in_progress) tasks. The pause-gates derive whether a
 * workflow RUN is still active from this + the FSM state (run-active = FSM≠idle AND
 * (count>0 OR FSM≠phases_complete)); the run auto-OFFs when the backlog is depleted.
 * Prefers `event.openTasks` (prompt_submit, transcript-derived by the UPS hook); falls
 * back to the harness store for older CC / non-UPS events. Never throws → count 0.
 */
export declare const OpenTaskCount: FunctionDef<z.input<typeof NoArgs>, OpenTaskCountResult>;
export {};
//# sourceMappingURL=active_task.d.ts.map