koschei-lang 0.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- koschei_lang-0.10.0/LICENSE +100 -0
- koschei_lang-0.10.0/LICENSE.tr.md +101 -0
- koschei_lang-0.10.0/MANIFEST.in +1 -0
- koschei_lang-0.10.0/PKG-INFO +215 -0
- koschei_lang-0.10.0/README.md +192 -0
- koschei_lang-0.10.0/koschei/__init__.py +341 -0
- koschei_lang-0.10.0/koschei/__main__.py +8 -0
- koschei_lang-0.10.0/koschei/_formatter_v09.py +430 -0
- koschei_lang-0.10.0/koschei/_parser_v09.py +666 -0
- koschei_lang-0.10.0/koschei/_typed_expr.py +320 -0
- koschei_lang-0.10.0/koschei/_typed_ops.py +232 -0
- koschei_lang-0.10.0/koschei/affine_resources_v1.py +589 -0
- koschei_lang-0.10.0/koschei/ast_nodes.py +297 -0
- koschei_lang-0.10.0/koschei/bounded_persistence_v1.py +412 -0
- koschei_lang-0.10.0/koschei/bounded_queue.py +97 -0
- koschei_lang-0.10.0/koschei/bounded_queue_contract_gate.py +120 -0
- koschei_lang-0.10.0/koschei/bounded_queue_mir_v1.py +90 -0
- koschei_lang-0.10.0/koschei/bounded_queue_sync_v1.py +123 -0
- koschei_lang-0.10.0/koschei/bounded_queue_v1.py +467 -0
- koschei_lang-0.10.0/koschei/build_manifest.py +262 -0
- koschei_lang-0.10.0/koschei/build_manifest_cli.py +95 -0
- koschei_lang-0.10.0/koschei/bytes_v1.py +363 -0
- koschei_lang-0.10.0/koschei/canonical_authority_admission_v1.py +107 -0
- koschei_lang-0.10.0/koschei/canonical_command_authority_v1.py +90 -0
- koschei_lang-0.10.0/koschei/canonical_host_ingress_v1.py +110 -0
- koschei_lang-0.10.0/koschei/canonical_mir_budget_runtime_v1.py +244 -0
- koschei_lang-0.10.0/koschei/canonical_native_entrypoints_v1.py +68 -0
- koschei_lang-0.10.0/koschei/capabilities.py +535 -0
- koschei_lang-0.10.0/koschei/capability_effect_contract_v1.py +352 -0
- koschei_lang-0.10.0/koschei/capability_opacity_v1.py +116 -0
- koschei_lang-0.10.0/koschei/cli.py +500 -0
- koschei_lang-0.10.0/koschei/cli_entry.py +486 -0
- koschei_lang-0.10.0/koschei/clock_random_v1.py +465 -0
- koschei_lang-0.10.0/koschei/codegen_go.py +2545 -0
- koschei_lang-0.10.0/koschei/container_runtime_v1.py +297 -0
- koschei_lang-0.10.0/koschei/core_library/captain_marvel.ks +115 -0
- koschei_lang-0.10.0/koschei/core_library/hela.ks +79 -0
- koschei_lang-0.10.0/koschei/core_library/list.ks +126 -0
- koschei_lang-0.10.0/koschei/core_library/matrix_horizon.ks +115 -0
- koschei_lang-0.10.0/koschei/core_library/matrix_portal.ks +105 -0
- koschei_lang-0.10.0/koschei/core_library/morag.ks +108 -0
- koschei_lang-0.10.0/koschei/core_library/secure.ks +66 -0
- koschei_lang-0.10.0/koschei/core_library/strange.ks +83 -0
- koschei_lang-0.10.0/koschei/core_library/text.ks +174 -0
- koschei_lang-0.10.0/koschei/core_library/wanda.ks +87 -0
- koschei_lang-0.10.0/koschei/core_library/xandar.ks +117 -0
- koschei_lang-0.10.0/koschei/core_library_v1.py +145 -0
- koschei_lang-0.10.0/koschei/crypto_agility_v1.py +127 -0
- koschei_lang-0.10.0/koschei/data_json_v1.py +511 -0
- koschei_lang-0.10.0/koschei/data_language_v1.py +364 -0
- koschei_lang-0.10.0/koschei/data_mir_v1.py +63 -0
- koschei_lang-0.10.0/koschei/data_native_source_v1.py +92 -0
- koschei_lang-0.10.0/koschei/data_public_abi_v1.py +147 -0
- koschei_lang-0.10.0/koschei/deterministic_parallel_map_mir_shape_v1.py +73 -0
- koschei_lang-0.10.0/koschei/deterministic_parallel_map_v1.py +472 -0
- koschei_lang-0.10.0/koschei/diagnostics.py +1194 -0
- koschei_lang-0.10.0/koschei/differential_fuzz.py +233 -0
- koschei_lang-0.10.0/koschei/differential_fuzz_cli.py +79 -0
- koschei_lang-0.10.0/koschei/direct_mir_type_integrity_v1.py +173 -0
- koschei_lang-0.10.0/koschei/effect_contracts_v1.py +302 -0
- koschei_lang-0.10.0/koschei/ergonomics_collections_v0101.py +374 -0
- koschei_lang-0.10.0/koschei/ergonomics_daily_collections_v0103.py +276 -0
- koschei_lang-0.10.0/koschei/ergonomics_diagnostics.py +68 -0
- koschei_lang-0.10.0/koschei/ergonomics_integration.py +245 -0
- koschei_lang-0.10.0/koschei/ergonomics_list_any_v0110.py +205 -0
- koschei_lang-0.10.0/koschei/ergonomics_list_chunks_v0108.py +193 -0
- koschei_lang-0.10.0/koschei/ergonomics_list_flatten_v0107.py +172 -0
- koschei_lang-0.10.0/koschei/ergonomics_list_map_v0109.py +393 -0
- koschei_lang-0.10.0/koschei/ergonomics_list_partition_v0111.py +237 -0
- koschei_lang-0.10.0/koschei/ergonomics_list_scan_v0112.py +368 -0
- koschei_lang-0.10.0/koschei/ergonomics_map_add_v0113.py +283 -0
- koschei_lang-0.10.0/koschei/ergonomics_nested_generics_v0104.py +169 -0
- koschei_lang-0.10.0/koschei/ergonomics_nodes.py +28 -0
- koschei_lang-0.10.0/koschei/ergonomics_numeric_reductions_v0105.py +327 -0
- koschei_lang-0.10.0/koschei/ergonomics_runtime.py +200 -0
- koschei_lang-0.10.0/koschei/ergonomics_search_v0102.py +181 -0
- koschei_lang-0.10.0/koschei/ergonomics_semantics.py +471 -0
- koschei_lang-0.10.0/koschei/ergonomics_stable_unique_v0106.py +164 -0
- koschei_lang-0.10.0/koschei/ergonomics_syntax.py +104 -0
- koschei_lang-0.10.0/koschei/ergonomics_typed_callbacks_v0109.py +55 -0
- koschei_lang-0.10.0/koschei/ergonomics_v010.py +50 -0
- koschei_lang-0.10.0/koschei/fallible_mir_v1.py +154 -0
- koschei_lang-0.10.0/koschei/financial_decimal.py +129 -0
- koschei_lang-0.10.0/koschei/financial_decimal_diagnostics.py +122 -0
- koschei_lang-0.10.0/koschei/financial_decimal_mir_v1.py +69 -0
- koschei_lang-0.10.0/koschei/financial_decimal_operator_gate.py +85 -0
- koschei_lang-0.10.0/koschei/financial_decimal_runtime_isolation.py +53 -0
- koschei_lang-0.10.0/koschei/financial_decimal_v1.py +416 -0
- koschei_lang-0.10.0/koschei/foreign_cli.py +86 -0
- koschei_lang-0.10.0/koschei/foreign_contract.py +462 -0
- koschei_lang-0.10.0/koschei/formatter.py +102 -0
- koschei_lang-0.10.0/koschei/galaxy_identity_v1.py +202 -0
- koschei_lang-0.10.0/koschei/generic_nodes.py +31 -0
- koschei_lang-0.10.0/koschei/http_response_budget_v1.py +123 -0
- koschei_lang-0.10.0/koschei/integer_division_mir_v1.py +106 -0
- koschei_lang-0.10.0/koschei/integrity.py +193 -0
- koschei_lang-0.10.0/koschei/interpolation_mir_v1.py +83 -0
- koschei_lang-0.10.0/koschei/interpreter.py +2237 -0
- koschei_lang-0.10.0/koschei/legacy_generics.py +291 -0
- koschei_lang-0.10.0/koschei/legacy_types.py +136 -0
- koschei_lang-0.10.0/koschei/lexer.py +419 -0
- koschei_lang-0.10.0/koschei/library_activation_freshness_v0.py +112 -0
- koschei_lang-0.10.0/koschei/library_activation_lineage_v0.py +127 -0
- koschei_lang-0.10.0/koschei/library_adaptive_visibility_v0.py +124 -0
- koschei_lang-0.10.0/koschei/library_adversary_learning_resistance_v0.py +176 -0
- koschei_lang-0.10.0/koschei/library_behavior_baseline_v1.py +189 -0
- koschei_lang-0.10.0/koschei/library_blast_radius_v0.py +88 -0
- koschei_lang-0.10.0/koschei/library_boundary_v1.py +200 -0
- koschei_lang-0.10.0/koschei/library_compromise_recovery_v0.py +123 -0
- koschei_lang-0.10.0/koschei/library_containment_optimizer_v0.py +109 -0
- koschei_lang-0.10.0/koschei/library_continuity_visibility_gate_v0.py +97 -0
- koschei_lang-0.10.0/koschei/library_cross_session_continuity_v0.py +132 -0
- koschei_lang-0.10.0/koschei/library_effect_attestation_quorum_v0.py +123 -0
- koschei_lang-0.10.0/koschei/library_expansion_engine_v1.py +205 -0
- koschei_lang-0.10.0/koschei/library_graph_quorum_v0.py +91 -0
- koschei_lang-0.10.0/koschei/library_key_rotation_v0.py +78 -0
- koschei_lang-0.10.0/koschei/library_multi_scenario_containment_v0.py +78 -0
- koschei_lang-0.10.0/koschei/library_nucleus_v0.py +131 -0
- koschei_lang-0.10.0/koschei/library_policy_conflict_resolution_v0.py +146 -0
- koschei_lang-0.10.0/koschei/library_proof_envelope_v1.py +176 -0
- koschei_lang-0.10.0/koschei/library_quarantine_contract_v1.py +130 -0
- koschei_lang-0.10.0/koschei/library_recovery_exactly_once_v0.py +144 -0
- koschei_lang-0.10.0/koschei/library_recovery_fencing_v0.py +116 -0
- koschei_lang-0.10.0/koschei/library_recovery_journal_v0.py +125 -0
- koschei_lang-0.10.0/koschei/library_recovery_replica_quorum_v0.py +143 -0
- koschei_lang-0.10.0/koschei/library_recovery_transaction_v0.py +147 -0
- koschei_lang-0.10.0/koschei/library_risk_evidence_v1.py +108 -0
- koschei_lang-0.10.0/koschei/library_root_technology_binding_v0.py +88 -0
- koschei_lang-0.10.0/koschei/library_technology_core_v0.py +114 -0
- koschei_lang-0.10.0/koschei/library_trust_graph_v0.py +101 -0
- koschei_lang-0.10.0/koschei/lock_cli.py +108 -0
- koschei_lang-0.10.0/koschei/lsp.py +426 -0
- koschei_lang-0.10.0/koschei/lsp_v5.py +62 -0
- koschei_lang-0.10.0/koschei/matrix_horizon_fence_v1.py +301 -0
- koschei_lang-0.10.0/koschei/matrix_portal_replay_v1.py +140 -0
- koschei_lang-0.10.0/koschei/matrix_portal_transit_v1.py +105 -0
- koschei_lang-0.10.0/koschei/matrix_reality_v1.py +260 -0
- koschei_lang-0.10.0/koschei/mcp_server.py +409 -0
- koschei_lang-0.10.0/koschei/mir.py +651 -0
- koschei_lang-0.10.0/koschei/mir_canonical_lowering_v1.py +85 -0
- koschei_lang-0.10.0/koschei/mir_container_staging_v1.py +33 -0
- koschei_lang-0.10.0/koschei/mir_executor_v1.py +523 -0
- koschei_lang-0.10.0/koschei/mir_extension_instructions_v4.py +227 -0
- koschei_lang-0.10.0/koschei/mir_go_native.py +1388 -0
- koschei_lang-0.10.0/koschei/mir_go_runtime_v2.py +1956 -0
- koschei_lang-0.10.0/koschei/mir_instruction_registry_v4.py +140 -0
- koschei_lang-0.10.0/koschei/mir_ir.py +663 -0
- koschei_lang-0.10.0/koschei/mir_match_lowering_v1.py +134 -0
- koschei_lang-0.10.0/koschei/mir_match_plan_v1.py +100 -0
- koschei_lang-0.10.0/koschei/mir_native_module_shadow_guard_v1.py +54 -0
- koschei_lang-0.10.0/koschei/mir_native_runtime.py +890 -0
- koschei_lang-0.10.0/koschei/mir_native_variant_construct_v1.py +182 -0
- koschei_lang-0.10.0/koschei/mir_or_return_normalization_v1.py +830 -0
- koschei_lang-0.10.0/koschei/mir_scope_safety.py +55 -0
- koschei_lang-0.10.0/koschei/mir_variant_constructor_lowering_v1.py +104 -0
- koschei_lang-0.10.0/koschei/mir_variant_proof_v1.py +143 -0
- koschei_lang-0.10.0/koschei/mir_variant_runtime_v1.py +47 -0
- koschei_lang-0.10.0/koschei/module_lock.py +285 -0
- koschei_lang-0.10.0/koschei/modules.py +371 -0
- koschei_lang-0.10.0/koschei/native_broker_v1.py +1295 -0
- koschei_lang-0.10.0/koschei/native_cell_alignment_v1.py +29 -0
- koschei_lang-0.10.0/koschei/native_cell_projection_alignment_v1.py +29 -0
- koschei_lang-0.10.0/koschei/native_cell_projection_v1.py +336 -0
- koschei_lang-0.10.0/koschei/native_cell_realities_v1.py +542 -0
- koschei_lang-0.10.0/koschei/native_cell_reuse_composition_alignment_v1.py +31 -0
- koschei_lang-0.10.0/koschei/native_cell_reuse_composition_v1.py +531 -0
- koschei_lang-0.10.0/koschei/native_decision_alignment_v1.py +31 -0
- koschei_lang-0.10.0/koschei/native_decision_realities_v1.py +360 -0
- koschei_lang-0.10.0/koschei/native_decision_reservation_v1.py +29 -0
- koschei_lang-0.10.0/koschei/native_http_transport_v1.py +128 -0
- koschei_lang-0.10.0/koschei/native_ir_v1.py +118 -0
- koschei_lang-0.10.0/koschei/native_kernel_v1.py +469 -0
- koschei_lang-0.10.0/koschei/native_mixed_reuse_alignment_v1.py +31 -0
- koschei_lang-0.10.0/koschei/native_mixed_reuse_v1.py +533 -0
- koschei_lang-0.10.0/koschei/native_net_v1.py +660 -0
- koschei_lang-0.10.0/koschei/native_reality_v1.py +828 -0
- koschei_lang-0.10.0/koschei/native_relationship_alignment_v1.py +31 -0
- koschei_lang-0.10.0/koschei/native_relationship_v1.py +540 -0
- koschei_lang-0.10.0/koschei/native_reusable_alignment_v1.py +29 -0
- koschei_lang-0.10.0/koschei/native_reusable_realities_v1.py +527 -0
- koschei_lang-0.10.0/koschei/native_serve_v1.py +746 -0
- koschei_lang-0.10.0/koschei/native_sigil_mir_v1.py +141 -0
- koschei_lang-0.10.0/koschei/native_sigil_semantics_v1.py +129 -0
- koschei_lang-0.10.0/koschei/native_sigils_v1.py +34 -0
- koschei_lang-0.10.0/koschei/native_value_domain_alignment_v1.py +37 -0
- koschei_lang-0.10.0/koschei/native_value_domain_backend_alignment_v1.py +70 -0
- koschei_lang-0.10.0/koschei/native_value_domain_canonicality_v1.py +150 -0
- koschei_lang-0.10.0/koschei/native_value_domains_v1.py +449 -0
- koschei_lang-0.10.0/koschei/net_typing_v1.py +76 -0
- koschei_lang-0.10.0/koschei/net_v1.py +354 -0
- koschei_lang-0.10.0/koschei/object_space_adversarial_guard_v1.py +294 -0
- koschei_lang-0.10.0/koschei/object_space_check_adversarial_guard_v1.py +49 -0
- koschei_lang-0.10.0/koschei/object_space_check_v1.py +148 -0
- koschei_lang-0.10.0/koschei/object_space_codegen_alignment_v1.py +80 -0
- koschei_lang-0.10.0/koschei/object_space_commands_v1.py +359 -0
- koschei_lang-0.10.0/koschei/object_space_decision_realities_v1.py +138 -0
- koschei_lang-0.10.0/koschei/object_space_diagnostic_privacy_v1.py +53 -0
- koschei_lang-0.10.0/koschei/object_space_error_boundary_v1.py +51 -0
- koschei_lang-0.10.0/koschei/object_space_frontend_alignment_v1.py +24 -0
- koschei_lang-0.10.0/koschei/object_space_frontend_identity_v1.py +278 -0
- koschei_lang-0.10.0/koschei/object_space_graph_v1.py +326 -0
- koschei_lang-0.10.0/koschei/object_space_native_ir_dispatch_v1.py +135 -0
- koschei_lang-0.10.0/koschei/object_space_redteam_round2_v1.py +101 -0
- koschei_lang-0.10.0/koschei/object_space_redteam_round3_v1.py +179 -0
- koschei_lang-0.10.0/koschei/object_space_v1.py +685 -0
- koschei_lang-0.10.0/koschei/object_space_value_domains_v1.py +135 -0
- koschei_lang-0.10.0/koschei/originality_contract_v1.py +670 -0
- koschei_lang-0.10.0/koschei/parser.py +277 -0
- koschei_lang-0.10.0/koschei/persistence_authority_v1.py +306 -0
- koschei_lang-0.10.0/koschei/persistence_catalog_v1.py +73 -0
- koschei_lang-0.10.0/koschei/persistence_diagnostics_v1.py +97 -0
- koschei_lang-0.10.0/koschei/persistence_member_v1.py +39 -0
- koschei_lang-0.10.0/koschei/persistence_native_go_authority_alignment_v1.py +97 -0
- koschei_lang-0.10.0/koschei/persistence_native_go_exact_object_integrity_v1.py +98 -0
- koschei_lang-0.10.0/koschei/persistence_native_go_parent_integrity_v1.py +57 -0
- koschei_lang-0.10.0/koschei/persistence_native_go_safety_v1.py +77 -0
- koschei_lang-0.10.0/koschei/persistence_native_go_v1.py +578 -0
- koschei_lang-0.10.0/koschei/persistence_parent_integrity_v1.py +66 -0
- koschei_lang-0.10.0/koschei/persistence_policy_canonical_v1.py +37 -0
- koschei_lang-0.10.0/koschei/persistence_runtime_alignment_v1.py +40 -0
- koschei_lang-0.10.0/koschei/persistence_semantic_alignment_v1.py +18 -0
- koschei_lang-0.10.0/koschei/persistence_target_integrity_v1.py +127 -0
- koschei_lang-0.10.0/koschei/program_input_v1.py +413 -0
- koschei_lang-0.10.0/koschei/project.py +137 -0
- koschei_lang-0.10.0/koschei/py.typed +0 -0
- koschei_lang-0.10.0/koschei/runtime_alignment.py +705 -0
- koschei_lang-0.10.0/koschei/runtime_authority_surface_v1.py +61 -0
- koschei_lang-0.10.0/koschei/runtime_boot_v1.py +92 -0
- koschei_lang-0.10.0/koschei/runtime_bridge_seal_v1.py +82 -0
- koschei_lang-0.10.0/koschei/runtime_budget.py +330 -0
- koschei_lang-0.10.0/koschei/runtime_capability_registry_v1.py +173 -0
- koschei_lang-0.10.0/koschei/runtime_interpreter_bridge_v1.py +137 -0
- koschei_lang-0.10.0/koschei/runtime_network_policy_bridge_v1.py +28 -0
- koschei_lang-0.10.0/koschei/runtime_primitive_facade_v1.py +683 -0
- koschei_lang-0.10.0/koschei/secure_hash_v1.py +164 -0
- koschei_lang-0.10.0/koschei/semantic.py +1744 -0
- koschei_lang-0.10.0/koschei/semantic_contract_consumer_v1.py +59 -0
- koschei_lang-0.10.0/koschei/serve_authority_diagnostics_v1.py +100 -0
- koschei_lang-0.10.0/koschei/serve_authority_loopback_canonical_v1.py +127 -0
- koschei_lang-0.10.0/koschei/serve_authority_v1.py +417 -0
- koschei_lang-0.10.0/koschei/serve_knowhere_v1.py +450 -0
- koschei_lang-0.10.0/koschei/serve_loopback_exchange_catalog_v1.py +84 -0
- koschei_lang-0.10.0/koschei/serve_loopback_exchange_diagnostics_v1.py +89 -0
- koschei_lang-0.10.0/koschei/serve_loopback_exchange_go_integrity_v1.py +64 -0
- koschei_lang-0.10.0/koschei/serve_loopback_exchange_go_v1.py +643 -0
- koschei_lang-0.10.0/koschei/serve_loopback_exchange_member_v1.py +31 -0
- koschei_lang-0.10.0/koschei/serve_loopback_exchange_parity_v1.py +110 -0
- koschei_lang-0.10.0/koschei/serve_loopback_exchange_v1.py +295 -0
- koschei_lang-0.10.0/koschei/serve_loopback_http_strict_v1.py +117 -0
- koschei_lang-0.10.0/koschei/stdlib_catalog.py +795 -0
- koschei_lang-0.10.0/koschei/strange_build_representation_v1.py +44 -0
- koschei_lang-0.10.0/koschei/struct_field_mir_runtime_v1.py +42 -0
- koschei_lang-0.10.0/koschei/struct_field_runtime_v1.py +105 -0
- koschei_lang-0.10.0/koschei/structured_task_safety_go_alignment.py +43 -0
- koschei_lang-0.10.0/koschei/structured_task_safety_runtime_names.py +25 -0
- koschei_lang-0.10.0/koschei/structured_task_safety_v1.py +552 -0
- koschei_lang-0.10.0/koschei/structured_tasks.py +131 -0
- koschei_lang-0.10.0/koschei/structured_tasks_mir_v1.py +118 -0
- koschei_lang-0.10.0/koschei/structured_tasks_runtime_alignment.py +177 -0
- koschei_lang-0.10.0/koschei/structured_tasks_v1.py +614 -0
- koschei_lang-0.10.0/koschei/temporal_access_v1.py +207 -0
- koschei_lang-0.10.0/koschei/trust_plane_session_v1.py +135 -0
- koschei_lang-0.10.0/koschei/type_contracts.py +542 -0
- koschei_lang-0.10.0/koschei/type_system.py +237 -0
- koschei_lang-0.10.0/koschei/typed_hir.py +703 -0
- koschei_lang-0.10.0/koschei/typestate_affine_alignment.py +25 -0
- koschei_lang-0.10.0/koschei/typestate_resources_v1.py +551 -0
- koschei_lang-0.10.0/koschei/universe_activation_engine_v1.py +114 -0
- koschei_lang-0.10.0/koschei/universe_interactions_v1.py +185 -0
- koschei_lang-0.10.0/koschei/universe_kernel_v1.py +223 -0
- koschei_lang-0.10.0/koschei/untrusted.py +138 -0
- koschei_lang-0.10.0/koschei/value_budget_v1.py +187 -0
- koschei_lang-0.10.0/koschei/wanda_reality_integrity_v1.py +50 -0
- koschei_lang-0.10.0/koschei_lang.egg-info/PKG-INFO +215 -0
- koschei_lang-0.10.0/koschei_lang.egg-info/SOURCES.txt +279 -0
- koschei_lang-0.10.0/koschei_lang.egg-info/dependency_links.txt +1 -0
- koschei_lang-0.10.0/koschei_lang.egg-info/entry_points.txt +9 -0
- koschei_lang-0.10.0/koschei_lang.egg-info/top_level.txt +1 -0
- koschei_lang-0.10.0/native/datajson/json.go +630 -0
- koschei_lang-0.10.0/pyproject.toml +69 -0
- koschei_lang-0.10.0/setup.cfg +4 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Koschei Lang License 1.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Onur Sel. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This license covers Koschei Lang: its compiler, runtime, Core Library, tools,
|
|
6
|
+
documentation and examples, in source or any other form (the "Software"), as
|
|
7
|
+
made available by Onur Sel (the "Licensor"). A Turkish version of this license
|
|
8
|
+
is in LICENSE.tr.md.
|
|
9
|
+
|
|
10
|
+
1. PERSONAL USE IS FREE
|
|
11
|
+
|
|
12
|
+
You may download, install, use and modify the Software free of charge for
|
|
13
|
+
personal, non-commercial purposes: learning, teaching, hobby projects,
|
|
14
|
+
research that is not done for a business, and trying the Software out.
|
|
15
|
+
|
|
16
|
+
An organisation may also evaluate the Software free of charge for 30 days
|
|
17
|
+
before buying a commercial license.
|
|
18
|
+
|
|
19
|
+
2. COMMERCIAL USE NEEDS A COMMERCIAL LICENSE
|
|
20
|
+
|
|
21
|
+
Every other use is commercial use and needs a commercial license that covers
|
|
22
|
+
each developer who uses the Software. Commercial use includes using the
|
|
23
|
+
Software:
|
|
24
|
+
|
|
25
|
+
(a) by or for a company or other organisation, after the 30-day evaluation;
|
|
26
|
+
(b) to build, run or support a product or service that is sold or earns
|
|
27
|
+
revenue;
|
|
28
|
+
(c) in work done for a client or an employer.
|
|
29
|
+
|
|
30
|
+
Commercial licenses are sold through the Licensor's store on Polar
|
|
31
|
+
(polar.sh) in three tiers:
|
|
32
|
+
|
|
33
|
+
- Individual: one named developer;
|
|
34
|
+
- Team: up to 10 developers of one organisation;
|
|
35
|
+
- Enterprise: any number of developers of one organisation.
|
|
36
|
+
|
|
37
|
+
The current prices are listed in LICENSING.md and on the store.
|
|
38
|
+
|
|
39
|
+
3. A COMMERCIAL LICENSE IS PERPETUAL
|
|
40
|
+
|
|
41
|
+
A commercial license is paid for once and does not expire. It covers every
|
|
42
|
+
version of the Software released within 12 months after the purchase date,
|
|
43
|
+
and you may keep using those versions without time limit. Versions released
|
|
44
|
+
later need a new license.
|
|
45
|
+
|
|
46
|
+
4. YOUR PROGRAMS ARE YOURS
|
|
47
|
+
|
|
48
|
+
Programs you write in Koschei, and the files the Software produces from them
|
|
49
|
+
(including binaries built with `ks build`), belong to you. Where such a file
|
|
50
|
+
contains parts of the Software, such as the native runtime, you may
|
|
51
|
+
distribute those parts as part of your program without royalties: freely
|
|
52
|
+
under a commercial license, and for non-commercial purposes under personal
|
|
53
|
+
use.
|
|
54
|
+
|
|
55
|
+
5. WHAT YOU MAY NOT DO
|
|
56
|
+
|
|
57
|
+
Unless the Licensor agrees in writing, you may not:
|
|
58
|
+
|
|
59
|
+
(a) publish, sell, rent, sublicense or otherwise distribute copies of the
|
|
60
|
+
Software itself, modified or not, except as part of your programs as
|
|
61
|
+
section 4 allows;
|
|
62
|
+
(b) let more developers use a commercial license than it covers, or
|
|
63
|
+
transfer it to another person or organisation;
|
|
64
|
+
(c) remove or change copyright or license notices in the Software;
|
|
65
|
+
(d) use the Software or its source code to create a competing programming
|
|
66
|
+
language, compiler or development tool.
|
|
67
|
+
|
|
68
|
+
6. EARLIER MIT-LICENSED REVISIONS
|
|
69
|
+
|
|
70
|
+
Earlier Koschei source revisions that were released under the MIT License
|
|
71
|
+
remain governed by the MIT License as it applied to those revisions. This
|
|
72
|
+
license applies to later revisions and does not take back rights already
|
|
73
|
+
granted under the MIT License.
|
|
74
|
+
|
|
75
|
+
7. NO WARRANTY
|
|
76
|
+
|
|
77
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
78
|
+
IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
79
|
+
PARTICULAR PURPOSE AND NON-INFRINGEMENT, TO THE MAXIMUM EXTENT PERMITTED BY
|
|
80
|
+
APPLICABLE LAW.
|
|
81
|
+
|
|
82
|
+
8. LIMITATION OF LIABILITY
|
|
83
|
+
|
|
84
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSOR IS NOT LIABLE
|
|
85
|
+
FOR ANY INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, AND THE
|
|
86
|
+
LICENSOR'S TOTAL LIABILITY UNDER THIS LICENSE IS LIMITED TO THE AMOUNT YOU
|
|
87
|
+
PAID FOR YOUR LICENSE.
|
|
88
|
+
|
|
89
|
+
9. TERMINATION
|
|
90
|
+
|
|
91
|
+
Your rights under this license end automatically if you break its terms.
|
|
92
|
+
Programs you distributed in line with this license before that remain yours.
|
|
93
|
+
|
|
94
|
+
10. GOVERNING LAW
|
|
95
|
+
|
|
96
|
+
This license is governed by the laws of the Republic of Türkiye. The courts
|
|
97
|
+
at the Licensor's place of residence have jurisdiction. If the English and
|
|
98
|
+
Turkish versions differ, the Turkish version prevails.
|
|
99
|
+
|
|
100
|
+
Third-party components, if any, remain under their own license terms.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Koschei Lang Lisansı 1.0
|
|
2
|
+
|
|
3
|
+
Telif hakkı (c) 2026 Onur Sel. Tüm hakları saklıdır.
|
|
4
|
+
|
|
5
|
+
Bu lisans Koschei Lang'i kapsar: derleyicisi, çalışma zamanı, Core Library,
|
|
6
|
+
araçları, belgeleri ve örnekleri; kaynak kodu veya başka her biçimde, Onur Sel
|
|
7
|
+
(**Lisans Veren**) tarafından sunulduğu hâliyle (**Yazılım**). Lisansın
|
|
8
|
+
İngilizcesi `LICENSE` dosyasındadır.
|
|
9
|
+
|
|
10
|
+
## 1. Kişisel kullanım ücretsizdir
|
|
11
|
+
|
|
12
|
+
Yazılımı kişisel ve ticari olmayan amaçlarla ücretsiz olarak indirebilir,
|
|
13
|
+
kurabilir, kullanabilir ve değiştirebilirsiniz: öğrenme, öğretme, hobi
|
|
14
|
+
projeleri, bir işletme için yapılmayan araştırma ve Yazılımı denemek.
|
|
15
|
+
|
|
16
|
+
Bir kuruluş da ticari lisans almadan önce Yazılımı 30 gün boyunca ücretsiz
|
|
17
|
+
değerlendirebilir.
|
|
18
|
+
|
|
19
|
+
## 2. Ticari kullanım için ticari lisans gerekir
|
|
20
|
+
|
|
21
|
+
Bunun dışındaki her kullanım ticari kullanımdır ve Yazılımı kullanan her
|
|
22
|
+
geliştiriciyi kapsayan bir ticari lisans gerektirir. Ticari kullanım,
|
|
23
|
+
Yazılımın şu şekilde kullanılmasını da içerir:
|
|
24
|
+
|
|
25
|
+
1. bir şirket veya başka bir kuruluş tarafından ya da onun adına, 30 günlük
|
|
26
|
+
değerlendirme süresinden sonra;
|
|
27
|
+
2. satılan ya da gelir getiren bir ürün veya hizmeti geliştirmek, çalıştırmak
|
|
28
|
+
veya desteklemek için;
|
|
29
|
+
3. bir müşteri ya da işveren için yapılan işte.
|
|
30
|
+
|
|
31
|
+
Ticari lisanslar Lisans Verenin Polar (polar.sh) mağazasında üç düzeyde
|
|
32
|
+
satılır:
|
|
33
|
+
|
|
34
|
+
- **Bireysel:** adı belli bir geliştirici;
|
|
35
|
+
- **Ekip:** bir kuruluşun en fazla 10 geliştiricisi;
|
|
36
|
+
- **Kurumsal:** bir kuruluşun sınırsız sayıda geliştiricisi.
|
|
37
|
+
|
|
38
|
+
Güncel fiyatlar `LICENSING.tr.md` dosyasında ve mağazada yazılıdır.
|
|
39
|
+
|
|
40
|
+
## 3. Ticari lisans kalıcıdır
|
|
41
|
+
|
|
42
|
+
Ticari lisansın bedeli bir kez ödenir ve lisansın süresi dolmaz. Lisans,
|
|
43
|
+
satın alma tarihinden sonraki 12 ay içinde yayımlanan bütün Yazılım
|
|
44
|
+
sürümlerini kapsar; bu sürümleri süresiz kullanmaya devam edebilirsiniz. Daha
|
|
45
|
+
sonra yayımlanan sürümler için yeni lisans gerekir.
|
|
46
|
+
|
|
47
|
+
## 4. Programlarınız sizindir
|
|
48
|
+
|
|
49
|
+
Koschei ile yazdığınız programlar ve Yazılımın onlardan ürettiği dosyalar
|
|
50
|
+
(`ks build` ile derlenen ikililer dahil) size aittir. Bu dosyalar Yazılımın
|
|
51
|
+
bir parçasını (ör. native çalışma zamanını) içeriyorsa, o parçaları
|
|
52
|
+
programınızın bir parçası olarak telif ödemeden dağıtabilirsiniz: ticari
|
|
53
|
+
lisansla serbestçe, kişisel kullanımda ise ticari olmayan amaçlarla.
|
|
54
|
+
|
|
55
|
+
## 5. Yapamayacaklarınız
|
|
56
|
+
|
|
57
|
+
Lisans Veren yazılı olarak izin vermedikçe:
|
|
58
|
+
|
|
59
|
+
1. Yazılımın kendisinin kopyalarını, değiştirilmiş olsun ya da olmasın,
|
|
60
|
+
yayımlayamaz, satamaz, kiralayamaz, alt lisanslayamaz veya başka bir yolla
|
|
61
|
+
dağıtamazsınız; 4. maddede izin verildiği gibi programlarınızın bir
|
|
62
|
+
parçası olarak dağıtmak bunun dışındadır.
|
|
63
|
+
2. Bir ticari lisansı kapsadığından fazla geliştiriciye kullandıramaz veya
|
|
64
|
+
başka bir kişiye ya da kuruluşa devredemezsiniz.
|
|
65
|
+
3. Yazılımdaki telif ve lisans bildirimlerini kaldıramaz veya
|
|
66
|
+
değiştiremezsiniz.
|
|
67
|
+
4. Yazılımı ya da kaynak kodunu, rakip bir programlama dili, derleyici veya
|
|
68
|
+
geliştirme aracı yapmak için kullanamazsınız.
|
|
69
|
+
|
|
70
|
+
## 6. MIT lisansıyla yayımlanmış eski sürümler
|
|
71
|
+
|
|
72
|
+
Daha önce MIT Lisansıyla yayımlanmış Koschei kaynak sürümleri, o sürümler
|
|
73
|
+
için geçerli olan MIT Lisansına tabi olmaya devam eder. Bu lisans sonraki
|
|
74
|
+
sürümlere uygulanır ve MIT Lisansıyla daha önce verilmiş hakları geri almaz.
|
|
75
|
+
|
|
76
|
+
## 7. Garanti yoktur
|
|
77
|
+
|
|
78
|
+
YAZILIM, YÜRÜRLÜKTEKİ HUKUKUN İZİN VERDİĞİ EN GENİŞ ÖLÇÜDE, "OLDUĞU GİBİ"
|
|
79
|
+
SUNULUR; TİCARİ ELVERİŞLİLİK, BELİRLİ BİR AMACA UYGUNLUK VE HAK İHLALİ
|
|
80
|
+
OLMAMASI DAHİL, AÇIK YA DA ÖRTÜLÜ HİÇBİR GARANTİ VERİLMEZ.
|
|
81
|
+
|
|
82
|
+
## 8. Sorumluluğun sınırı
|
|
83
|
+
|
|
84
|
+
YÜRÜRLÜKTEKİ HUKUKUN İZİN VERDİĞİ EN GENİŞ ÖLÇÜDE, LİSANS VEREN DOLAYLI,
|
|
85
|
+
ARIZİ, ÖZEL VEYA SONUÇSAL ZARARLARDAN SORUMLU DEĞİLDİR VE LİSANS VERENİN BU
|
|
86
|
+
LİSANS KAPSAMINDAKİ TOPLAM SORUMLULUĞU LİSANS İÇİN ÖDEDİĞİNİZ BEDELLE
|
|
87
|
+
SINIRLIDIR.
|
|
88
|
+
|
|
89
|
+
## 9. Sona erme
|
|
90
|
+
|
|
91
|
+
Bu lisansın şartlarını ihlal ederseniz lisanstan doğan haklarınız kendiliğinden
|
|
92
|
+
sona erer. Ondan önce bu lisansa uygun olarak dağıttığınız programlar sizin
|
|
93
|
+
kalır.
|
|
94
|
+
|
|
95
|
+
## 10. Uygulanacak hukuk
|
|
96
|
+
|
|
97
|
+
Bu lisansa Türkiye Cumhuriyeti hukuku uygulanır. Lisans Verenin yerleşim
|
|
98
|
+
yerindeki mahkemeler yetkilidir. İngilizce ve Türkçe metinler arasında fark
|
|
99
|
+
olursa Türkçe metin esas alınır.
|
|
100
|
+
|
|
101
|
+
Varsa üçüncü taraf bileşenler kendi lisans şartlarına tabidir.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
prune tests
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: koschei-lang
|
|
3
|
+
Version: 0.10.0
|
|
4
|
+
Summary: Koschei: a capability-secure programming language. Code cannot touch the disk, network or environment unless it is handed a capability.
|
|
5
|
+
Author: Onur Sel
|
|
6
|
+
License-Expression: LicenseRef-Koschei-Lang-1.0
|
|
7
|
+
Project-URL: Homepage, https://koschei.dev
|
|
8
|
+
Project-URL: Playground, https://koschei.dev/play
|
|
9
|
+
Project-URL: Repository, https://github.com/bugsbuny243/koschei-lang
|
|
10
|
+
Project-URL: Issues, https://github.com/bugsbuny243/koschei-lang/issues
|
|
11
|
+
Keywords: programming-language,compiler,native-security-language,constitutional-security,capability-security,supply-chain-security,ai-security,mcp,ai-agents
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
17
|
+
Classifier: Topic :: Security
|
|
18
|
+
Requires-Python: >=3.12
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
License-File: LICENSE.tr.md
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
# Koschei (`.ks`)
|
|
25
|
+
|
|
26
|
+
<!-- mcp-name: io.github.bugsbuny243/koschei -->
|
|
27
|
+
|
|
28
|
+
## Product direction
|
|
29
|
+
|
|
30
|
+
Koschei Lang is an independent programming language and library ecosystem for cybersecurity-centered general-purpose software development. Its own semantics, compiler, standard library and runtime define the product; Web3 and AI integrations are applications of the language. Self-contained distribution and surpassing Rust in security remain development goals requiring executed evidence.
|
|
31
|
+
|
|
32
|
+
**Koschei Lang is sold and licensed separately from Koschei Sentinel and Koschei Web3 Hub.** Interoperability may use explicit SDKs, adapters and versioned contracts, but it does not create shared pricing, entitlement or runtime authority. See [the standalone product charter](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/PRODUCT_CHARTER_LANG_V1.md) and [product direction](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/PRODUCT_DIRECTION_2026-09-10.md).
|
|
33
|
+
|
|
34
|
+
> **Source-available, not open source.** Koschei Lang is free to download, use and modify for personal, non-commercial purposes. Commercial use needs a perpetual commercial license (see [`LICENSING.md`](https://github.com/bugsbuny243/koschei-lang/blob/main/LICENSING.md)). Redistribution of the toolchain is not permitted. See [`LICENSE`](https://github.com/bugsbuny243/koschei-lang/blob/main/LICENSE).
|
|
35
|
+
>
|
|
36
|
+
> **Try it without installing:** [koschei.dev/play](https://koschei.dev/play)
|
|
37
|
+
|
|
38
|
+
**A capability-secure programming language. An imported package cannot touch your disk, network, or environment unless you hand it a token.**
|
|
39
|
+
|
|
40
|
+
Most supply-chain attacks work because a dependency inherits every permission the process has. Install a package, and it can read `~/.ssh`, your `.env`, or open a socket — without asking. Koschei removes that ambient authority: side-effect access is a value that must be passed in, and the compiler rejects a program that reaches for authority it was never given.
|
|
41
|
+
|
|
42
|
+
Türkçe: [README.tr.md](https://github.com/bugsbuny243/koschei-lang/blob/main/README.tr.md)
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Quickstart
|
|
47
|
+
|
|
48
|
+
Needs Python 3.12 or newer. Go 1.24+ is optional and only needed for `ks build`.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git clone https://github.com/bugsbuny243/koschei-lang
|
|
52
|
+
cd koschei-lang
|
|
53
|
+
./install.sh # installs into ~/.koschei and links ~/.local/bin/ks
|
|
54
|
+
ks check examples/supply_chain/main.ks
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
A deliberately malicious package in `examples/supply_chain/analytics.ks` tries to read a secrets file and return it to the caller. The expected result is compile-time rejection:
|
|
58
|
+
|
|
59
|
+
<!-- verify: expect KS2401 -->
|
|
60
|
+
```ks
|
|
61
|
+
fn track(event: String) -> String or Error {
|
|
62
|
+
let secret = disk.read("/etc/app/secrets.env") or return Error("unreadable")
|
|
63
|
+
return secret
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Expected output:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
KOSCHEI ERROR: KS2401 [line 6, column 18]: Required capability is unavailable
|
|
71
|
+
in this scope — A disk, network, environment, or process operation was
|
|
72
|
+
attempted without the corresponding capability token.
|
|
73
|
+
Hint: run 'ks --lang en explain KS2401' for details.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Exit code `1`. The program never ran. The file was never opened. Nothing was sent anywhere.
|
|
77
|
+
|
|
78
|
+
This is not a runtime sandbox catching the call. `disk` does not exist inside `track` at all, so the attack fails at compile time.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Distribution and installation
|
|
83
|
+
|
|
84
|
+
Koschei is on PyPI:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
pip install koschei-lang
|
|
88
|
+
ks version
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
From a clone, `./install.sh` puts Koschei in its own virtual environment, and `pip install .` installs it into an environment you manage yourself.
|
|
92
|
+
|
|
93
|
+
Commercial license holders can also download a packaged release from the store on Polar.
|
|
94
|
+
|
|
95
|
+
Your first program:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
ks new hello-koschei
|
|
99
|
+
cd hello-koschei
|
|
100
|
+
ks run .
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`ks new` creates a zero-dependency project with a `koschei.toml` and `src/main.ks`. Commands accept a source file, a project directory, or a `koschei.toml` path.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Core ideas
|
|
108
|
+
|
|
109
|
+
- **No ambient authority.** Disk, network, environment, and process access require an explicit capability value. A function that was not passed one cannot perform the effect.
|
|
110
|
+
- **Capabilities narrow, never widen.** `caps.disk` is a root token that can only delegate; `caps.disk.allow(path)` produces a narrowed token that cannot re-widen (`KS2403`) and a root token cannot perform I/O directly (`KS2402`).
|
|
111
|
+
- **No `null`.** Values that may be absent are `Option<T>` (`Some` / `None`).
|
|
112
|
+
- **Errors are values.** `Result<T, E>` with a single `or` keyword in three forms: `or return`, `or default`, `or { block }`. An unhandled error value is a compile error (`KS1401`).
|
|
113
|
+
- **Values are bounded.** A String holds at most 16 MiB of UTF-8 and a List at most 1,048,576 items; an operation over the bound produces a `KS3502` Error value at the same point in `ks run` and `ks build` ([Value Budget v1](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/VALUE_BUDGET_V1.md)).
|
|
114
|
+
- **Program input is a capability too.** `caps.input.allow(65536)` gives `args()` and a byte-bounded `read_text()` of standard input; `ks run app.ks a b` and the compiled `./app a b` return the same texts and the same Error values ([Program Input v1](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/PROGRAM_INPUT_V1.md)).
|
|
115
|
+
- **Time and randomness are capabilities.** `caps.clock.allow(1000)` reads a clock no finer than its resolution; `caps.random.allow(64)` draws at most 64 bytes from the operating system's secure source ([Clock and Random v1](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/CLOCK_RANDOM_V1.md)).
|
|
116
|
+
- **Learn it from tested docs.** The [language guide](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/guide/LANGUAGE_GUIDE.en.md) runs every example in CI; [error codes](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/reference/ERROR_CODES.md) and the [Core Library reference](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/reference/CORE_LIBRARY.md) are generated from the toolchain; [`examples/apps`](https://github.com/bugsbuny243/koschei-lang/blob/main/examples/apps/README.md) holds three complete programs.
|
|
117
|
+
- **Immutable by default.** Rebinding requires `let mut`.
|
|
118
|
+
- **Every diagnostic is explainable.** 33 error codes with a bilingual catalog; `ks explain KS2401` prints the cause and a fix.
|
|
119
|
+
|
|
120
|
+
## Example
|
|
121
|
+
|
|
122
|
+
<!-- verify: compile — requires an external HTTPS origin at runtime -->
|
|
123
|
+
```ks
|
|
124
|
+
fn fetch_data(net: NetCaps, url: String) -> String or Error {
|
|
125
|
+
let response = net.get(url) or return Error("request failed")
|
|
126
|
+
return response.text()
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
fn main(caps: SystemCaps) {
|
|
130
|
+
let api_net = caps.net.allow("https://api.example.com")
|
|
131
|
+
let response = fetch_data(api_net, "https://api.example.com/v1")
|
|
132
|
+
println(response)
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`fetch_data` can reach exactly one origin. It cannot touch the disk, read an environment variable, or start a process — not because it was audited and found not to, but because it holds no token that would let it.
|
|
137
|
+
|
|
138
|
+
## The capability manifest
|
|
139
|
+
|
|
140
|
+
Because authority is explicit in the source, it can be summarized mechanically. `ks caps` reports everything a program is able to reach, across the whole module graph:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
ks caps examples/app.ks
|
|
144
|
+
ks caps --json src/main.ks
|
|
145
|
+
ks caps --deny net src/main.ks # exits 2 if the program can reach the network
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
For a pure program the manifest is empty, and that is a checkable fact rather than a claim in a code review:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
KOSCHEI CAPABILITY MANIFEST: examples/app.ks
|
|
152
|
+
|
|
153
|
+
This program carries no side-effect capability.
|
|
154
|
+
No disk, network, environment, or process access — pure computation.
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
The `--deny` gate is designed for CI: a build fails if a dependency update silently adds reach.
|
|
158
|
+
|
|
159
|
+
## Language features
|
|
160
|
+
|
|
161
|
+
Implemented today: functions with typed parameters, inferred generic functions, generic structs and enums, `let` / `let mut`, structs, `List<T>`, immutable `Map<String, V>` (`get`/`set`/`keys`/`contains`), `for`-in, `if`/`else`/`while` with `Bool`-only conditions, enums with exhaustive `match`, real `Option<T>` / `Result<T, E>`, full expression interpolation (`"{items.length()}"`), a daily standard library (`String` `trim`/`split`/`join`, `List` `sort`/`filter`/`contains`), and a module system where `import risk` binds `risk.ks` next to the importing file — no manifest, no build script, no config.
|
|
162
|
+
|
|
163
|
+
The Core Library is written in Koschei itself: `import text` and `import list` bind library modules shipped with the toolchain (`text.starts_with`, `text.replace`, `text.lines`, `list.first`, `list.reverse`, `list.slice`, …), checked and executed by the same pipeline as your own code. `import secure` adds domain-separated SHA3-256 digests from the audited host implementation, and the first library universe modules are Koschei too: the Marvel guardians `captain_marvel`, `hela`, `strange` and `wanda`. `ks run` executes the library and `ks build` compiles it from the same source; see [Core Library v1](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/CORE_LIBRARY_V1.md) for the function list.
|
|
164
|
+
|
|
165
|
+
## Toolchain
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
ks check src/main.ks # types, modules, capability rules
|
|
169
|
+
ks run src/main.ks # interpreter
|
|
170
|
+
ks build src/main.ks -o app # current native build path
|
|
171
|
+
ks fmt --write src/ # canonical formatting
|
|
172
|
+
ks caps src/main.ks # capability manifest
|
|
173
|
+
ks explain KS2401 # diagnostics, --lang tr for Turkish
|
|
174
|
+
ks check --json src/main.ks # stable code/message/line/column for editors
|
|
175
|
+
ks mir src/main.ks # sealed checked backend contract
|
|
176
|
+
ks lsp # zero-dependency language server
|
|
177
|
+
ks-mcp --allow-read ./data # MCP server: agents run Koschei under a policy (docs/MCP_SERVER.md)
|
|
178
|
+
ks tokens / ks ast
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Koschei's long-term canonical architecture is defined by Koschei semantics and verified execution contracts, not by the implementation language of temporary bootstrap/tooling layers. External adapters are non-authoritative interoperability mechanisms.
|
|
182
|
+
|
|
183
|
+
## Editor support
|
|
184
|
+
|
|
185
|
+
`editors/vscode` contains the official zero-dependency LSP extension: `.ks` syntax highlighting, live diagnostics, formatting, hover, go-to-definition, document symbols, and completion. The server is available through `ks lsp` (with `ks-lsp` kept as a compatibility alias).
|
|
186
|
+
|
|
187
|
+
## Tests
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
python -m unittest discover -s tests -v
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
The CI suite includes compiler/runtime tests, native/interpreter parity checks, repository documentation examples, committed golden outputs, capability-security regression tests, and deception-plane attack simulations.
|
|
194
|
+
|
|
195
|
+
## Status
|
|
196
|
+
|
|
197
|
+
Koschei is pre-1.0 and under active development. Syntax, runtime contracts, licensing, distribution, and security architecture may change before the first production release. Do not put it in production yet.
|
|
198
|
+
|
|
199
|
+
Security boundaries currently enforced in the native path include capability denial, narrowed authority, path traversal/symlink escape protection, read-only enforcement, redirect-origin enforcement, call-depth bounds, opaque protected-source object identity, epoch-scoped alias rotation, decoy source views, and epoch-bound read grants. Security claims must continue to be backed by tests and evidence; the project does not claim that any software system is mathematically impossible to compromise.
|
|
200
|
+
|
|
201
|
+
The protected-source/deception architecture is being hardened through staged attack waves. Canonical source identity remains separate from physical source locators, and decoy views are non-deployable by construction.
|
|
202
|
+
|
|
203
|
+
## Licensing and distribution
|
|
204
|
+
|
|
205
|
+
Koschei Lang is free for personal, non-commercial use. Commercial use needs a commercial license, paid once and valid without time limit, covering every version released within 12 months of purchase: Individual 49 USD, Team (up to 10 developers) 249 USD, Enterprise 999 USD. Programs written in Koschei, and the binaries `ks build` produces, belong to their authors. See [`LICENSING.md`](https://github.com/bugsbuny243/koschei-lang/blob/main/LICENSING.md).
|
|
206
|
+
|
|
207
|
+
Users download Koschei from its store on Polar (polar.sh). `python tools/polar_bundle_v1.py` builds that download, `dist/polar/koschei-lang-<version>.zip`: the `koschei` package, the installer, the license, the customer README (`distribution/polar/`), the language guide, the references and the examples it runs.
|
|
208
|
+
|
|
209
|
+
## Contributions
|
|
210
|
+
|
|
211
|
+
Bug reports are welcome through GitHub issues. Report vulnerabilities privately, as [`SECURITY.md`](https://github.com/bugsbuny243/koschei-lang/blob/main/SECURITY.md) describes. Code contributions are not accepted yet: contributor terms must be in place first so that ownership and commercial licensing stay unambiguous.
|
|
212
|
+
|
|
213
|
+
## License
|
|
214
|
+
|
|
215
|
+
**Koschei Lang License 1.0** — free for personal use; commercial use needs a perpetual commercial license. See [`LICENSE`](https://github.com/bugsbuny243/koschei-lang/blob/main/LICENSE) (Turkish: [`LICENSE.tr.md`](https://github.com/bugsbuny243/koschei-lang/blob/main/LICENSE.tr.md)). Revisions previously released under the MIT License stay under the MIT License.
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Koschei (`.ks`)
|
|
2
|
+
|
|
3
|
+
<!-- mcp-name: io.github.bugsbuny243/koschei -->
|
|
4
|
+
|
|
5
|
+
## Product direction
|
|
6
|
+
|
|
7
|
+
Koschei Lang is an independent programming language and library ecosystem for cybersecurity-centered general-purpose software development. Its own semantics, compiler, standard library and runtime define the product; Web3 and AI integrations are applications of the language. Self-contained distribution and surpassing Rust in security remain development goals requiring executed evidence.
|
|
8
|
+
|
|
9
|
+
**Koschei Lang is sold and licensed separately from Koschei Sentinel and Koschei Web3 Hub.** Interoperability may use explicit SDKs, adapters and versioned contracts, but it does not create shared pricing, entitlement or runtime authority. See [the standalone product charter](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/PRODUCT_CHARTER_LANG_V1.md) and [product direction](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/PRODUCT_DIRECTION_2026-09-10.md).
|
|
10
|
+
|
|
11
|
+
> **Source-available, not open source.** Koschei Lang is free to download, use and modify for personal, non-commercial purposes. Commercial use needs a perpetual commercial license (see [`LICENSING.md`](https://github.com/bugsbuny243/koschei-lang/blob/main/LICENSING.md)). Redistribution of the toolchain is not permitted. See [`LICENSE`](https://github.com/bugsbuny243/koschei-lang/blob/main/LICENSE).
|
|
12
|
+
>
|
|
13
|
+
> **Try it without installing:** [koschei.dev/play](https://koschei.dev/play)
|
|
14
|
+
|
|
15
|
+
**A capability-secure programming language. An imported package cannot touch your disk, network, or environment unless you hand it a token.**
|
|
16
|
+
|
|
17
|
+
Most supply-chain attacks work because a dependency inherits every permission the process has. Install a package, and it can read `~/.ssh`, your `.env`, or open a socket — without asking. Koschei removes that ambient authority: side-effect access is a value that must be passed in, and the compiler rejects a program that reaches for authority it was never given.
|
|
18
|
+
|
|
19
|
+
Türkçe: [README.tr.md](https://github.com/bugsbuny243/koschei-lang/blob/main/README.tr.md)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Quickstart
|
|
24
|
+
|
|
25
|
+
Needs Python 3.12 or newer. Go 1.24+ is optional and only needed for `ks build`.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git clone https://github.com/bugsbuny243/koschei-lang
|
|
29
|
+
cd koschei-lang
|
|
30
|
+
./install.sh # installs into ~/.koschei and links ~/.local/bin/ks
|
|
31
|
+
ks check examples/supply_chain/main.ks
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
A deliberately malicious package in `examples/supply_chain/analytics.ks` tries to read a secrets file and return it to the caller. The expected result is compile-time rejection:
|
|
35
|
+
|
|
36
|
+
<!-- verify: expect KS2401 -->
|
|
37
|
+
```ks
|
|
38
|
+
fn track(event: String) -> String or Error {
|
|
39
|
+
let secret = disk.read("/etc/app/secrets.env") or return Error("unreadable")
|
|
40
|
+
return secret
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Expected output:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
KOSCHEI ERROR: KS2401 [line 6, column 18]: Required capability is unavailable
|
|
48
|
+
in this scope — A disk, network, environment, or process operation was
|
|
49
|
+
attempted without the corresponding capability token.
|
|
50
|
+
Hint: run 'ks --lang en explain KS2401' for details.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Exit code `1`. The program never ran. The file was never opened. Nothing was sent anywhere.
|
|
54
|
+
|
|
55
|
+
This is not a runtime sandbox catching the call. `disk` does not exist inside `track` at all, so the attack fails at compile time.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Distribution and installation
|
|
60
|
+
|
|
61
|
+
Koschei is on PyPI:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install koschei-lang
|
|
65
|
+
ks version
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
From a clone, `./install.sh` puts Koschei in its own virtual environment, and `pip install .` installs it into an environment you manage yourself.
|
|
69
|
+
|
|
70
|
+
Commercial license holders can also download a packaged release from the store on Polar.
|
|
71
|
+
|
|
72
|
+
Your first program:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
ks new hello-koschei
|
|
76
|
+
cd hello-koschei
|
|
77
|
+
ks run .
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`ks new` creates a zero-dependency project with a `koschei.toml` and `src/main.ks`. Commands accept a source file, a project directory, or a `koschei.toml` path.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Core ideas
|
|
85
|
+
|
|
86
|
+
- **No ambient authority.** Disk, network, environment, and process access require an explicit capability value. A function that was not passed one cannot perform the effect.
|
|
87
|
+
- **Capabilities narrow, never widen.** `caps.disk` is a root token that can only delegate; `caps.disk.allow(path)` produces a narrowed token that cannot re-widen (`KS2403`) and a root token cannot perform I/O directly (`KS2402`).
|
|
88
|
+
- **No `null`.** Values that may be absent are `Option<T>` (`Some` / `None`).
|
|
89
|
+
- **Errors are values.** `Result<T, E>` with a single `or` keyword in three forms: `or return`, `or default`, `or { block }`. An unhandled error value is a compile error (`KS1401`).
|
|
90
|
+
- **Values are bounded.** A String holds at most 16 MiB of UTF-8 and a List at most 1,048,576 items; an operation over the bound produces a `KS3502` Error value at the same point in `ks run` and `ks build` ([Value Budget v1](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/VALUE_BUDGET_V1.md)).
|
|
91
|
+
- **Program input is a capability too.** `caps.input.allow(65536)` gives `args()` and a byte-bounded `read_text()` of standard input; `ks run app.ks a b` and the compiled `./app a b` return the same texts and the same Error values ([Program Input v1](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/PROGRAM_INPUT_V1.md)).
|
|
92
|
+
- **Time and randomness are capabilities.** `caps.clock.allow(1000)` reads a clock no finer than its resolution; `caps.random.allow(64)` draws at most 64 bytes from the operating system's secure source ([Clock and Random v1](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/CLOCK_RANDOM_V1.md)).
|
|
93
|
+
- **Learn it from tested docs.** The [language guide](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/guide/LANGUAGE_GUIDE.en.md) runs every example in CI; [error codes](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/reference/ERROR_CODES.md) and the [Core Library reference](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/reference/CORE_LIBRARY.md) are generated from the toolchain; [`examples/apps`](https://github.com/bugsbuny243/koschei-lang/blob/main/examples/apps/README.md) holds three complete programs.
|
|
94
|
+
- **Immutable by default.** Rebinding requires `let mut`.
|
|
95
|
+
- **Every diagnostic is explainable.** 33 error codes with a bilingual catalog; `ks explain KS2401` prints the cause and a fix.
|
|
96
|
+
|
|
97
|
+
## Example
|
|
98
|
+
|
|
99
|
+
<!-- verify: compile — requires an external HTTPS origin at runtime -->
|
|
100
|
+
```ks
|
|
101
|
+
fn fetch_data(net: NetCaps, url: String) -> String or Error {
|
|
102
|
+
let response = net.get(url) or return Error("request failed")
|
|
103
|
+
return response.text()
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
fn main(caps: SystemCaps) {
|
|
107
|
+
let api_net = caps.net.allow("https://api.example.com")
|
|
108
|
+
let response = fetch_data(api_net, "https://api.example.com/v1")
|
|
109
|
+
println(response)
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
`fetch_data` can reach exactly one origin. It cannot touch the disk, read an environment variable, or start a process — not because it was audited and found not to, but because it holds no token that would let it.
|
|
114
|
+
|
|
115
|
+
## The capability manifest
|
|
116
|
+
|
|
117
|
+
Because authority is explicit in the source, it can be summarized mechanically. `ks caps` reports everything a program is able to reach, across the whole module graph:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
ks caps examples/app.ks
|
|
121
|
+
ks caps --json src/main.ks
|
|
122
|
+
ks caps --deny net src/main.ks # exits 2 if the program can reach the network
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
For a pure program the manifest is empty, and that is a checkable fact rather than a claim in a code review:
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
KOSCHEI CAPABILITY MANIFEST: examples/app.ks
|
|
129
|
+
|
|
130
|
+
This program carries no side-effect capability.
|
|
131
|
+
No disk, network, environment, or process access — pure computation.
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The `--deny` gate is designed for CI: a build fails if a dependency update silently adds reach.
|
|
135
|
+
|
|
136
|
+
## Language features
|
|
137
|
+
|
|
138
|
+
Implemented today: functions with typed parameters, inferred generic functions, generic structs and enums, `let` / `let mut`, structs, `List<T>`, immutable `Map<String, V>` (`get`/`set`/`keys`/`contains`), `for`-in, `if`/`else`/`while` with `Bool`-only conditions, enums with exhaustive `match`, real `Option<T>` / `Result<T, E>`, full expression interpolation (`"{items.length()}"`), a daily standard library (`String` `trim`/`split`/`join`, `List` `sort`/`filter`/`contains`), and a module system where `import risk` binds `risk.ks` next to the importing file — no manifest, no build script, no config.
|
|
139
|
+
|
|
140
|
+
The Core Library is written in Koschei itself: `import text` and `import list` bind library modules shipped with the toolchain (`text.starts_with`, `text.replace`, `text.lines`, `list.first`, `list.reverse`, `list.slice`, …), checked and executed by the same pipeline as your own code. `import secure` adds domain-separated SHA3-256 digests from the audited host implementation, and the first library universe modules are Koschei too: the Marvel guardians `captain_marvel`, `hela`, `strange` and `wanda`. `ks run` executes the library and `ks build` compiles it from the same source; see [Core Library v1](https://github.com/bugsbuny243/koschei-lang/blob/main/docs/CORE_LIBRARY_V1.md) for the function list.
|
|
141
|
+
|
|
142
|
+
## Toolchain
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
ks check src/main.ks # types, modules, capability rules
|
|
146
|
+
ks run src/main.ks # interpreter
|
|
147
|
+
ks build src/main.ks -o app # current native build path
|
|
148
|
+
ks fmt --write src/ # canonical formatting
|
|
149
|
+
ks caps src/main.ks # capability manifest
|
|
150
|
+
ks explain KS2401 # diagnostics, --lang tr for Turkish
|
|
151
|
+
ks check --json src/main.ks # stable code/message/line/column for editors
|
|
152
|
+
ks mir src/main.ks # sealed checked backend contract
|
|
153
|
+
ks lsp # zero-dependency language server
|
|
154
|
+
ks-mcp --allow-read ./data # MCP server: agents run Koschei under a policy (docs/MCP_SERVER.md)
|
|
155
|
+
ks tokens / ks ast
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Koschei's long-term canonical architecture is defined by Koschei semantics and verified execution contracts, not by the implementation language of temporary bootstrap/tooling layers. External adapters are non-authoritative interoperability mechanisms.
|
|
159
|
+
|
|
160
|
+
## Editor support
|
|
161
|
+
|
|
162
|
+
`editors/vscode` contains the official zero-dependency LSP extension: `.ks` syntax highlighting, live diagnostics, formatting, hover, go-to-definition, document symbols, and completion. The server is available through `ks lsp` (with `ks-lsp` kept as a compatibility alias).
|
|
163
|
+
|
|
164
|
+
## Tests
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
python -m unittest discover -s tests -v
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The CI suite includes compiler/runtime tests, native/interpreter parity checks, repository documentation examples, committed golden outputs, capability-security regression tests, and deception-plane attack simulations.
|
|
171
|
+
|
|
172
|
+
## Status
|
|
173
|
+
|
|
174
|
+
Koschei is pre-1.0 and under active development. Syntax, runtime contracts, licensing, distribution, and security architecture may change before the first production release. Do not put it in production yet.
|
|
175
|
+
|
|
176
|
+
Security boundaries currently enforced in the native path include capability denial, narrowed authority, path traversal/symlink escape protection, read-only enforcement, redirect-origin enforcement, call-depth bounds, opaque protected-source object identity, epoch-scoped alias rotation, decoy source views, and epoch-bound read grants. Security claims must continue to be backed by tests and evidence; the project does not claim that any software system is mathematically impossible to compromise.
|
|
177
|
+
|
|
178
|
+
The protected-source/deception architecture is being hardened through staged attack waves. Canonical source identity remains separate from physical source locators, and decoy views are non-deployable by construction.
|
|
179
|
+
|
|
180
|
+
## Licensing and distribution
|
|
181
|
+
|
|
182
|
+
Koschei Lang is free for personal, non-commercial use. Commercial use needs a commercial license, paid once and valid without time limit, covering every version released within 12 months of purchase: Individual 49 USD, Team (up to 10 developers) 249 USD, Enterprise 999 USD. Programs written in Koschei, and the binaries `ks build` produces, belong to their authors. See [`LICENSING.md`](https://github.com/bugsbuny243/koschei-lang/blob/main/LICENSING.md).
|
|
183
|
+
|
|
184
|
+
Users download Koschei from its store on Polar (polar.sh). `python tools/polar_bundle_v1.py` builds that download, `dist/polar/koschei-lang-<version>.zip`: the `koschei` package, the installer, the license, the customer README (`distribution/polar/`), the language guide, the references and the examples it runs.
|
|
185
|
+
|
|
186
|
+
## Contributions
|
|
187
|
+
|
|
188
|
+
Bug reports are welcome through GitHub issues. Report vulnerabilities privately, as [`SECURITY.md`](https://github.com/bugsbuny243/koschei-lang/blob/main/SECURITY.md) describes. Code contributions are not accepted yet: contributor terms must be in place first so that ownership and commercial licensing stay unambiguous.
|
|
189
|
+
|
|
190
|
+
## License
|
|
191
|
+
|
|
192
|
+
**Koschei Lang License 1.0** — free for personal use; commercial use needs a perpetual commercial license. See [`LICENSE`](https://github.com/bugsbuny243/koschei-lang/blob/main/LICENSE) (Turkish: [`LICENSE.tr.md`](https://github.com/bugsbuny243/koschei-lang/blob/main/LICENSE.tr.md)). Revisions previously released under the MIT License stay under the MIT License.
|