@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
23 lines • 1.5 kB
TypeScript
import type { SessionManager } from "./session-manager.ts";
type DecisionSessionManager = Pick<SessionManager, "getEntries" | "getHeader" | "getSessionId">;
export interface DecisionSession {
readonly sessionManager: DecisionSessionManager;
readonly namedPreset: () => string | undefined;
readonly launchFlagNamed: () => boolean;
readonly recordedPreset: () => string | undefined;
}
/**
* Binds the remote approval-mode rule to one live session, evaluated at EACH gated decision:
* 1. a preset a client named for the session wins (no override);
* 2. delegated-origin work asks, or uses the mode a client recorded in the session file when the operator named none.
* It is decided before any `spawnedBy` inheritance, because `spawnedBy` is a client-supplied claim: naming a
* parent, real or made up, can never take a remote device's turn off this rule;
* 3. a child (`spawnedBy`) follows its live parent's mode for the parent's current turn; a child whose parent is not
* live in this process asks, unless the operator named a preset for it with the launch flag;
* 4. anything else keeps the host's own default (no override).
* The live parent may belong to any engine copy in this realm: the decision sessions are a realm registry.
*/
export declare function bindDecisionPreset(session: DecisionSession): void;
export declare function releaseDecisionPreset(sessionManager: DecisionSessionManager): void;
export {};
//# sourceMappingURL=permission-decision.d.ts.map