mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-12 10:30:52 +08:00
feat: plan agent v2, global chat mode, and user-mode v2 flag sync
- 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>
This commit is contained in:
parent
ae44cbcad5
commit
37522f492a
49 changed files with 4146 additions and 238 deletions
42
runtime/plan_agent_v2/__init__.py
Normal file
42
runtime/plan_agent_v2/__init__.py
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
from .adapter import PlanAgentV2Decision, evaluate_for_expert_mode
|
||||
from .compat import build_shadow_gateway_result, legacy_gateway_result_keys
|
||||
from .gateway_adapter import GatewayPlanV2AdapterOutput, evaluate_gateway_expert_turn_shadow
|
||||
from .manager import PlanModeManagerV2
|
||||
from .models import PLAN_MODE_NORMAL, PLAN_MODE_PLAN, PlanAgentStateV2
|
||||
from .prompt_injector import build_plan_mode_prefix, inject_plan_context
|
||||
from .state_store import PlanAgentStateStoreV2
|
||||
from .switch import should_route_to_v2, v2_feature_enabled
|
||||
from .tool_policy import filter_tools_for_mode, plan_mode_allowed_tool_names
|
||||
from .tool_specs import (
|
||||
enter_plan_mode_v2_tool,
|
||||
exit_plan_mode_v2_tool,
|
||||
is_plan_mode_v2_active,
|
||||
materialize_plan_mode_v2_tools,
|
||||
)
|
||||
from .trace import emit_plan_agent_v2_trace
|
||||
|
||||
__all__ = [
|
||||
"PLAN_MODE_NORMAL",
|
||||
"PLAN_MODE_PLAN",
|
||||
"PlanAgentStateV2",
|
||||
"PlanAgentStateStoreV2",
|
||||
"PlanModeManagerV2",
|
||||
"build_plan_mode_prefix",
|
||||
"inject_plan_context",
|
||||
"filter_tools_for_mode",
|
||||
"plan_mode_allowed_tool_names",
|
||||
"enter_plan_mode_v2_tool",
|
||||
"exit_plan_mode_v2_tool",
|
||||
"materialize_plan_mode_v2_tools",
|
||||
"is_plan_mode_v2_active",
|
||||
"v2_feature_enabled",
|
||||
"should_route_to_v2",
|
||||
"PlanAgentV2Decision",
|
||||
"evaluate_for_expert_mode",
|
||||
"GatewayPlanV2AdapterOutput",
|
||||
"evaluate_gateway_expert_turn_shadow",
|
||||
"emit_plan_agent_v2_trace",
|
||||
"legacy_gateway_result_keys",
|
||||
"build_shadow_gateway_result",
|
||||
]
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue