import { checkPolicy } from "../runtime/policy.js"; export { validatePolicy as _validatePolicy, escapeGlob as _escapeGlob } from "../runtime/policy.js"; /** `checkPolicy` from Agency: the `dir` patterns stand for the directories * the run resolved when its context was built. */ export declare function _checkPolicy(policy: Policy, interrupt: { effect: string; message: string; data: any; origin: string; }): ReturnType; export { alwaysScopeFor as _alwaysScopeFor, allAlwaysScopes as _allAlwaysScopes, } from "../runtime/alwaysScope.js"; import type { Policy } from "../runtime/policy.js"; export { policyOverlayFromFlags as _policyOverlayFromFlags } from "../runtime/policyFlags.js"; export { missingPolicyRules as _missingPolicyRules, appendPolicyRules as _appendPolicyRules, } from "../runtime/policyUpdate.js"; export { builtinPolicy as _builtinPolicy, builtinPolicyNames as _builtinPolicyNames, BUILTIN_POLICIES as _BUILTIN_POLICIES, minimalAutoApprovePolicy as _minimalAutoApprovePolicy, recommendedAutoApprovePolicy as _recommendedAutoApprovePolicy, withWritesPolicy as _withWritesPolicy, approveAllPolicy as _approveAllPolicy, } from "../runtime/builtinPolicies.js"; /** A policy save, worked out before its `std::write` interrupt: the real * directory and file name the interrupt names, and the exact text that * will be written, so the approver sees what the file will say. */ export type PolicyWrite = { dir: string; filename: string; content: string; }; /** Validate a policy and resolve where it goes. Nothing is written. */ export declare function _preparePolicyWrite(filePath: string, policy: Policy, allowedPaths?: string[]): Promise; /** The real directory of a policy file, spelled the way a `std::read` or * `std::write` payload spells it. The CLI handler compares it with the * payload to recognize interrupts for its own file. */ export declare function _policyFileDir(filePath: string): Promise; /** Write a prepared policy to the directory its approval named. The file * is created readable by its owner only. */ export declare function _writePreparedPolicy(write: PolicyWrite): Promise; /** Validate and write a policy with no interrupt. Only the bundled agents * call this, for a save their user asked for in the agent's own setup. * Agency code goes through `writePolicyFile` in std::policy, which raises * `std::write` first. */ export declare function _writePolicyFile(filePath: string, policy: Policy, allowedPaths?: string[]): Promise;