/** * Closed host-command runtime policy vocabulary and CommandSpec decoration. * * Tool CommandSpecs never flow through this module; it is a CLI-private trust * boundary applied after core validates the public command contract. */ import { type CommandScopeRequirement, type CommandSpec } from '@opensip-cli/core'; /** Additional shared runtime resources required by a CLI-owned host command. */ export type HostRuntimeAccess = 'default' | 'user-state' | 'project-and-user-state'; /** Bootstrap posture for a CLI-owned host command. */ export type HostBootstrapMode = 'standard' | 'inspection-only'; /** Frozen CLI-private policy copied into the command-scope index. */ export interface HostCommandRuntimePolicy { readonly runtimeAccess: HostRuntimeAccess; readonly bootstrapMode: HostBootstrapMode; } export declare const DEFAULT_HOST_RUNTIME_POLICY: HostCommandRuntimePolicy; /** A core CommandSpec decorated with CLI-private host runtime facts. */ export type HostRuntimeCommandSpec = CommandSpec & { readonly hostRuntimePolicy?: HostCommandRuntimePolicy; }; /** * Validate/freeze the ordinary public CommandSpec first, then create a new * frozen host-only decorated copy. Unknown host fields never enter core. * * @throws {TypeError} When the host runtime policy is invalid or incompatible * with the command's declared scope. */ export declare function defineHostCommand(spec: CommandSpec, policy?: Partial): HostRuntimeCommandSpec; /** Normalize an optional decorated policy into the closed default vocabulary. */ export declare function resolveHostRuntimePolicy(policy: HostCommandRuntimePolicy | undefined): HostCommandRuntimePolicy; /** * Validate the policy/scope relation at the host inventory trust boundary. * * @throws {TypeError} When inspection-only bootstrap is paired with a * stateful scope or runtime-access posture. */ export declare function resolveHostRuntimePolicyForScope(scope: CommandScopeRequirement, policy: HostCommandRuntimePolicy | undefined): HostCommandRuntimePolicy; /** Whether stabilization must compare the path-stable project coordination key. */ export declare function hostPolicyNeedsProjectCoordination(scope: CommandScopeRequirement, policy: HostCommandRuntimePolicy): boolean; /** * Exact root-command pre-scan used to skip Tool discovery. The allowed names * come from live decorated host specs rather than a parallel verb allowlist. */ export declare function isInspectionOnlyHostRequest(argv: readonly string[], hostSpecs: readonly Pick[]): boolean; //# sourceMappingURL=host-runtime-policy.d.ts.map