trellis
Version:
Agentic State Engine — event-sourced causal graph with branching, decision traces, and realtime sync for AI-native applications
32 lines • 1.53 kB
TypeScript
/**
* Gate CLI / agent commands that can shrink or rewrite durable state.
*
* Human escape: TRELLIS_CONFIRM_DESTRUCTIVE=1
* CLI flag: --confirm-destructive (per command)
*
* Repair remote gate (TRL-235): TRELLIS_I_KNOW=1 or --i-know
*/
export declare const DESTRUCTIVE_ENV = "TRELLIS_CONFIRM_DESTRUCTIVE";
/** Human ack that remote backup may be stale (repair gate). */
export declare const I_KNOW_ENV = "TRELLIS_I_KNOW";
export interface DestructiveGate {
/** e.g. repair, branch-delete, lane-drop */
action: string;
/** When false, throw before mutating */
confirmDestructive?: boolean;
}
export declare function destructiveConfirmed(opts?: {
confirmDestructive?: boolean;
env?: NodeJS.ProcessEnv;
}): boolean;
export declare function requireDestructiveConfirm(gate: DestructiveGate): void;
/** Shell hook: block bare trellis repair without confirm flag/env. */
export declare function repairCommandNeedsConfirm(command: string): boolean;
/** Shell hook: block branch delete without confirm. */
export declare function branchDeleteCommandNeedsConfirm(command: string): boolean;
/** Shell hook: block lane drop without confirm. */
export declare function laneDropCommandNeedsConfirm(command: string): boolean;
/** Any destructive CLI verb that agents must not run without human confirm. */
export declare function destructiveCommandNeedsConfirm(command: string): boolean;
export declare function describeDestructiveBlock(command: string): string;
//# sourceMappingURL=destructive-guard.d.ts.map