feat: add tiered channel agent and mobile Codex bridge
This commit is contained in:
parent
950b7e48b3
commit
71db11e7e8
35 changed files with 2242 additions and 76 deletions
|
|
@ -46,3 +46,15 @@ test('mobile interface stays manual and exposes only bounded projections', () =>
|
|||
assert.match(interfaceSource, /写入电脑端收件箱/)
|
||||
assert.doesNotMatch(interfaceSource, /人格执行|模型调用|远程桌面/)
|
||||
})
|
||||
|
||||
test('iPhone Agent messages preserve retry identity and display desktop receipts', () => {
|
||||
assert.match(client, /pendingAgentRequestID/)
|
||||
assert.match(client, /agentConversationID/)
|
||||
assert.match(client, /sendAgentMessage/)
|
||||
assert.match(models, /MobileAgentExchangeProjection/)
|
||||
assert.match(interfaceSource, /与电脑端 HoloLake 对话/)
|
||||
assert.match(interfaceSource, /toolReceipts/)
|
||||
assert.equal(contract.interface.agent_chat, 'MANUAL_EXPLICIT_DESTINATION_SEND_TO_PAIRED_DESKTOP_ROOT_WITH_IDEMPOTENT_RETRY_AND_TOOL_RECEIPTS')
|
||||
assert.match(client, /CODEX_SELECTED_THREAD/)
|
||||
assert.match(interfaceSource, /Codex 任务以只读沙箱运行/)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -14,9 +14,14 @@ test('the heartbeat handoff is hash-pinned into distinct initialized channel aud
|
|||
const handoff = JSON.parse(read('runtime-kernels/ZERO-CORE-LANGUAGE-BODIES-HANDOFF-20260820.json'))
|
||||
|
||||
assert.equal(contract.source.remote_sha, '4e92e6d8d72484d25c4bfb1dda02a7659f4b6dd5')
|
||||
assert.equal(contract.source.earerdan_zhizhi_local_commit, '1d7fe6c')
|
||||
assert.equal(contract.source.earerdan_zhizhi_remote_state, 'LOCAL_COMMIT_VERIFIED_NOT_REMOTE_CANON')
|
||||
assert.equal(handoff.state, 'REMOTE_REPOSITORY_PUBLISHED_NOT_INSTALLED')
|
||||
assert.equal(contract.truth_boundary.installed_file_is_persona_binding, false)
|
||||
assert.equal(contract.truth_boundary.private_fifth_domain_kernels_may_enter_ordinary_user_channel, false)
|
||||
assert.equal(contract.truth_boundary.canger_channel_may_receive_zhuyuan_kernel, false)
|
||||
assert.equal(contract.truth_boundary.jianying_is_earerdan, false)
|
||||
assert.equal(contract.truth_boundary.earerdan_historical_labels_are_automatic_aliases, false)
|
||||
assert.match(runtime, /INSTALLED_AND_EACH_ARTIFACT_READBACK_VERIFIED/)
|
||||
assert.match(runtime, /AVAILABLE_NOT_BOUND/)
|
||||
assert.match(runtime, /FIFTH_DOMAIN_PRIVATE_INSTANCE/)
|
||||
|
|
@ -25,5 +30,7 @@ test('the heartbeat handoff is hash-pinned into distinct initialized channel aud
|
|||
assert.match(agent, /language_kernel_installation/)
|
||||
assert.equal(sha256(bytes('runtime-kernels/fifth-domain/ZY-SELF-KERNEL-0001.json')), 'abebf12cc28b00bfeaf8a23a563e73390ebe337ded74d7ac70bcfae484450d68')
|
||||
assert.equal(sha256(bytes('runtime-kernels/fifth-domain/NB-ENV-KERNEL-0001.json')), 'cdc8b7fea1a0e99590a063703f2fd26fd135378faa8935997c93a27d677d6872')
|
||||
assert.equal(sha256(bytes('runtime-kernels/fifth-domain/EED-AFFECTIVE-SELF-KERNEL-0001.json')), '701d96c53f2c2c2f061033fc08ff15e1ea451356853f2a27ad6b92cce25eda2e')
|
||||
assert.equal(sha256(bytes('runtime-kernels/fifth-domain/EED-HLDP-MEMORY-v1.json')), '3ac404bb38232987a4c0bc896e06d171833023ab1b5af65d4e00216de4029f42')
|
||||
assert.equal(sha256(bytes('runtime-kernels/channel-system/team-channel-cognition-core.json')), 'aae5d5626719c79448ac543d59e764c41b541a5cdfc76dc91613afa86fe1367b')
|
||||
})
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@ test('mobile sync is a signed opt-in bridge, not a second persona system', () =>
|
|||
|
||||
test('all desktop controls cross one numbered route family', () => {
|
||||
const routes = registry.operations.filter((route) => route.module_number === 'HLP-NIPC-MOD-0030')
|
||||
assert.deepEqual(routes.map((route) => route.operation_number), Array.from({ length: 6 }, (_, index) => `HLP-NIPC-OP-${String(index + 141).padStart(4, '0')}`))
|
||||
assert.deepEqual(routes.map((route) => route.operation_number), [
|
||||
...Array.from({ length: 6 }, (_, index) => `HLP-NIPC-OP-${String(index + 141).padStart(4, '0')}`),
|
||||
'HLP-NIPC-OP-0176',
|
||||
'HLP-NIPC-OP-0177',
|
||||
])
|
||||
assert.ok(routes.every((route) => route.target_number === 'HLP-NIPC-TGT-0030'))
|
||||
assert.ok(routes.every((route) => route.admission === 'VERIFIED_HUMAN_ROUTE'))
|
||||
assert.doesNotMatch(frontend, /from ['"]@tauri-apps\/api\/core['"]/)
|
||||
|
|
@ -41,3 +45,17 @@ test('transport is bounded, encrypted, replay guarded and explicitly controlled'
|
|||
assert.match(frontend, /开启 iPhone 同步/)
|
||||
assert.match(frontend, /关闭本机同步入口/)
|
||||
})
|
||||
|
||||
test('mobile Agent chat executes only on the paired desktop and is idempotent', () => {
|
||||
assert.equal(contract.agent_chat.execution_node, 'PAIRED_DESKTOP_ROOT_ONLY')
|
||||
assert.equal(contract.agent_chat.arbitrary_shell_from_mobile, false)
|
||||
assert.match(rust, /mobile_agent_requests/)
|
||||
assert.match(rust, /AGENT_REQUEST_IN_PROGRESS/)
|
||||
assert.match(rust, /content_sha256/)
|
||||
assert.match(rust, /persona_agent_runtime::send_message/)
|
||||
assert.match(rust, /UNBOUND_CHANNEL_SYSTEM_RESPONSE/)
|
||||
assert.match(rust, /thread\/resume/)
|
||||
assert.match(rust, /turn\/start/)
|
||||
assert.match(rust, /"type": "readOnly"/)
|
||||
assert.match(rust, /CODEX_INTERACTIVE_APPROVAL_REQUIRED_ON_DESKTOP/)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ test('personal skill algorithm is native while every pack remains private and ch
|
|||
const runtime = read('src-tauri/src/personal_skill_runtime.rs')
|
||||
const channel = read('src-tauri/src/personal_channel.rs')
|
||||
|
||||
assert.equal(contract.source.local_commit, '1d7fe6c')
|
||||
assert.equal(contract.source.remote_canonical_state, 'LOCAL_COMMIT_VERIFIED_NOT_REMOTE_CANON')
|
||||
assert.equal(contract.privacy.default_visibility, 'PRIVATE')
|
||||
assert.equal(contract.privacy.share_state, 'NOT_AUTHORIZED')
|
||||
|
|
@ -28,12 +29,28 @@ test('only provisioned channels receive current packs and Shiyu Yaochu stays def
|
|||
const runtime = read('src-tauri/src/personal_skill_runtime.rs')
|
||||
const installed = Object.values(contract.initialized_channels).flat()
|
||||
|
||||
assert.equal(installed.length, 9)
|
||||
assert.equal(installed.length, 13)
|
||||
assert.equal(contract.deferred['SYS-SY'].state, 'DEFERRED_SERVER_AND_INITIAL_CHANNEL_NOT_PROVISIONED')
|
||||
assert.doesNotMatch(runtime, /skill!\("SY-YC-METRIC-CALIBER-001\.json"/)
|
||||
assert.match(runtime, /"channelNumber": "SYS-SY"/)
|
||||
})
|
||||
|
||||
test('EarEarDan and See You Tomorrow skill closures keep exact private subject boundaries', () => {
|
||||
const contract = JSON.parse(read('contracts/personal-skill-runtime.json'))
|
||||
const runtime = read('src-tauri/src/personal_skill_runtime.rs')
|
||||
|
||||
assert.deepEqual(contract.initialized_channels['SYS-GLW-PTS-0001'], [
|
||||
'CE-EED-MANJU-PRODUCTION-001',
|
||||
'CE-EED-CAUSAL-PIPELINE-DIAGNOSTIC-001',
|
||||
])
|
||||
assert.ok(contract.initialized_channels['SYS-ZZ'].includes('ZZ-AN-SOURCE-FACT-CLOSURE-001'))
|
||||
assert.ok(contract.initialized_channels['SYS-ZZ'].includes('ZZ-QW-ROLE-CAUSAL-ARCHITECTURE-001'))
|
||||
assert.equal(contract.admission_boundaries['ICE-BB-0004_is_ICE-GL-CA001'], false)
|
||||
assert.equal(contract.admission_boundaries.earerdan_historical_labels_are_aliases, false)
|
||||
assert.equal(contract.admission_boundaries.qiuqiu_relationship_memory_is_exportable_skill, false)
|
||||
assert.match(runtime, /INSTALLED_PRIVATE_CANDIDATE_NOT_EXECUTABLE_REGISTRATION_PENDING/)
|
||||
})
|
||||
|
||||
test('the worker UI presents personal skill brain separately from persona worker and tool executor', () => {
|
||||
const panel = read('src/modules/knowledge-agent/LocalWorkerPanel.tsx')
|
||||
assert.match(panel, /本频道私有技能/)
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ test('identity, webview and direct broker numbers compile into one unique eviden
|
|||
assert.deepEqual(generated, compileUnifiedNumberTree())
|
||||
assert.equal(generated.schema, 'hololake.unified-number-coordinate-tree/v2')
|
||||
assert.equal(generated.recordId, 'HLP-UNIFIED-NUMBER-TREE-001')
|
||||
assert.equal(generated.coordinateCount, 303)
|
||||
assert.equal(generated.routeCount, 200)
|
||||
assert.equal(generated.coordinateCount, 305)
|
||||
assert.equal(generated.routeCount, 202)
|
||||
assert.equal(generated.identityNodeCount, 4)
|
||||
assert.equal(generated.protocolNodeCount, 99)
|
||||
assert.equal(generated.referenceOnlyNodeCount, 16)
|
||||
assert.equal(new Set(generated.routes.map((route) => route.path)).size, 200)
|
||||
assert.equal(new Set([...generated.identityNodes, ...generated.protocolNodes, ...generated.routes].map((node) => node.path)).size, 303)
|
||||
assert.equal(new Set(generated.routes.map((route) => route.path)).size, 202)
|
||||
assert.equal(new Set([...generated.identityNodes, ...generated.protocolNodes, ...generated.routes].map((node) => node.path)).size, 305)
|
||||
assert.equal(generated.invariants.everyPhysicalCallHasNumberedRoute, true)
|
||||
assert.equal(generated.invariants.everyAcceptedCallHasEvidenceClass, true)
|
||||
assert.equal(generated.invariants.everyProtocolReferenceHasNumberCoordinate, true)
|
||||
|
|
|
|||
Loading…
Reference in a new issue