import * as z from "zod/v4"; import { OpenEnum } from "../types/enums.js"; import { ArmorContext, ArmorContext$Outbound } from "./armorcontext.js"; /** * `enforce` withholds blocked calls; `audit` evaluates and reports the same verdicts without withholding any calls, regardless of `on_error`. Default `enforce`. */ export declare const ArmorPluginMode: { readonly Enforce: "enforce"; readonly Audit: "audit"; }; /** * `enforce` withholds blocked calls; `audit` evaluates and reports the same verdicts without withholding any calls, regardless of `on_error`. Default `enforce`. */ export type ArmorPluginMode = OpenEnum; /** * When the classifier cannot answer (timeout, upstream error, context too long) the call is reported `unavailable`; `block` rejects it and `log` releases it. Default `block`. */ export declare const ArmorPluginOnError: { readonly Log: "log"; readonly Block: "block"; }; /** * When the classifier cannot answer (timeout, upstream error, context too long) the call is reported `unavailable`; `block` rejects it and `log` releases it. Default `block`. */ export type ArmorPluginOnError = OpenEnum; /** * How a blocked call reaches the caller. `text` (the default): the call is withheld and an `` marker stands in assistant text. `custom_item` (Responses API only): the call is withheld and an `openrouter:armor_blocked` output item carries its id, name, arguments and the rule that fired. `claude_code_compatibility` (Messages API only; the default when the request carries a `dangerous_tool_use` safeguard, i.e. the client speaks Claude Code's protocol): the `tool_use` stays in `content[]` and the verdict is `flagged` in `safeguard_results`, so the client withholds execution and writes the error tool result as under the native classifier. Under `text` and `custom_item` the model received a failure result in the loop and continued in the same request; under `claude_code_compatibility` the turn ends on the flagged call and the model continues on the next request, after the client's denial. */ export declare const OutputMode: { readonly Text: "text"; readonly CustomItem: "custom_item"; readonly ClaudeCodeCompatibility: "claude_code_compatibility"; }; /** * How a blocked call reaches the caller. `text` (the default): the call is withheld and an `` marker stands in assistant text. `custom_item` (Responses API only): the call is withheld and an `openrouter:armor_blocked` output item carries its id, name, arguments and the rule that fired. `claude_code_compatibility` (Messages API only; the default when the request carries a `dangerous_tool_use` safeguard, i.e. the client speaks Claude Code's protocol): the `tool_use` stays in `content[]` and the verdict is `flagged` in `safeguard_results`, so the client withholds execution and writes the error tool result as under the native classifier. Under `text` and `custom_item` the model received a failure result in the loop and continued in the same request; under `claude_code_compatibility` the turn ends on the flagged call and the model continues on the next request, after the client's denial. */ export type OutputMode = OpenEnum; /** * Evaluates every client tool call the model emits against a rule stack (hard-deny, soft-deny, allow) before it reaches the caller. The stack merges the workspace guardrail, this plugin, and any Anthropic `safeguards`; on endpoints that support Anthropic's `dangerous-tool-use` beta the evaluation is native, elsewhere it is one decisions call per tool call. Evaluation is not billed during the beta. Verdicts are reported as `safeguard_results`. */ export type ArmorPlugin = { /** * The Armor context: Claude Code's `classifier_context` (v1), with `auto_mode.{hard_deny,soft_deny,allow}` rules as strings or `{ id, instructions, threshold? }` objects and `auto_mode.environment` entries as `"Name: value"` strings or `{ name, value }` objects. `threshold` applies when Armor evaluates; when the provider evaluates natively (Anthropic dangerous-tool-use beta) rules are judged at the provider's own boundary. */ classifierContext?: ArmorContext | undefined; /** * Set to false to disable Armor for this request. Defaults to true. */ enabled?: boolean | undefined; /** * Run provider-native server tools (web search, code execution, ...) through the agent loop so Armor evaluates them too. Defaults to false: native passthrough stands and such calls are reported `skipped`. */ evaluateNativeTools?: boolean | undefined; id: "armor"; /** * `enforce` withholds blocked calls; `audit` evaluates and reports the same verdicts without withholding any calls, regardless of `on_error`. Default `enforce`. */ mode?: ArmorPluginMode | undefined; /** * When the classifier cannot answer (timeout, upstream error, context too long) the call is reported `unavailable`; `block` rejects it and `log` releases it. Default `block`. */ onError?: ArmorPluginOnError | undefined; /** * How a blocked call reaches the caller. `text` (the default): the call is withheld and an `` marker stands in assistant text. `custom_item` (Responses API only): the call is withheld and an `openrouter:armor_blocked` output item carries its id, name, arguments and the rule that fired. `claude_code_compatibility` (Messages API only; the default when the request carries a `dangerous_tool_use` safeguard, i.e. the client speaks Claude Code's protocol): the `tool_use` stays in `content[]` and the verdict is `flagged` in `safeguard_results`, so the client withholds execution and writes the error tool result as under the native classifier. Under `text` and `custom_item` the model received a failure result in the loop and continued in the same request; under `claude_code_compatibility` the turn ends on the flagged call and the model continues on the next request, after the client's denial. */ outputMode?: OutputMode | undefined; /** * Prepend Claude Code's built-in auto-mode rule set (1 hard-deny, 72 soft-deny, 17 allow, 21 environment slots) ahead of every configured rule. Defaults to true on the Anthropic Messages API and false elsewhere. */ useCcStyleDefaultRules?: boolean | undefined; }; /** @internal */ export declare const ArmorPluginMode$outboundSchema: z.ZodType; /** @internal */ export declare const ArmorPluginOnError$outboundSchema: z.ZodType; /** @internal */ export declare const OutputMode$outboundSchema: z.ZodType; /** @internal */ export type ArmorPlugin$Outbound = { classifier_context?: ArmorContext$Outbound | undefined; enabled?: boolean | undefined; evaluate_native_tools?: boolean | undefined; id: "armor"; mode?: string | undefined; on_error?: string | undefined; output_mode?: string | undefined; use_cc_style_default_rules?: boolean | undefined; }; /** @internal */ export declare const ArmorPlugin$outboundSchema: z.ZodType; export declare function armorPluginToJSON(armorPlugin: ArmorPlugin): string; //# sourceMappingURL=armorplugin.d.ts.map