/**
 * MM.2 — Pure-function resolver for `next_action.profession` directives.
 *
 * Given a directive whose `next_action.profession` names a pack + the loaded
 * pack registry + a pre-staged `teamsByPack` map, validates that the pack
 * exists, is profession-usage, and has at least one role defined in its
 * team.yaml. Returns a tagged result.
 *
 * **opensquid never invokes `spawn_subagent` itself** per
 * [[project_opensquid_no_agent_loop]] — this resolver only validates the
 * directive is well-formed before the dispatcher aggregates it onto the
 * UserPromptSubmit envelope. The AGENT then calls `spawn_subagent` on the
 * profession pack named by the directive.
 *
 * Fail-open in the SAFE direction: an invalid profession → directive DROPPED
 * (not emitted to the agent) + a warning is logged at the caller. Emitting a
 * directive for a non-existent / misconfigured profession would mislead the
 * agent.
 *
 * Imports: types only (zero I/O). Imported by: `src/runtime/hooks/dispatch.ts`
 * + tests.
 */
import type { Team } from '../../packs/schemas/team.js';
import type { NextAction, Pack } from '../types.js';
export type ProfessionResolutionError = {
    code: 'unknown-pack';
    packName: string;
} | {
    code: 'wrong-usage';
    packName: string;
    actualUsage: string;
} | {
    code: 'missing-team';
    packName: string;
} | {
    code: 'no-roles';
    packName: string;
} | {
    code: 'role-not-found';
    packName: string;
    requestedRole: string;
};
export type ProfessionResolution = {
    ok: true;
    pack: Pack;
    team: Team;
    role: Team['roles'][number];
} | {
    ok: false;
    reason: ProfessionResolutionError;
};
/**
 * Validate a profession directive against the loaded pack registry +
 * pre-staged team map. Pure function — no I/O.
 *
 * Phase 2 leaf-node-profession discipline: roles[0] is returned. Phase 4+
 * multi-role lookup will accept a `role:` name in `nextAction.args`.
 */
export declare function resolveProfessionDirective(nextAction: NextAction, packs: readonly Pack[], teamsByPack: ReadonlyMap<string, Team>): ProfessionResolution;
/**
 * Render a `ProfessionResolutionError` to a human-scannable string. Used by
 * the dispatcher to log to stderr + violations.log.
 */
export declare function formatProfessionError(err: ProfessionResolutionError): string;
//# sourceMappingURL=profession_resolver.d.ts.map