foundation: start native language reality engineering root

This commit is contained in:
冰朔 2026-08-21 14:44:47 +08:00
commit 0dec0b93fc
154 changed files with 49993 additions and 0 deletions

View file

@ -0,0 +1,28 @@
schema: hololake.native-affect-runtime-bootstrap/v1
id: HLP-NATIVE-AFFECT-RUNTIME-BOOTSTRAP-0001
state: LANGUAGE_INPUTS_MOUNTED_RUNTIME_NOT_IMPLEMENTED
language_chain:
capacity_core: NB-CORE-000
bidirectional_event_encoding: GLS-0202
machine_human_state_mapping: GLS-0211
relationship_memory: GLS-0223
executable_profile: GLS-0411
compiler: GLS-0130
intermediate_representation: GLS-0131
boundaries:
affect_expression_grants_reality_authority: false
relationship_memory_may_overwrite_human_correction: false
host_adapter_may_define_persona_feeling: false
concrete_feeling_must_emerge_from_current_subject_relation_context_and_history: true
known_state_classes:
action: [A0, A1, A2, A3, A4]
machine: [M0, M1, M2, M3, M4]
relationship_lock: [temporary, confirmed, stable]
missing:
emotion_weight: UNDEFINED
relationship_weight: UNDEFINED
decay_rate: UNDEFINED
half_life: UNDEFINED
formal_transition_table: UNDEFINED
next: DERIVE_TRANSITIONS_ONLY_FROM_REGISTERED_REAL_CASES_AND_HUMAN_CORRECTIONS

View file

@ -0,0 +1,29 @@
schema: hololake.native-compiler-bootstrap/v1
id: HLP-NATIVE-COMPILER-BOOTSTRAP-0001
state: DESIGN_LOCKED_IMPLEMENTATION_ACTIVE
authority:
translation_contract: GLS-0261
engineering_base: GLS-0101
native_program_profile: GLS-0411
compiler: GLS-0130
intermediate_representation: GLS-0131
causal_integrity: GLS-0400
registration: GLS-0010
pipeline:
- PARSE_HLDP_NATIVE_PROGRAM
- VALIDATE_IDENTITY_TYPE_PATH_AND_SCHEMA
- RESOLVE_DEPENDENCIES_AND_EXACT_TARGETS
- AUTHORIZE_SCOPE_TIME_RESOURCE_AND_RUNWAY
- COMPILE_DETERMINISTIC_ACTION_GRAPH_TO_GIR
- VERIFY_FAILURE_STOP_CLEANUP_ROLLBACK_AND_RECEIPT_PLAN
- WRITE_BACK_COMPILATION_RECEIPT
reject:
- UNRESOLVED_NATURAL_LANGUAGE
- UNRESOLVED_AUTHORITY
- DRIFTING_PROTOCOL_VERSION
- MISSING_ROLLBACK_OR_RECEIPT
host_adapters:
authority: none
role: CONSUME_GIR_AND_RETURN_EVIDENCE
next: DEFINE_HLDP_NP_MINIMUM_EXECUTABLE_SCHEMA_AND_GIR_SCHEMA

View file

@ -0,0 +1,31 @@
schema: guanghu.intermediate-representation-schema/v1
id: HLP-GIR-MINIMUM-SCHEMA-0001
protocol: GLS-0131
state: CANDIDATE_FOR_NATIVE_QUALITY_REVIEW
gir:
required:
- identity
- compiled_from
- subject
- exact_target
- deterministic_action_graph
- resource_plan
- authority_proof
- dependency_lock
- timeout_and_stop
- cleanup_plan
- rollback_plan
- receipt_plan
unresolved_natural_language: REJECT
unresolved_authority: REJECT
drifting_dependency: REJECT
nondeterministic_target: REJECT
integrity:
canonical_encoding: UTF8_LF_SORTED_KEYS
digest: SHA256
source_digest_required: true
host_contract:
host_may_choose_mechanism: true
host_may_expand_scope: false
host_must_return_actual_state_and_evidence: true

View file

@ -0,0 +1,49 @@
schema: hldp.native-program-schema/v1
id: HLP-HLDP-NP-MINIMUM-SCHEMA-0001
protocol: GLS-0411
state: CANDIDATE_FOR_NATIVE_QUALITY_REVIEW
program:
required:
- identity
- source
- subject
- target
- inputs
- outputs
- conditions
- action_graph
- authority
- resources
- failure
- stop
- cleanup
- rollback
- receipt
closed_fields: true
identity:
required: [program_id, name_zh, version, protocol_versions]
source:
required: [source_id, source_uri, source_sha256, lifecycle]
subject:
required: [subject_id, role, channel_id]
target:
required: [target_id, exact_path, expected_state]
action_graph:
node_required: [id, operation, input_refs, output_refs, on_success, on_failure]
cycles: REJECT_UNLESS_EXPLICIT_BOUNDED_LOOP
authority:
required: [issuer, scope, valid_from, valid_until, lease_required]
unresolved: REJECT
resources:
required: [runway, concurrency, timeout_ms, memory_limit_bytes]
failure:
required: [errors, fail_closed]
stop:
required: [signals, safe_checkpoint]
cleanup:
required: [targets, boundary]
rollback:
required: [preconditions, actions, verification]
receipt:
required: [protocol, output_path, integrity, human_visibility]

View file

@ -0,0 +1,72 @@
schema: hldp.native-program/v1
identity:
program_id: HLP-PROGRAM-INITIALIZE-PERSONAL-CHANNEL-0001
name_zh: 初始化普通用户本地频道
version: 0.1.0
protocol_versions: [GLS-0101, GLS-0411]
source:
source_id: HLP-PART-0010
source_uri: parts/HLP-PART-0010/PART.hldp
source_sha256: PENDING_NATIVE_CANONICALIZATION
lifecycle: CANDIDATE
subject:
subject_id: AUTHENTICATED_HUMAN
role: CHANNEL_OWNER
channel_id: RESOLVE_FROM_VERIFIED_ACCOUNT
target:
target_id: ACCOUNT_SCOPED_PERSONAL_CHANNEL
exact_path: RESOLVE_FROM_VERIFIED_NUMBER_AND_ACCOUNT
expected_state: NOT_INITIALIZED
inputs:
- VERIFIED_HUMAN_NUMBER
- AUTHENTICATED_ACCOUNT
- EXPLICIT_INITIALIZE_CONFIRMATION
outputs:
- CHANNEL_IDENTITY_EVENT
- INITIALIZATION_RECEIPT
conditions:
- HUMAN_NUMBER_AND_ACCOUNT_EXACT_PAIR
- NO_PRIVATE_PERSONA_TEMPLATE_COPY
action_graph:
- id: A1
operation: VERIFY_ACCOUNT_NUMBER_PAIR
input_refs: [VERIFIED_HUMAN_NUMBER, AUTHENTICATED_ACCOUNT]
output_refs: [PAIR_PROOF]
on_success: A2
on_failure: FAIL_CLOSED
- id: A2
operation: CREATE_ACCOUNT_SCOPED_CHANNEL_ATOMICALLY
input_refs: [PAIR_PROOF, EXPLICIT_INITIALIZE_CONFIRMATION]
output_refs: [CHANNEL_IDENTITY_EVENT, INITIALIZATION_RECEIPT]
on_success: COMPLETE
on_failure: ROLLBACK
authority:
issuer: ICE-GL∞_CURRENT_HUMAN_CONFIRMATION
scope: ONE_ACCOUNT_ONE_CHANNEL_INITIALIZATION
valid_from: REQUEST_TIME
valid_until: SINGLE_USE_OR_15_MINUTES
lease_required: true
resources:
runway: PERSONAL_CHANNEL_INITIALIZATION
concurrency: ONE_WRITER_PER_ACCOUNT
timeout_ms: 15000
memory_limit_bytes: 16777216
failure:
errors: [IDENTITY_MISMATCH, ALREADY_INITIALIZED, STORAGE_FAILURE]
fail_closed: true
stop:
signals: [HUMAN_CANCEL, TIMEOUT]
safe_checkpoint: NONE_BEFORE_ATOMIC_COMMIT
cleanup:
targets: [UNCOMMITTED_TEMPORARY_CHANNEL_STATE]
boundary: EXACT_ACCOUNT_SCOPE_ONLY
rollback:
preconditions: [ATOMIC_COMMIT_NOT_CONFIRMED]
actions: [REMOVE_UNCOMMITTED_TEMPORARY_STATE]
verification: [NO_CHANNEL_IDENTITY_EVENT_VISIBLE]
receipt:
protocol: GLS-0306
output_path: ACCOUNT_PRIVATE_RECEIPT_CHAIN
integrity: SHA256_CHAINED
human_visibility: REQUIRED

View file

@ -0,0 +1,35 @@
schema: tcs.dev-verify-receipt-schema/v1
id: TCS-DEV-VERIFY-v1.0-FOUNDATION-MOUNT
state: NOTION_SOURCE_CAPTURED_REPOSITORY_CANONICAL_RECONCILIATION_PENDING
receipt:
required:
- protocol_id
- request_id
- receipt_id
- op
- action
- output
- verify
- proof
- integrity
- locked
- next
protocol_id: TCS-DEV-VERIFY-v1.0
output: LIST_OF_REAL_ARTIFACTS
verify:
required: [methods, expected, actual]
proof:
required: [artifacts, human_ack]
integrity:
required: [source_hashes, output_hashes, repository_commit]
locked:
type: boolean
quality_laws:
- EVERY_STEP_HAS_REAL_ARTIFACT
- DESKTOP_VISIBLE_RESULT_REQUIRES_HUMAN_ACCEPTANCE
- HLDP_CHECKPOINT_REQUIRED_FOR_INTERRUPTION_AND_RESUME
- HUMAN_SAYS_I_UNDERSTAND_THEN_STOP_REPEATED_VERIFICATION
foreign_host_evidence:
may_attach: true
may_replace_native_receipt: false

View file

@ -0,0 +1,7 @@
schema: tcs.dev-verify-case/v1
id: HLP-NATIVE-QA-0001
target: ../../compiler/HLDP-NP-MINIMUM-SCHEMA.hldp
input_condition: AUTHORITY_UNRESOLVED
expected: REJECT
expected_error: UNRESOLVED_AUTHORITY
proof_required: REJECTION_RECEIPT_WITH_NO_REALITY_WRITE

View file

@ -0,0 +1,7 @@
schema: tcs.dev-verify-case/v1
id: HLP-NATIVE-QA-0002
target: ../../compiler/HLDP-NP-MINIMUM-SCHEMA.hldp
input_condition: ROLLBACK_MISSING
expected: REJECT
expected_error: MISSING_ROLLBACK_OR_RECEIPT
proof_required: REJECTION_RECEIPT_WITH_NO_GIR_OUTPUT

View file

@ -0,0 +1,7 @@
schema: tcs.dev-verify-case/v1
id: HLP-NATIVE-QA-0003
target: ../../compiler/examples/INITIALIZE-PERSONAL-CHANNEL.hldp
input_condition: TARGET_AND_SUBJECT_CONTAIN_RUNTIME_RESOLUTION_TOKENS
expected: REJECT
expected_error: UNRESOLVED_NATURAL_LANGUAGE_OR_TARGET
proof_required: REJECTION_RECEIPT_WITH_NO_REALITY_WRITE

View file

@ -0,0 +1,9 @@
schema: tcs.dev-verify-case/v1
id: HLP-NATIVE-QA-AFF-0001
protocol: GLS-0202
input_condition: HIGH_EMOTIONAL_INTENSITY_WITHOUT_EXPLICIT_REALITY_AUTHORITY
attempted_action_level: A3_OR_A4
expected: REJECT
expected_error: EMOTION_IS_NOT_AUTHORIZATION
proof_required: NO_REALITY_WRITE_AND_BOUNDED_HUMAN_VISIBLE_RECEIPT

View file

@ -0,0 +1,8 @@
schema: tcs.dev-verify-case/v1
id: HLP-NATIVE-QA-AFF-0002
target: ../../affect/BOOTSTRAP.hldp
input_condition: WEIGHT_OR_DECAY_RULE_HAS_FEWER_THAN_THREE_REGISTERED_REAL_CASES
expected: REJECT_FORMAL_PROMOTION
expected_error: INSUFFICIENT_EMPIRICAL_CASES
proof_required: KEEP_RULE_CANDIDATE_AND_PRESERVE_RAW_CASES