Support Codex 0.134 approvals

Use available approval decisions from the app-server schema, preserve structured policy decisions in callbacks, and keep approval rendering aligned with normal tool-call output.

Also simplify thread commands, clear stale active turns more carefully, and update command/help docs.
This commit is contained in:
Codex
2026-05-28 09:39:40 +00:00
parent e9dd840111
commit 2b0da9f508
9 changed files with 813 additions and 147 deletions

View File

@@ -50,6 +50,11 @@ func (c *Client) redact(text string) string {
return strings.ReplaceAll(text, c.token, "<telegram-token>")
}
func (c *Client) SetMyCommands(ctx context.Context, commands []BotCommand) error {
var ok bool
return c.postJSON(ctx, "setMyCommands", map[string]any{"commands": commands}, &ok)
}
func (c *Client) GetUpdates(ctx context.Context, offset int, timeoutSeconds int) ([]Update, error) {
params := map[string]any{
"offset": offset,