From 504d112218b9d9719e67f78b0eb85add575a0a98 Mon Sep 17 00:00:00 2001 From: kris Date: Thu, 16 Apr 2026 05:23:16 +0800 Subject: [PATCH] feat: default master agent evolution to autonomous --- docs/architecture/current_runtime_and_deploy_status_cn.md | 1 + src/lib/boss-data.ts | 4 ++-- tests/master-agent-evolution-engine.test.ts | 2 ++ tests/master-agent-evolution-state.test.ts | 6 +++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/architecture/current_runtime_and_deploy_status_cn.md b/docs/architecture/current_runtime_and_deploy_status_cn.md index 0e70c19..1c3bf54 100644 --- a/docs/architecture/current_runtime_and_deploy_status_cn.md +++ b/docs/architecture/current_runtime_and_deploy_status_cn.md @@ -164,6 +164,7 @@ cd /Users/kris/code/boss - 主 Agent 单聊当前已改成“快速入队 + 异步回流”:`POST /api/v1/projects/master-agent/messages` 会先返回 `masterReplyState + task`,真实回复随后再回写消息账本 - 当前对话级 `agentControls` 已经生效:`master-agent` 会话支持 `modelOverride / reasoningEffortOverride` 强制覆盖,也支持 `fastModelOverride / fastReasoningEffortOverride / smartModelOverride / smartReasoningEffortOverride` 这组策略默认值;主 Agent 普通对话默认按 fast 档选模型,深度任务可按 smart 档选模型,手动强制覆盖仍然优先级最高 - 当前主 Agent 自动进化引擎已接入第一阶段共享内核:`masterAgentEvolutionConfig / Signals / Proposals / Rules / RunLogs` 已进入状态模型,`GET /api/v1/master-agent/evolution` 可查看进化状态,`POST /api/v1/master-agent/evolution/config` 可在 `controlled / autonomous` 间切换,提案支持 approve / reject;`controlled` 只生成待审批提案,`autonomous` 可自动采纳低风险 `memory_patch / routing_preference_patch / fast_path_rule` +- 当前 `codex/master-agent-autonomous-evolution` 分支把默认 evolution mode 改成 `autonomous`,新初始化状态会默认开启低风险自动采纳;`codex/master-agent-controlled-evolution` 保持 `controlled` 默认值 - 当前 `group_dispatch_plan / device_import_resolution / attachment_analysis` 三类深度任务已经会把 `smart*` 策略下发到任务队列,并随任务持久化 `executionModel / executionReasoningEffort`;local-agent 执行这类任务时会优先吃任务级模型,不再只依赖本机固定默认模型 - 当前对话级 `agentControls` 也已支持 `backendOverride`:`master-agent` 会话可在 `Claw Runtime` 或 `Hermes Runtime` 可用时显式选择 `claw-runtime / hermes-runtime`,普通单线程会话当前只开放 `hermes-runtime`;不可用时保存接口会直接拒绝,并返回人类可读原因 - 原生 Android 当前会把 `master-agent` 的等待态保留在消息流里:发送后常驻显示“主 Agent 思考中”,超时后改成“主 Agent 回复超时 + 重试等待”,收到新回复后会自动清掉,不再只靠 toast 提示 diff --git a/src/lib/boss-data.ts b/src/lib/boss-data.ts index 49f2d23..affa0b0 100644 --- a/src/lib/boss-data.ts +++ b/src/lib/boss-data.ts @@ -1537,8 +1537,8 @@ const initialState: BossState = { userMasterPrompts: [], masterAgentMemories: [], masterAgentEvolutionConfig: { - mode: "controlled", - autoApplyLowRiskRules: false, + mode: "autonomous", + autoApplyLowRiskRules: true, updatedAt: nowIso(), }, masterAgentEvolutionSignals: [], diff --git a/tests/master-agent-evolution-engine.test.ts b/tests/master-agent-evolution-engine.test.ts index 9a9fcd3..6e1a97a 100644 --- a/tests/master-agent-evolution-engine.test.ts +++ b/tests/master-agent-evolution-engine.test.ts @@ -40,6 +40,8 @@ test.beforeEach(async () => { }); test("recording repeated deterministic questions creates a pending fast_path_rule proposal in controlled mode", async () => { + await setMasterAgentEvolutionMode("controlled"); + const result = await recordMasterAgentEvolutionSignal({ kind: "repeated_question", projectId: "master-agent", diff --git a/tests/master-agent-evolution-state.test.ts b/tests/master-agent-evolution-state.test.ts index 17bfe67..c7a8362 100644 --- a/tests/master-agent-evolution-state.test.ts +++ b/tests/master-agent-evolution-state.test.ts @@ -32,10 +32,10 @@ test.beforeEach(async () => { await mkdir(runtimeRoot, { recursive: true }); }); -test("boss state 初始化时包含 master agent evolution 默认配置与空集合", async () => { +test("boss state 初始化时包含 autonomous 默认配置与空集合", async () => { const state = await readState(); - assert.equal(state.masterAgentEvolutionConfig.mode, "controlled"); - assert.equal(state.masterAgentEvolutionConfig.autoApplyLowRiskRules, false); + assert.equal(state.masterAgentEvolutionConfig.mode, "autonomous"); + assert.equal(state.masterAgentEvolutionConfig.autoApplyLowRiskRules, true); assert.deepEqual(state.masterAgentEvolutionSignals, []); assert.deepEqual(state.masterAgentEvolutionProposals, []); assert.deepEqual(state.masterAgentEvolutionRules, []);