feat(harness): add server-authoritative approvals
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
export type ApprovalStatus = "approved" | "denied" | "expired" | "cancelled";
|
||||
|
||||
export type ApprovalRequest = {
|
||||
approvalId: string;
|
||||
sessionId: string;
|
||||
runId: string;
|
||||
toolCallId: string;
|
||||
toolName: string;
|
||||
arguments: unknown;
|
||||
riskLevel: "low" | "medium" | "high";
|
||||
};
|
||||
|
||||
export type ApprovalResolution = {
|
||||
approvalId: string;
|
||||
status: ApprovalStatus;
|
||||
};
|
||||
|
||||
export interface ApprovalBroker {
|
||||
request(input: ApprovalRequest, signal?: AbortSignal): Promise<ApprovalResolution>;
|
||||
approve(approvalId: string): ApprovalResolution;
|
||||
deny(approvalId: string): ApprovalResolution;
|
||||
cancelForSession(sessionId: string): number;
|
||||
cancelForRun(runId: string): number;
|
||||
}
|
||||
Reference in New Issue
Block a user