mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 03:23:23 +08:00
- Add runtime/plan_agent_v2 package and shims; gateway/direct_loop/WS wiring - Admin chat: interaction mode and specialist only in user menu; session API stores memory_mode and execution_mode only - POST /admin/api/chat/user-mode mirrors plan_agent_version to AIA_EXPERT_PLAN_AGENT_V2_ENABLED (v2 to 1, v1 to 0) - Composer cleanup (hidden mode select, no reasoning toggle in meta bar); tests and _local/system.env.example Co-authored-by: Cursor <cursoragent@cursor.com>
1.5 KiB
1.5 KiB
Plan Agent V2 Gateway Cutover Draft
Purpose
- Provide a minimal, reviewable gateway cutover sketch without changing production routing yet.
- Keep existing
runtime/gateway.pybehavior unchanged until explicit cutover approval.
Draft Helper
- New module:
runtime/plan_agent_v2_gateway_cutover.py
- Entrypoint:
maybe_handle_expert_turn_v2_draft(...)
Draft Behavior
- If v2 shadow is not selected:
- returns
handled=False, gateway should continue legacy flow.
- returns
- If decision is
enter_planorstay_plan:- returns
handled=Truewith anOclawGatewayResultbuilt from v2 shadow compatibility mapper.
- returns
- If decision is
run_agent:- returns
handled=Falseand providessystem_prompt_override. - gateway would continue legacy execution path but with injected approved-plan context.
- returns
Why This Is Safe
- No import or call-site changes in
runtime/gateway.pyyet. - Feature remains effectively dormant unless future cutover patch wires this helper.
- Existing tests continue to validate legacy and shadow independently.
Future Minimal Cutover (single commit)
- In
OclawGateway.handle_turn(...)expert path, add one early branch:- call
maybe_handle_expert_turn_v2_draft(...) - if
handled=True, return result immediately - else continue existing flow; if
system_prompt_overrideexists, use it as specialist system prompt
- call
Rollback
- Revert only the gateway wiring commit.
- Keep shadow modules and tests as dormant assets.