import type { ExtensionCommandContext } from "@earendil-works/pi-coding-agent"; import type { AudienceValue } from "./parsers/workflow-loader.js"; import type { CallerContext } from "./subagent/caller-context.js"; export type { CallerContext } from "./subagent/caller-context.js"; export { CallerContextStore } from "./subagent/caller-context.js"; export interface AudienceCheckInput { workflowName: string; audience: AudienceValue; /** Defaults to `CallerContextStore.get()` when absent. */ callerContext?: CallerContext; } /** * Assert that the given workflow's audience is compatible with the * current (or provided) caller context. * * Returns `true` if dispatch may proceed. * Returns `false` and emits `ctx.ui.notify("error")` if the workflow * is incompatible with the caller context. * * Callers MUST check the return value and return WITHOUT calling * `sendKickoff` when `false` is returned. * * Refusal message for orchestrator-only violations (AC#3 verbatim): * "× workflow is orchestrator-only; cannot run from subagent context" * * Note: `subagent` audience is advisory only — users may invoke any * `subagent`-audience workflow manually from the orchestrator (CLI) context. * Only `orchestrator-only` produces refusals. */ export declare function assertAudience(input: AudienceCheckInput, ctx: ExtensionCommandContext): boolean;