Connect policy-gated browser review and audit runtime
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a07ff8-19d0-7820-b4d0-1353833cb7fc
This commit is contained in:
parent
2cc32168ac
commit
83849b75d4
35 changed files with 2381 additions and 83 deletions
|
|
@ -57,8 +57,12 @@ class ApprovalHTTPClient:
|
|||
def get_approval(self, approval_id: str) -> dict:
|
||||
return self._call("GET", approval_id)
|
||||
|
||||
def add_entry(self, approval_id: str) -> EntryResult:
|
||||
self.get_approval(approval_id) # Require the declared human-control object before mutation.
|
||||
def add_entry(self, approval_id: str, *, expected_binding_digest=None, before_post=None) -> EntryResult:
|
||||
current = self.get_approval(approval_id)
|
||||
if expected_binding_digest is not None and current["binding"]["digest"] != expected_binding_digest:
|
||||
raise ApprovalEngineError(409, "binding_changed")
|
||||
if before_post is not None:
|
||||
before_post() # Recheck session/policy and reserve AFTER the last read.
|
||||
duplicate = False
|
||||
try:
|
||||
data = self._call("POST", approval_id, "/entries")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue