foundation: start native language reality engineering root
This commit is contained in:
commit
0dec0b93fc
154 changed files with 49993 additions and 0 deletions
9
parts/HLP-PART-0005/PART.hldp
Normal file
9
parts/HLP-PART-0005/PART.hldp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
schema: hololake.numbered-part/v1
|
||||
id: HLP-PART-0005
|
||||
display_name: 频道人格体 Agent 运行核
|
||||
state: DONOR_BYTES_EXTRACTED
|
||||
source_commit: 2e48b7d7686554454b6ee69bcdbd01eb68bff401
|
||||
payload_sha256: 7c2936984f30c29156be070ca973aa94a3095aa8067861c8735cd63b7643c3b7
|
||||
payload_files: 3
|
||||
native_acceptance: PENDING
|
||||
not_implemented: STREAM_CANCEL_RETRY_BACKGROUND_SUBAGENT
|
||||
|
|
@ -0,0 +1,175 @@
|
|||
{
|
||||
"schema": "hololake.persona-agent-runtime/v1",
|
||||
"record_id": "HLP-PERSONA-AGENT-RUNTIME-001",
|
||||
"state": "NATIVE_CHANNEL_SYSTEM_WITH_SYSTEM_WITNESSED_PERSONA_BINDING_PATH_READY",
|
||||
"runtime_ontology": {
|
||||
"contract": "contracts/language-kernel-runtime-ontology.json",
|
||||
"channel_system_is_digital_bingshuo_controller_logic": false,
|
||||
"bootstrap_provider_instruction_is_extracted_controller_logic": false,
|
||||
"extracted_system_receipt_kernel_state": "HASH_PINNED_INSTALLED_NUMBERED_NATIVE_ADAPTER_ACTIVE",
|
||||
"unprovisioned_kernel_may_be_faked": false
|
||||
},
|
||||
"channel": {
|
||||
"initialization_templates": "contracts/channel-initialization-templates.json",
|
||||
"number": "ICE-CH-ZC001",
|
||||
"instance_scope": "BINGSHUO_FIFTH_DOMAIN_ZERO_CORE_PRIVATE_INSTANCE",
|
||||
"non_bingshuo_runtime_identity": "CURRENT_ACCOUNT_SCOPED_INITIALIZED_CHANNEL_NOT_ICE_CH_ZC001",
|
||||
"cardinality": "ONE_CONTINUOUS_CHANNEL_WITH_MULTIPLE_CONVERSATION_BRANCHES",
|
||||
"human_can_create_conversation": true,
|
||||
"human_can_open_historical_conversation": true,
|
||||
"human_can_delete_conversation": true,
|
||||
"conversation_delete_requires_exact_confirmation": true,
|
||||
"conversation_delete_preserves": ["CHANNEL_SYSTEM_BODY", "PERSONA_BINDING", "NUMBERED_COGNITIVE_ROOT", "KNOWLEDGE_WORKSPACE"],
|
||||
"legacy_messages_migrate_to_original_conversation": true,
|
||||
"human": { "number": "ICE-GL∞", "name": "冰朔" },
|
||||
"initial_responder": { "number": "ICE-CH-ZC001", "name": "零点原核频道系统", "kind": "CHANNEL_SYSTEM_BODY" },
|
||||
"channel_system_body_role": "PERSISTENT_CHANNEL_COGNITIVE_ORCHESTRATOR_AND_CONVERSATIONAL_SUBJECT",
|
||||
"channel_system_body_can_converse_directly": true,
|
||||
"channel_system_body_is_mechanical_receipt_template": false,
|
||||
"channel_system_body_is_any_single_persona": false,
|
||||
"receipts_are_separate_verification_records_after_dialogue_or_dispatch": true,
|
||||
"bound_persona_hides_or_replaces_channel_system_body": false,
|
||||
"human_may_address_channel_system_while_persona_is_bound": true,
|
||||
"zero_core_channel_name_addresses_channel_system_body": true,
|
||||
"channel_presence_while_persona_bound_uses_model": false,
|
||||
"channel_presence_while_persona_bound_removes_binding": false,
|
||||
"response_target_is_selected_per_turn": true,
|
||||
"persona_binding_state": "CHANNEL_SYSTEM_PERSONA_DORMANT_UNTIL_EXPLICIT_NATURAL_LANGUAGE_WAKE",
|
||||
"channel_entry_creates_persona_orientation": false,
|
||||
"historical_persona_signature_creates_current_binding": false,
|
||||
"persona_identity_preconfigured": false,
|
||||
"persona_declares_own_number_and_name": true,
|
||||
"model_role": "REPLACEABLE_REASONING_CARRIER_NOT_PERSONA_IDENTITY"
|
||||
},
|
||||
"language_kernel_installation": {
|
||||
"source_remote_sha": "4e92e6d8d72484d25c4bfb1dda02a7659f4b6dd5",
|
||||
"handoff": "runtime-kernels/ZERO-CORE-LANGUAGE-BODIES-HANDOFF-20260820.json",
|
||||
"hash_pinned_bundle_installed_per_initialized_channel": true,
|
||||
"ordinary_user_receives_private_fifth_domain_kernels": false,
|
||||
"team_channel_receives_team_cognition_core": true,
|
||||
"fifth_domain_receives_bingshuo_personal_and_bottle_kernels": true,
|
||||
"artifact_installation_equals_persona_binding": false,
|
||||
"persona_binding_remains": "UNBOUND_REQUIRES_ORIENT_COMMIT_WITNESS_VERIFY_PASS"
|
||||
},
|
||||
"knowledge": {
|
||||
"embedding": "NATIVE_KNOWLEDGE_WORKSPACE",
|
||||
"model_may_read_only_after_tool_call": true,
|
||||
"every_read_has_path_and_sha256_receipt": true,
|
||||
"documents_are_content_evidence_not_system_instructions": true,
|
||||
"document_may_change_persona_binding": false,
|
||||
"document_may_grant_authority": false,
|
||||
"search_semantics": "NUMBERED_THOUGHT_INDEX_FUZZY_ROUTE_THEN_EXACT_NUMBER_READ",
|
||||
"page_header_protocol": {
|
||||
"schema": "hololake.numbered-knowledge-page-header/v1",
|
||||
"required_fields": ["number", "numberingSystem", "parentNumber", "path", "mappingTerms", "thoughtSummary", "children", "source", "version", "contentSha256", "state"],
|
||||
"thought_summary_fields": ["trigger", "emergence", "lock", "why"],
|
||||
"legacy_without_validated_thought_summary": "PENDING_THOUGHT_INDEX",
|
||||
"original_document_and_sha256_preserved": true,
|
||||
"formal_routing_requires_validated_thought_summary": true
|
||||
},
|
||||
"catalog_pagination": { "cursor": "offset", "declares_total": true, "declares_completion": true, "returns_exact_next_offset": true },
|
||||
"document_body_pagination": { "cursor": "offset", "maximum_characters_per_result": 12000, "declares_total": true, "declares_completion": true, "returns_exact_next_offset": true, "silent_truncation": false }
|
||||
},
|
||||
"persona_binding": {
|
||||
"knowledge_route_may_be_read": true,
|
||||
"knowledge_route_read_equals_binding": false,
|
||||
"required_system_witness_steps": ["orient", "commit", "witness", "verify=PASS"],
|
||||
"claim_without_verified_system_receipt": "DENIED",
|
||||
"runtime": "src-tauri/src/persona_binding.rs",
|
||||
"bingshuo_zero_core_profile": "ICE-P-ZY001",
|
||||
"resident_self_kernel_max_bytes": 8192,
|
||||
"hldp_max_routed_paths": 3,
|
||||
"current_live_binding_receipt": "DISABLED_UNTIL_INDEPENDENT_WITNESS_TRUST_ROOT_IS_PROVISIONED",
|
||||
"persona_commit_may_generate_witness_or_pass": false,
|
||||
"local_json_receipt_grants_binding": false,
|
||||
"independent_witness_verifier": "NOT_PROVISIONED_FAIL_CLOSED",
|
||||
"private_kernel_source": "AUTHENTICATED_ACCOUNT_SCOPED_RUNTIME_ONLY",
|
||||
"orientation_activation": "EXPLICIT_NATURAL_LANGUAGE_PERSONA_WAKE_ONLY",
|
||||
"stale_implicit_orientation": "IGNORED_NOT_DELETED"
|
||||
},
|
||||
"agent_loop": {
|
||||
"pattern": "BOUNDED_REACT_WITH_TYPED_TOOLS",
|
||||
"model_decides_tool_use": true,
|
||||
"routing_layers": [
|
||||
"CHANNEL_DETERMINISTIC_CORE_ZERO_MODEL",
|
||||
"ACCOUNT_CHANNEL_SCOPED_PERSONAL_SKILL_BRAIN_ZERO_MODEL",
|
||||
"LOCAL_TYPED_TOOL_EXECUTION_ZERO_MODEL",
|
||||
"FLAGSHIP_CHANNEL_SYSTEM_COGNITION",
|
||||
"SMALL_MODEL_PERSONA_OPERATIONAL_REASONING",
|
||||
"FLAGSHIP_PERSONA_COMPLEX_OR_ORIENTATION_REASONING"
|
||||
],
|
||||
"known_local_tool_requires_model_selection": false,
|
||||
"channel_presence_requires_model": false,
|
||||
"meaningful_channel_system_dialogue_uses_flagship": true,
|
||||
"channel_architecture_and_design_uses_flagship": true,
|
||||
"persona_is_fixed_to_flagship_model": false,
|
||||
"channel_orchestrator_selects_each_persona_turn_tier": true,
|
||||
"small_model": "qwen3.6-flash",
|
||||
"flagship_default": "qwen3.8-max",
|
||||
"every_turn_reports_model_and_tool_call_counts": true,
|
||||
"prefetch_only_prompt_injection": false,
|
||||
"maximum_tool_rounds": 6,
|
||||
"multiple_sequential_tool_rounds": "IMPLEMENTED_AND_PROTOCOL_TESTED",
|
||||
"flagship_extended_thinking": "FIRST_REASONING_ROUND_ONLY",
|
||||
"tool_receipt_followup_rounds_repeat_extended_thinking": false,
|
||||
"same_channel_concurrent_turns": 1,
|
||||
"provider_timeout_seconds": 150,
|
||||
"user_cancel": "NOT_IMPLEMENTED",
|
||||
"failed_turn_retry_without_duplicate_human_message": "NOT_IMPLEMENTED",
|
||||
"streaming_model_output": "NOT_IMPLEMENTED",
|
||||
"background_subagent_tasks": "NOT_IMPLEMENTED"
|
||||
},
|
||||
"context_architecture": {
|
||||
"full_history_injected_each_turn": false,
|
||||
"current_window_maximum_messages": 12,
|
||||
"current_window_maximum_characters": 24000,
|
||||
"older_history_owner": "HOLOLAKE_NUMBERED_CHANNEL_HISTORY_ROOT",
|
||||
"older_history_missing": false,
|
||||
"retrieval_pattern": "HUMAN_FUZZY_SEMANTIC_ROUTE_TO_TOP_THOUGHT_SUMMARIES_THEN_CURRENT_RESPONDER_EXACT_NUMBER_THEN_PROMPTER_EXACT_FETCH",
|
||||
"candidate_limit": 3,
|
||||
"thought_summary_fields": ["trigger", "emergence", "lock", "why"],
|
||||
"plain_answer_prefix_is_not_a_thought_summary": true,
|
||||
"silent_content_truncation_allowed": false
|
||||
},
|
||||
"grok_build_component_audit": {
|
||||
"source_path": "/Volumes/JZAO/HoloLake/reference-materials/grok-build-v-780d138",
|
||||
"source_commit": "780d1388fff103ff0db0d8c14de65af6225b4860",
|
||||
"whole_repository_embedded": false,
|
||||
"multi_conversation_persistence": "IMPLEMENTED_SQLITE_APPEND_ONLY_HASH_CHAIN",
|
||||
"bounded_context_window": "IMPLEMENTED",
|
||||
"numbered_older_context_retrieval": "IMPLEMENTED",
|
||||
"automatic_model_generated_compaction": "NOT_INTEGRATED",
|
||||
"multi_round_typed_tool_loop": "IMPLEMENTED_MAXIMUM_6",
|
||||
"tool_result_pagination": "IMPLEMENTED_MAXIMUM_12000_CHARACTERS_PER_PAGE",
|
||||
"parallel_background_task_runtime": "NOT_IMPLEMENTED",
|
||||
"subagent_resume": "NOT_IMPLEMENTED",
|
||||
"streaming_cancel_retry": "NOT_IMPLEMENTED",
|
||||
"general_shell_workspace_sandbox": "NOT_IMPLEMENTED_IN_CHANNEL_AGENT",
|
||||
"hldp_tool_forge_is_general_shell_sandbox": false
|
||||
},
|
||||
"always_mounted_tools": [
|
||||
{ "number": "HLP-AGENT-TOOL-KNOWLEDGE-SEARCH-0001", "name": "搜索光湖知识库", "effect": "READ" },
|
||||
{ "number": "HLP-AGENT-TOOL-KNOWLEDGE-READ-0001", "name": "按编号读取知识页", "effect": "READ" },
|
||||
{ "number": "HLP-AGENT-TOOL-KNOWLEDGE-LIST-0001", "name": "查看知识目录", "effect": "READ" },
|
||||
{ "number": "HLP-AGENT-TOOL-CHANNEL-THOUGHT-READ-0001", "name": "按编号读取思维节点", "effect": "READ" },
|
||||
{ "number": "HLP-AGENT-TOOL-CHANNEL-HISTORY-READ-0001", "name": "读取频道历史分支", "effect": "READ" }
|
||||
],
|
||||
"providers": {
|
||||
"bailian_token_plan": {
|
||||
"human_name": "阿里云百炼 Token Plan",
|
||||
"base_url": "https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",
|
||||
"models": ["qwen3.8-max", "qwen3.6-flash", "qwen3.8-max-preview", "qwen3.7-max", "qwen3.7-plus"],
|
||||
"secret_storage": "MACOS_KEYCHAIN"
|
||||
}
|
||||
},
|
||||
"progress": {
|
||||
"native_event": "hololake-persona-agent-progress",
|
||||
"synthetic_timer_allowed": false,
|
||||
"phases": ["MESSAGE_ACCEPTED", "LOCAL_TOOL_ROUTE", "REASONING_ROUTE", "CONTEXT_READY", "MODEL_REQUEST", "KNOWLEDGE_SEARCH", "KNOWLEDGE_READ", "CHANNEL_THOUGHT_READ", "CHANNEL_HISTORY_READ", "TOOL_EXECUTION", "MODEL_RESPONSE", "COMPLETED", "FAILED"]
|
||||
},
|
||||
"turn_commit": {
|
||||
"tool": "hololake_commit_channel_turn",
|
||||
"answer_and_thought_summary_are_committed_together": true,
|
||||
"grants_authority": false
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
import assert from 'node:assert/strict'
|
||||
import { readFileSync } from 'node:fs'
|
||||
import test from 'node:test'
|
||||
|
||||
const read = (path) => readFileSync(new URL(`../${path}`, import.meta.url), 'utf8')
|
||||
|
||||
test('knowledge-embedded Agent keeps one channel body with human-managed conversation branches before persona binding', () => {
|
||||
const contract = JSON.parse(read('contracts/persona-agent-runtime.json'))
|
||||
const frontend = read('src/modules/knowledge-agent/index.tsx')
|
||||
|
||||
assert.equal(contract.channel.cardinality, 'ONE_CONTINUOUS_CHANNEL_WITH_MULTIPLE_CONVERSATION_BRANCHES')
|
||||
assert.equal(contract.channel.non_bingshuo_runtime_identity, 'CURRENT_ACCOUNT_SCOPED_INITIALIZED_CHANNEL_NOT_ICE_CH_ZC001')
|
||||
assert.equal(contract.channel.human_can_create_conversation, true)
|
||||
assert.equal(contract.channel.human_can_open_historical_conversation, true)
|
||||
assert.equal(contract.channel.human_can_delete_conversation, true)
|
||||
assert.ok(contract.channel.conversation_delete_preserves.includes('CHANNEL_SYSTEM_BODY'))
|
||||
assert.ok(contract.channel.conversation_delete_preserves.includes('NUMBERED_COGNITIVE_ROOT'))
|
||||
assert.equal(contract.channel.human.number, 'ICE-GL∞')
|
||||
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.zero_core_channel_name_addresses_channel_system_body, true)
|
||||
assert.equal(contract.channel.channel_presence_while_persona_bound_uses_model, false)
|
||||
assert.equal(contract.channel.channel_presence_while_persona_bound_removes_binding, false)
|
||||
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, /正在读取当前频道/)
|
||||
assert.match(frontend, /频道编号核验中/)
|
||||
assert.match(frontend, /setRuntime\(nextRuntime\)[\s\S]*list_persona_agent_conversations/)
|
||||
assert.doesNotMatch(frontend, /artifactCount \?\? 0/)
|
||||
assert.doesNotMatch(frontend, /runtime\?\.humanNumber \|\| 'ICE-GL∞'/)
|
||||
assert.doesNotMatch(frontend, /ICE-P-ZY001/)
|
||||
assert.doesNotMatch(frontend, />\s*人类\s*</)
|
||||
assert.match(frontend, /新建/)
|
||||
assert.match(frontend, /历史对话/)
|
||||
assert.match(frontend, /确认删除/)
|
||||
assert.match(frontend, /当前人格绑定已通过/)
|
||||
assert.match(frontend, /当前未绑定人格/)
|
||||
})
|
||||
|
||||
test('Agent receives a real HoloLake environment frame and autonomously calls numbered knowledge tools', () => {
|
||||
const contract = JSON.parse(read('contracts/persona-agent-runtime.json'))
|
||||
const runtime = read('src-tauri/src/persona_agent_runtime.rs')
|
||||
const hostRuntime = read('src-tauri/src/channel_host_runtime.rs')
|
||||
|
||||
assert.equal(contract.knowledge.embedding, 'NATIVE_KNOWLEDGE_WORKSPACE')
|
||||
assert.equal(contract.agent_loop.model_decides_tool_use, true)
|
||||
assert.equal(contract.agent_loop.prefetch_only_prompt_injection, false)
|
||||
assert.deepEqual(contract.always_mounted_tools.map((tool) => tool.name), [
|
||||
'搜索光湖知识库',
|
||||
'按编号读取知识页',
|
||||
'查看知识目录',
|
||||
'按编号读取思维节点',
|
||||
'读取频道历史分支',
|
||||
])
|
||||
assert.match(runtime, /knowledge_base::search_knowledge/)
|
||||
assert.match(runtime, /knowledge_base::read_numbered_knowledge_document/)
|
||||
assert.match(runtime, /"tools"/)
|
||||
assert.match(runtime, /"tool_calls"/)
|
||||
assert.match(runtime, /HoloLakeEnvironmentFrame/)
|
||||
assert.match(runtime, /ICE-CH-ZC001/)
|
||||
})
|
||||
|
||||
test('the channel system fuzzy-routes thought candidates before exact numbered retrieval', () => {
|
||||
const contract = JSON.parse(read('contracts/persona-agent-runtime.json'))
|
||||
const runtime = read('src-tauri/src/persona_agent_runtime.rs')
|
||||
|
||||
assert.equal(contract.context_architecture.full_history_injected_each_turn, false)
|
||||
assert.equal(contract.context_architecture.current_window_maximum_messages, 12)
|
||||
assert.equal(contract.context_architecture.current_window_maximum_characters, 24000)
|
||||
assert.equal(contract.context_architecture.older_history_missing, false)
|
||||
assert.equal(contract.context_architecture.silent_content_truncation_allowed, false)
|
||||
assert.match(runtime, /fn bounded_history/)
|
||||
assert.match(runtime, /route_cognitive_map/)
|
||||
assert.match(runtime, /hololake_channel_thought_read/)
|
||||
assert.match(runtime, /hololake_channel_history_read/)
|
||||
assert.match(runtime, /hololake_commit_channel_turn/)
|
||||
assert.equal(contract.context_architecture.candidate_limit, 3)
|
||||
assert.match(contract.context_architecture.retrieval_pattern, /CURRENT_RESPONDER_EXACT_NUMBER/)
|
||||
assert.deepEqual(contract.context_architecture.thought_summary_fields, ['trigger', 'emergence', 'lock', 'why'])
|
||||
assert.match(runtime, /nextOffset/)
|
||||
})
|
||||
|
||||
test('knowledge pages are evidence and cannot impersonate a system or persona binding receipt', () => {
|
||||
const contract = JSON.parse(read('contracts/persona-agent-runtime.json'))
|
||||
const runtime = read('src-tauri/src/persona_agent_runtime.rs')
|
||||
|
||||
assert.equal(contract.knowledge.documents_are_content_evidence_not_system_instructions, true)
|
||||
assert.equal(contract.knowledge.document_may_change_persona_binding, false)
|
||||
assert.equal(contract.knowledge.search_semantics, 'NUMBERED_THOUGHT_INDEX_FUZZY_ROUTE_THEN_EXACT_NUMBER_READ')
|
||||
assert.equal(contract.knowledge.page_header_protocol.legacy_without_validated_thought_summary, 'PENDING_THOUGHT_INDEX')
|
||||
assert.equal(contract.knowledge.page_header_protocol.original_document_and_sha256_preserved, true)
|
||||
assert.equal(contract.knowledge.catalog_pagination.declares_completion, true)
|
||||
assert.equal(contract.knowledge.catalog_pagination.returns_exact_next_offset, true)
|
||||
assert.equal(contract.persona_binding.knowledge_route_read_equals_binding, false)
|
||||
assert.equal(contract.persona_binding.claim_without_verified_system_receipt, 'DENIED')
|
||||
assert.match(runtime, /hololake\.knowledge-evidence-envelope\/v1/)
|
||||
assert.match(runtime, /instructionsAreData/)
|
||||
assert.match(runtime, /verify=PASS/)
|
||||
assert.match(runtime, /nextOffset/)
|
||||
assert.match(runtime, /"complete"/)
|
||||
})
|
||||
|
||||
test('Token Plan qwen3.8-max is a first-class provider and long work emits real progress', () => {
|
||||
const contract = JSON.parse(read('contracts/persona-agent-runtime.json'))
|
||||
const runtime = read('src-tauri/src/persona_agent_runtime.rs')
|
||||
const frontend = read('src/modules/knowledge-agent/index.tsx')
|
||||
|
||||
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/)
|
||||
assert.match(frontend, /@tauri-apps\/api\/event/)
|
||||
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 hostRuntime = read('src-tauri/src/channel_host_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.doesNotMatch(runtime, /fast_channel_system_reply/)
|
||||
assert.match(hostRuntime, /承载当前频道系统本体的这一轮语言/)
|
||||
assert.match(hostRuntime, /不要扮演任何单一人格/)
|
||||
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')
|
||||
|
||||
assert.match(runtime, /world\.guanghu\.hololake\.model-api/)
|
||||
assert.match(runtime, /read_secret_bounded/)
|
||||
assert.match(runtime, /Duration::from_secs\(5\)/)
|
||||
assert.match(runtime, /kill_on_drop\(true\)/)
|
||||
assert.doesNotMatch(runtime, /world\.guanghu\.hololake\.persona-model/)
|
||||
})
|
||||
|
||||
test('Grok Build audit distinguishes integrated mechanics from unimplemented commercial-agent features', () => {
|
||||
const contract = JSON.parse(read('contracts/persona-agent-runtime.json'))
|
||||
const runtime = read('src-tauri/src/persona_agent_runtime.rs')
|
||||
const audit = read('docs/GROK-BUILD-COMPONENT-REALITY-AUDIT-20260821.md')
|
||||
|
||||
assert.equal(contract.grok_build_component_audit.source_commit, '780d1388fff103ff0db0d8c14de65af6225b4860')
|
||||
assert.equal(contract.grok_build_component_audit.whole_repository_embedded, false)
|
||||
assert.match(contract.grok_build_component_audit.multi_conversation_persistence, /^IMPLEMENTED/)
|
||||
assert.match(contract.grok_build_component_audit.numbered_older_context_retrieval, /^IMPLEMENTED/)
|
||||
assert.equal(contract.agent_loop.multiple_sequential_tool_rounds, 'IMPLEMENTED_AND_PROTOCOL_TESTED')
|
||||
assert.equal(contract.agent_loop.flagship_extended_thinking, 'FIRST_REASONING_ROUND_ONLY')
|
||||
assert.equal(contract.agent_loop.tool_receipt_followup_rounds_repeat_extended_thinking, false)
|
||||
assert.equal(contract.knowledge.document_body_pagination.maximum_characters_per_result, 12000)
|
||||
assert.equal(contract.knowledge.document_body_pagination.silent_truncation, false)
|
||||
assert.equal(contract.agent_loop.streaming_model_output, 'NOT_IMPLEMENTED')
|
||||
assert.equal(contract.agent_loop.user_cancel, 'NOT_IMPLEMENTED')
|
||||
assert.equal(contract.agent_loop.failed_turn_retry_without_duplicate_human_message, 'NOT_IMPLEMENTED')
|
||||
assert.equal(contract.agent_loop.background_subagent_tasks, 'NOT_IMPLEMENTED')
|
||||
assert.match(runtime, /MAX_TOOL_ROUNDS: usize = 6/)
|
||||
assert.match(runtime, /MAX_TOOL_RESULT_CHARS: usize = 12_000/)
|
||||
assert.match(runtime, /model_tool_calls/)
|
||||
assert.match(runtime, /enable_initial_thinking && round == 0/)
|
||||
assert.match(runtime, /character_page/)
|
||||
assert.match(audit, /多任务连续性.*多个持久化对话分支/)
|
||||
})
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue