add Codex tool permission approval UI#98
Conversation
109b530 to
32f1224
Compare
32f1224 to
1ecefb5
Compare
9012beb to
5cc3b7e
Compare
| r.Post("/login", h.handleCLIProxyAuthLogin) | ||
| }) | ||
| r.Post("/runtime/permissions/{request_id}/decision", h.handleRuntimePermissionDecision) | ||
| r.Post("/codex/permissions/{request_id}/decision", h.handleCodexPermissionDecision) |
There was a problem hiding this comment.
If this PR is standardizing permission decisions under the runtime API, keeping a second codex/permissions endpoint preserves the old abstraction boundary and leaves two public routes for the same operation. Unless there is an external compatibility requirement, I would drop this route and keep runtime/permissions as the only API surface.
…-tool-permission-ui # Conflicts: # internal/api/bot_compat.go # internal/channel/codexbridge/bridge.go # internal/channel/codexbridge/bridge_test.go # internal/channel/codexbridge/render.go # internal/channel/codexbridge/sse_client.go # internal/im/bot_bridge.go # internal/im/service.go # web/app/src/hooks/workspace/useConversationController.ts # web/app/src/models/conversations.ts # web/app/tests/models/conversations.test.ts
a295022 to
d80e2f5
Compare
d80e2f5 to
6e176bd
Compare
| return codexPermissionActivityDecider{permission: decider} | ||
| } | ||
|
|
||
| type codexPermissionActivityDecider struct { |
There was a problem hiding this comment.
This adapter feels a bit too high in the stack for cli/serve.go. It is already carrying Codex-specific activity decision semantics rather than pure server wiring, so I would move it down next to the Codex runtime implementation (for example under internal/runtime/codex) and have serve.go only construct or reference it. That keeps the CLI/bootstrap layer thin now, and still leaves room to generalize later if another agent runtime needs the same activity interface.
Summary
Why
Codex tool calls were previously rendered as plain text, and ACP permission requests were automatically allowed by the backend. This PR makes tool activity machine-readable in the IM timeline and lets users approve or reject Codex permission requests from the Web UI.
Validation
go test ./internal/runtime/codex ./internal/channel/codexbridge ./internal/apipnpm --dir web/app testpnpm --dir web/app typecheckNote: pnpm reported the local Node version warning (
wanted >=22.13.0 <25, currentv26.0.0), but the test and typecheck commands completed successfully.