mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-08 07:17:39 +00:00
fix(codex): preserve native safety behavior (#1024)
* test: reproduce issue #1020 * fix: preserve Codex safety behavior (closes #1020) * test: cover Codex safety buffering dismissal * test: cover Codex safety retry edge cases * fix: keep dismissed safety buffering prompts hidden
This commit is contained in:
@@ -16,6 +16,8 @@ import type {
|
||||
TurnStartResponse,
|
||||
TurnInterruptParams,
|
||||
TurnInterruptResponse,
|
||||
ThreadRollbackParams,
|
||||
ThreadRollbackResponse,
|
||||
ThreadCompactStartParams,
|
||||
ThreadCompactStartResponse,
|
||||
ThreadGoalSetParams,
|
||||
@@ -207,6 +209,18 @@ export class CodexAppServerClient extends JsonLineParser {
|
||||
return response as TurnInterruptResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated upstream, but still required to match Codex's native
|
||||
* safety-buffering retry flow. Keep the protocol call isolated here so it
|
||||
* can be replaced when app-server exposes a successor.
|
||||
*/
|
||||
async rollbackThread(params: ThreadRollbackParams): Promise<ThreadRollbackResponse> {
|
||||
const response = await this.sendRequest('thread/rollback', params, {
|
||||
timeoutMs: 30_000
|
||||
});
|
||||
return response as ThreadRollbackResponse;
|
||||
}
|
||||
|
||||
async compactThread(
|
||||
params: ThreadCompactStartParams,
|
||||
options?: { signal?: AbortSignal }
|
||||
|
||||
Reference in New Issue
Block a user