UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

28 lines • 1.89 kB
/** * The approval half of `write_user_skill_file` (omo-desktop-app#7981): a write from another device commits only once * someone on THIS device approves it through the session's local grant presentation, which only an attached local * client registers (never a remote or delegated connection, `security-presentations.ts`), so the requester cannot * answer its own question. There is no "always allow" choice. Every such attempt leaves one local audit line. */ import type { AgentSession } from "../../core/agent-session.ts"; import type { ProjectWriteRefusal } from "./project-write-gate.ts"; import type { RpcRemoteOrigin } from "./remote-origin.ts"; export declare const USER_SKILL_ALLOW = "Allow this change"; export declare const USER_SKILL_DENY = "Deny"; export declare const USER_SKILL_AUDIT_FILE: string; /** `refused`: the write never reached the prompt (not listed, outside a root, stale, too large); `reason` names why. */ export type UserSkillDecision = "approved" | "denied" | "unconfirmed" | "refused"; export declare const sha256: (bytes: Buffer | undefined) => string | null; /** Who asks, which file, and exactly what changes: a new file's diff is all of its content. */ export declare function userSkillPromptTitle(origin: RpcRemoteOrigin, path: string, before: string, after: string): string; export declare function askThisDevice(session: AgentSession, title: string): Promise<UserSkillDecision>; export declare function appendUserSkillAudit(agentDir: string, entry: { readonly origin: RpcRemoteOrigin; readonly path: string | null; readonly before: string | null; readonly after: string | null; readonly decision: UserSkillDecision; readonly reason?: string; }): Promise<void>; export declare function refusedByDevice(decision: UserSkillDecision, origin: RpcRemoteOrigin): ProjectWriteRefusal; //# sourceMappingURL=user-skill-approval.d.ts.map