feat: add tiered channel agent and mobile Codex bridge

This commit is contained in:
冰朔 2026-08-21 08:21:03 +08:00
commit 71db11e7e8
35 changed files with 2242 additions and 76 deletions

View file

@ -19,6 +19,13 @@ test('knowledge-embedded Agent keeps one channel body with human-managed convers
assert.equal(contract.channel.human.name, '冰朔')
assert.equal(contract.channel.initial_responder.number, 'ICE-CH-ZC001')
assert.equal(contract.channel.initial_responder.name, '零点原核频道系统')
assert.equal(contract.channel.channel_system_body_can_converse_directly, true)
assert.equal(contract.channel.channel_system_body_is_mechanical_receipt_template, false)
assert.equal(contract.channel.channel_system_body_is_any_single_persona, false)
assert.equal(contract.channel.receipts_are_separate_verification_records_after_dialogue_or_dispatch, true)
assert.equal(contract.channel.bound_persona_hides_or_replaces_channel_system_body, false)
assert.equal(contract.channel.human_may_address_channel_system_while_persona_is_bound, true)
assert.equal(contract.channel.response_target_is_selected_per_turn, true)
assert.equal(contract.channel.persona_identity_preconfigured, false)
assert.equal(contract.channel.persona_declares_own_number_and_name, true)
assert.match(frontend, /ICE-GL∞/)
@ -99,6 +106,7 @@ test('Token Plan qwen3.8-max is a first-class provider and long work emits real
assert.equal(contract.providers.bailian_token_plan.base_url, 'https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1')
assert.ok(contract.providers.bailian_token_plan.models.includes('qwen3.8-max'))
assert.ok(contract.providers.bailian_token_plan.models.includes('qwen3.6-flash'))
assert.equal(contract.progress.synthetic_timer_allowed, false)
assert.match(runtime, /hololake-persona-agent-progress/)
assert.match(runtime, /KNOWLEDGE_SEARCH|KNOWLEDGE_READ|MODEL_REQUEST|TOOL_EXECUTION/)
@ -106,6 +114,38 @@ test('Token Plan qwen3.8-max is a first-class provider and long work emits real
assert.match(frontend, /optimistic/i)
})
test('channel core, local skills and typed tools run before optional models', () => {
const contract = JSON.parse(read('contracts/persona-agent-runtime.json'))
const runtime = read('src-tauri/src/persona_agent_runtime.rs')
const binding = read('src-tauri/src/persona_binding.rs')
assert.equal(contract.channel.channel_entry_creates_persona_orientation, false)
assert.equal(contract.persona_binding.orientation_activation, 'EXPLICIT_NATURAL_LANGUAGE_PERSONA_WAKE_ONLY')
assert.equal(contract.agent_loop.channel_presence_requires_model, false)
assert.equal(contract.agent_loop.known_local_tool_requires_model_selection, false)
assert.equal(contract.agent_loop.meaningful_channel_system_dialogue_uses_flagship, true)
assert.equal(contract.agent_loop.channel_architecture_and_design_uses_flagship, true)
assert.equal(contract.agent_loop.persona_is_fixed_to_flagship_model, false)
assert.equal(contract.agent_loop.channel_orchestrator_selects_each_persona_turn_tier, true)
assert.deepEqual(contract.agent_loop.routing_layers.slice(0, 3), [
'CHANNEL_DETERMINISTIC_CORE_ZERO_MODEL',
'ACCOUNT_CHANNEL_SCOPED_PERSONAL_SKILL_BRAIN_ZERO_MODEL',
'LOCAL_TYPED_TOOL_EXECUTION_ZERO_MODEL',
])
assert.match(runtime, /fast_channel_system_reply/)
assert.match(runtime, /频道系统本体是该频道持续存在的认知调度与交流主体/)
assert.match(runtime, /不得把字段清单当作频道本体的说话方式/)
assert.match(runtime, /deterministic_tool_route/)
assert.match(runtime, /模型调用0/)
assert.match(runtime, /FLAGSHIP_CHANNEL_SYSTEM_COGNITION/)
assert.match(runtime, /SMALL_MODEL_PERSONA_OPERATIONAL_REASONING/)
assert.match(runtime, /explicit_channel_system_address/)
assert.match(runtime, /responseTarget/)
assert.match(runtime, /qwen3\.6-flash/)
assert.match(binding, /CHANNEL_SYSTEM_PERSONA_DORMANT/)
assert.match(binding, /EXPLICIT_NATURAL_LANGUAGE_PERSONA_WAKE/)
})
test('the upgraded Agent reuses the accepted keychain identity and bounds credential reads', () => {
const runtime = read('src-tauri/src/persona_agent_runtime.rs')