xrefkit 0.7.15__tar.gz → 0.7.16__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.
- {xrefkit-0.7.15/xrefkit.egg-info → xrefkit-0.7.16}/PKG-INFO +1 -1
- {xrefkit-0.7.15 → xrefkit-0.7.16}/pyproject.toml +1 -1
- xrefkit-0.7.16/tests/test_public_skill.py +93 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/__init__.py +1 -1
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/operations_cli.py +1 -0
- xrefkit-0.7.16/xrefkit/public_skill.py +183 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/skill_definition_governance.py +7 -1
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/skillrun.py +21 -7
- {xrefkit-0.7.15 → xrefkit-0.7.16/xrefkit.egg-info}/PKG-INFO +1 -1
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit.egg-info/SOURCES.txt +2 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/LICENSE +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/README.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/setup.cfg +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_artifact_selected_family.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_attention_pet.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_attention_pet_client_protocol.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_attention_pet_codex_session.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_attention_pet_fit.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_azure_connection.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_azure_import.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_azure_recovery.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_azure_update_candidate.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_azure_writer.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_boundary_analysis.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_brownfield_csharp_structure_definitions.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_brownfield_file_editing_protocol.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_business_intake_conversation_definitions.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_business_intake_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_calibration_lint.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_catalog_preparation_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_check_skill_knowledge_xids.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_ci_workflow_invariants.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_cli.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_code_constraint_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_collect_analyzer_sarif.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_compact_skill_logs.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_constraint_derivation_family_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_constraint_derivation_selected_family.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_contribution_adoption_bytes.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_contribution_returns.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_convert_to_xrefkit_skill.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_cs_scope_probe.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_csharp_commonality.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_csharp_naming_profile.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_ctx.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_cutover_readiness.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_dashboard.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_database_batch_definition_migration.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_decision_checklist.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_decision_handoff.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_decision_trace.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_design_business_intake_selected_family.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_design_planning_definition_migration.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_dotnet_definition_candidate.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_editorial_family_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_editorial_intake_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_editorial_selected_family.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_embedded_startup_pack.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_engineering_decision.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_environment_isolation.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_error_policy_audit.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_error_policy_locator.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_execution_binding.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_existing_skill_definition_batch.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_final_skilldefinition_batch.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_flow_selected_family.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_fm_multiroot.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_gate.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_gateway.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_gateway_mcp.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_gateway_skill_adapter.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_gateway_work_items.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_goal_desired_state.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_governance_entry.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_governance_host.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_host_precheck.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_human_evaluation.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_implementation_flow_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_implementation_review_selected_family.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_inbound_uploads.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_instruction_workflow.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_knowledge_relations_validator.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_language_review_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_legacy_guidance.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_legacy_migration.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_legacy_resources.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_mcp_package_routing.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_mcp_setup.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_mcp_skills_extension.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_mcp_skills_transport.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_mcp_subagent_startup.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_mcp_subagent_startup_integration.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_ontology_assessment_validator.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_os_family_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_os_knowledge_family_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_os_selected_family.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_ownership.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_package_knowledge_resolution.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_package_skill_run.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_packaged_native_governance.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_packmeta.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_plan_markdown.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_plan_observation.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_principle_discovery.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_project_management_materialization.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_project_management_offline_progress.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_project_quality_baseline.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_qa_report_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_quality_issue_dashboard.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_quality_issues.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_reporting_profiles.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_reporting_quality.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_repository_skill_adoption.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_repository_startup_pack.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_resource_provider.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_runtime_contracts.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_sarif_to_locator.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_security_definition_migration.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_site_release_metadata.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_skill_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_skill_definition_governance.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_skill_definition_mcp.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_skill_definition_runtime.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_skill_edits.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_skill_knowledge_audit.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_skill_maturity_return.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_skill_release_compatibility.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_skill_runtime_audit.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_skillmeta.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_skills_sync.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_source_analysis_fragments.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_structure_catalog.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_subagent_startup.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_subagent_startup_boundaries.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_unknown_resolution.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_verify_runtime_wheel.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_wbs.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_work_management.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_work_packages.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_workflow_family_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_xref.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_xrefkit_instance.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_xrefkit_tools.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_xrefkit_v2_discovery.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_xrefkit_v2_models.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/tests/test_xrefkit_v2_pipeline.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/__main__.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/__init__.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/__main__.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/client.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/client_protocol.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/codex_session.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/evaluator.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/model.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/presentation.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/profiles.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/scenarios.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/server.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/attention_pet/store.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/azure_connection.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/azure_import.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/azure_recovery.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/azure_update_candidate.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/azure_writer.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/boundary_analysis.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/catalog_cli.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/cli.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/contracts.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/ctx.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/dashboard.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/decision_checklist.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/decision_handoff.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/decision_trace.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/discovery.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/engineering_decision.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/execution_binding.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/execution_binding_cli.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/gate.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/gateway.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/goalstate.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/governance_entry.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/governance_entry_cli.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/governance_host.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/hashing.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/host_execution.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/host_precheck.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/import_skill.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/instance.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/loaders.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/__init__.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/audit.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/bootstrap.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/catalog.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/cli.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/client_cache.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/client_flow.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/context_registry.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/context_token.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/contracts.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/contribution_adoption.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/contribution_returns.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/dist.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/gateway.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/governed_overlays.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/inbound_uploads.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/knowledge_edits.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/legacy_guidance.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/legacy_migration.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/legacy_resources.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/ownership.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/repository.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/schemas.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/server.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/setup.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/skill_edits.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/skill_maturity.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/skills_extension.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/skills_transport.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/startup_contract_pack.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/subagent_startup.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp/update_gate_intake.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/mcp_tools.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/models/__init__.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/models/common.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/models/effective_bundle.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/models/human_evaluation.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/models/local_manifest.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/models/package_manifest.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/models/run_log.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/models/server_config.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/models/skill_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/ownership.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/packmeta.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/plan_markdown.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/plan_observation.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/principle_discovery.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/quality_issues.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/registry.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/reporting.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/reporting_profiles.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/repository_skills.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resolver.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resource_provider.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/attention_pet/client-state.schema.json +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/attention_pet/pet.css +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/attention_pet/pet.html +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/attention_pet/pet.js +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/contracts.json +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/current.json +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/generations/7a682a5272907354/contracts.json +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/generations/7a682a5272907354/model_body.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/generations/9929294385ccb7b0/contracts.json +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/generations/9929294385ccb7b0/model_body.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/model_body.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/startup_sources/000_agent_entry.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/startup_sources/011_startup_xref_routing.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/startup_sources/015_shared_memory_operations.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/startup_sources/016_uncertainty_protocol.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/startup_sources/017_base_and_xref_layering.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/startup_sources/053_context_direction_security_guard.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/base/startup_sources/yomiyasu_LICENSE.txt +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/engineering-decision-checklist.json +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/migration/docs/guides/062_legacy_flow_skill_migration_guide.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/migration/knowledge/operations/130_legacy_flow_skill_migration_rules.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/migration/knowledge/organization/160_context_direction_guard_rules.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/migration/skills/os/legacy_flow_skill_migration/SKILL.v1.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/migration/skills/os/legacy_flow_skill_migration/references/legacy_flow_skill_migration_template.md +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/migration/skills/repository_adoption.json +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/resources/migration/tools/migrate_legacy_flow_skill.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/runlog.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/skill_definition.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/skill_definition_catalog.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/skill_knowledge_audit.html +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/skill_knowledge_audit.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/skillmeta.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/skills_sync.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/structure_catalog.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/subagent_startup.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/tools/__init__.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/tools/__main__.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/unknown_resolution.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/v2_cli.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/wbs.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/work_management.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/work_management_view.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/workspace.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit/xref.py +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit.egg-info/dependency_links.txt +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit.egg-info/entry_points.txt +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit.egg-info/requires.txt +0 -0
- {xrefkit-0.7.15 → xrefkit-0.7.16}/xrefkit.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"""Public binding checks exercise registry bytes, installed bytes, and the run receipt separately."""
|
|
2
|
+
from hashlib import sha256
|
|
3
|
+
from io import BytesIO
|
|
4
|
+
import json
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from types import SimpleNamespace
|
|
7
|
+
from zipfile import ZipFile
|
|
8
|
+
|
|
9
|
+
import pytest
|
|
10
|
+
|
|
11
|
+
from test_skill_definition import metadata, text_for
|
|
12
|
+
from test_skill_definition_governance import _record
|
|
13
|
+
from xrefkit import public_skill
|
|
14
|
+
from xrefkit.cli import main
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@pytest.fixture
|
|
18
|
+
def release(tmp_path, monkeypatch, metadata):
|
|
19
|
+
skill = "design_flow"
|
|
20
|
+
prefix = "xrefkit_skills_brownfield"
|
|
21
|
+
installed = tmp_path / "site"
|
|
22
|
+
metadata["skill_id"] = skill
|
|
23
|
+
source = tmp_path / "definition.md"
|
|
24
|
+
source.write_bytes(text_for(metadata).encode())
|
|
25
|
+
provided = dict(id=skill, xid=metadata["xid"], path=f"skills/{skill}/SKILL.v1.md",
|
|
26
|
+
governance_path=f"governance/skills/{skill}.json")
|
|
27
|
+
manifest = dict(package_id="xrefkit.skills.brownfield", package_type="skill_package", version="0.4.0",
|
|
28
|
+
contract={}, requires=dict(xrefkit_core=">=2.0.0 <3.0.0"), provides=dict(skills=[provided]))
|
|
29
|
+
contents = {
|
|
30
|
+
f"{prefix}/package_manifest.yaml": json.dumps(manifest).encode(),
|
|
31
|
+
f"{prefix}/{provided['path']}": source.read_bytes(),
|
|
32
|
+
f"{prefix}/{provided['governance_path']}": json.dumps(_record(source, metadata)).encode(),
|
|
33
|
+
}
|
|
34
|
+
contents["test.dist-info/entry_points.txt"] = b"[xrefkit.skill_packages]\nbrownfield = test:package_root\n"
|
|
35
|
+
wheel = BytesIO()
|
|
36
|
+
with ZipFile(wheel, "w") as archive:
|
|
37
|
+
for name, data in contents.items():
|
|
38
|
+
archive.writestr(name, data)
|
|
39
|
+
file = installed / name
|
|
40
|
+
file.parent.mkdir(parents=True, exist_ok=True)
|
|
41
|
+
file.write_bytes(data)
|
|
42
|
+
payload = wheel.getvalue()
|
|
43
|
+
filename = "xrefkit_skills_brownfield-0.4.0-py3-none-any.whl"
|
|
44
|
+
url = "https://files.pythonhosted.org/" + filename
|
|
45
|
+
index = dict(info=dict(name="xrefkit-skills-brownfield", version="0.4.0"),
|
|
46
|
+
urls=[dict(packagetype="bdist_wheel", filename=filename, url=url,
|
|
47
|
+
digests=dict(sha256=sha256(payload).hexdigest()))])
|
|
48
|
+
monkeypatch.setattr(public_skill, "_download", lambda addr, host, limit:
|
|
49
|
+
payload if addr == url else json.dumps(index).encode())
|
|
50
|
+
dist = SimpleNamespace(files=[Path(name) for name in contents], version="0.4.0",
|
|
51
|
+
entry_points=[SimpleNamespace(group="xrefkit.skill_packages")],
|
|
52
|
+
locate_file=lambda member: installed / member)
|
|
53
|
+
monkeypatch.setattr(public_skill.metadata, "distribution", lambda distribution: dist)
|
|
54
|
+
lock = public_skill.resolve_public_skill("xrefkit-skills-brownfield", "0.4.0", skill)
|
|
55
|
+
return lock, installed / prefix, dist
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def test_run_uses_pinned_distribution_even_with_same_named_local_skill(release, tmp_path, capsys):
|
|
59
|
+
lock, package, _ = release
|
|
60
|
+
root = tmp_path / "project"
|
|
61
|
+
overlay = root / "skills/design_flow/SKILL.v1.md"
|
|
62
|
+
overlay.parent.mkdir(parents=True)
|
|
63
|
+
overlay.write_text("unrelated local Skill", encoding="utf-8")
|
|
64
|
+
(root / "approved.json").write_text(json.dumps(lock), encoding="utf-8")
|
|
65
|
+
result = main(["skill", "run", "--root", str(root), "--public-skill-lock", "approved.json",
|
|
66
|
+
"--task", "review design", "--capability", "design", "--tuning", "review",
|
|
67
|
+
"--responsibility", "design", "--execution-mode", "subagent_required", "--json"])
|
|
68
|
+
assert result == 0
|
|
69
|
+
receipt = json.loads(capsys.readouterr().out)
|
|
70
|
+
assert Path(receipt["skill_doc"]) == package / "skills/design_flow/SKILL.v1.md"
|
|
71
|
+
log = Path(receipt["run_log"]).read_text(encoding="utf-8")
|
|
72
|
+
for key, value in lock.items():
|
|
73
|
+
assert f"- public_skill_{key}: `{value}`" in log
|
|
74
|
+
assert f"- definition_sha256: `{lock['definition_sha256']}`" in log
|
|
75
|
+
assert f"- definition_governance_sha256: `{lock['governance_sha256']}`" in log
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
@pytest.mark.parametrize("member", ["governance/skills/design_flow.json", "skills/design_flow/SKILL.v1.md"])
|
|
79
|
+
def test_modified_installed_content_blocks_run(release, member):
|
|
80
|
+
lock, package, _ = release
|
|
81
|
+
with (package / member).open("ab") as f:
|
|
82
|
+
f.write(b" ")
|
|
83
|
+
with pytest.raises(ValueError, match="expected .*actual"):
|
|
84
|
+
public_skill.verify_public_skill(lock)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
def test_installed_version_and_approved_wheel_are_enforced(release):
|
|
88
|
+
lock, _, dist = release
|
|
89
|
+
with pytest.raises(ValueError, match="wheel_sha256: expected .*actual"):
|
|
90
|
+
public_skill.verify_public_skill(dict(lock, wheel_sha256="0" * 64))
|
|
91
|
+
dist.version = "0.4.1"
|
|
92
|
+
with pytest.raises(ValueError, match="expected '0.4.0', actual '0.4.1'"):
|
|
93
|
+
public_skill.verify_public_skill(lock)
|
|
@@ -419,6 +419,7 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
419
419
|
p_skill_run_source = p_skill_run.add_mutually_exclusive_group(required=True)
|
|
420
420
|
p_skill_run_source.add_argument("--meta", help="Relative path to the legacy Skill meta.md to run")
|
|
421
421
|
p_skill_run_source.add_argument("--definition", help="Explicit SkillDefinition document to run without a legacy meta source")
|
|
422
|
+
p_skill_run_source.add_argument("--public-skill-lock", help="Approved JSON lock for an installed public stable Skill")
|
|
422
423
|
p_skill_run_source.add_argument("--package-skill", help="Explicit installed Skill Package reference (package_id::skill_id)")
|
|
423
424
|
p_skill_run.add_argument(
|
|
424
425
|
"--governance",
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"""Bind a native Skill to an immutable public PyPI wheel and its approved governance."""
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from configparser import ConfigParser
|
|
5
|
+
from hashlib import sha256
|
|
6
|
+
from importlib import metadata
|
|
7
|
+
from io import BytesIO
|
|
8
|
+
import json
|
|
9
|
+
from pathlib import Path, PurePosixPath
|
|
10
|
+
import re
|
|
11
|
+
from urllib.parse import urlsplit
|
|
12
|
+
from urllib.request import urlopen
|
|
13
|
+
from zipfile import BadZipFile, ZipFile
|
|
14
|
+
|
|
15
|
+
import yaml
|
|
16
|
+
|
|
17
|
+
from .models import PackageManifest
|
|
18
|
+
from .models.common import validate_package_id
|
|
19
|
+
from .skill_definition import parse_skill_definition
|
|
20
|
+
from .skill_definition_governance import match_definition, parse_governance_record
|
|
21
|
+
|
|
22
|
+
_FIELDS = {"distribution", "version", "skill_id", "package_id", "maturity", "definition_sha256",
|
|
23
|
+
"governance_sha256", "wheel_sha256", "wheel_filename"}
|
|
24
|
+
_NAME = r"[a-z0-9]+(?:-[a-z0-9]+)*"
|
|
25
|
+
_VERSION = r"[A-Za-z0-9]+(?:[.!+_-][A-Za-z0-9]+)*"
|
|
26
|
+
_SKILL = r"[a-z][a-z0-9_]*"
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _field(value, pattern, label):
|
|
30
|
+
if not isinstance(value, str) or not re.fullmatch(pattern, value):
|
|
31
|
+
raise ValueError(f"invalid public Skill {label}: {value!r}")
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def validate_public_skill_lock(lock):
|
|
35
|
+
if not isinstance(lock, dict) or set(lock) != _FIELDS:
|
|
36
|
+
raise ValueError("public Skill lock has missing or unknown fields")
|
|
37
|
+
_field(lock["distribution"], _NAME, "distribution")
|
|
38
|
+
_field(lock["version"], _VERSION, "version")
|
|
39
|
+
_field(lock["skill_id"], _SKILL, "skill ID")
|
|
40
|
+
if not isinstance(lock["package_id"], str):
|
|
41
|
+
raise ValueError("public Skill package_id must be a string")
|
|
42
|
+
validate_package_id(lock["package_id"])
|
|
43
|
+
_field(lock["wheel_filename"], r"[A-Za-z0-9_.!+-]+\.whl", "wheel filename")
|
|
44
|
+
for key in ("definition_sha256", "governance_sha256", "wheel_sha256"):
|
|
45
|
+
_field(lock[key], r"[0-9a-f]{64}", key)
|
|
46
|
+
if lock["maturity"] != "stable":
|
|
47
|
+
raise ValueError("public Skill lock requires stable maturity")
|
|
48
|
+
return lock
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def _same(field, expected, actual):
|
|
52
|
+
if expected != actual:
|
|
53
|
+
raise ValueError(f"public Skill {field}: expected {expected!r}, actual {actual!r}")
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def _download(url, host, limit):
|
|
57
|
+
if urlsplit(url).netloc != host or urlsplit(url).scheme != "https":
|
|
58
|
+
raise ValueError(f"unexpected public Skill download host (expected {host})")
|
|
59
|
+
with urlopen(url, timeout=30) as response: # nosec B310 - restricted HTTPS PyPI hosts
|
|
60
|
+
final = urlsplit(response.geturl())
|
|
61
|
+
if final.netloc != host or final.scheme != "https":
|
|
62
|
+
raise ValueError("public Skill download changed origin")
|
|
63
|
+
data = response.read(limit + 1)
|
|
64
|
+
if len(data) > limit:
|
|
65
|
+
raise ValueError("public Skill download exceeds size limit")
|
|
66
|
+
return data
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _published_wheel(distribution, version, pinned=None):
|
|
70
|
+
_field(distribution, _NAME, "distribution")
|
|
71
|
+
_field(version, _VERSION, "version")
|
|
72
|
+
index = json.loads(_download(f"https://pypi.org/pypi/{distribution}/{version}/json",
|
|
73
|
+
"pypi.org", 4_000_000))
|
|
74
|
+
_same("distribution", distribution, re.sub(r"[-_.]+", "-", index["info"]["name"]).lower())
|
|
75
|
+
_same("version", version, index["info"]["version"])
|
|
76
|
+
choices = [row for row in index["urls"] if row["packagetype"] == "bdist_wheel"
|
|
77
|
+
and not row.get("yanked") and (not pinned or row["filename"] == pinned["wheel_filename"])]
|
|
78
|
+
if len(choices) != 1:
|
|
79
|
+
raise ValueError(f"expected one unambiguous public wheel for {distribution} {version}, found {len(choices)}")
|
|
80
|
+
release = choices[0]
|
|
81
|
+
digest = release["digests"]["sha256"]
|
|
82
|
+
if pinned:
|
|
83
|
+
_same("wheel_sha256", pinned["wheel_sha256"], digest)
|
|
84
|
+
body = _download(release["url"], "files.pythonhosted.org", 64_000_000)
|
|
85
|
+
_same("wheel_sha256", digest, sha256(body).hexdigest())
|
|
86
|
+
return release["filename"], digest, body
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def _member(archive, name, limit):
|
|
90
|
+
if archive.namelist().count(name) != 1:
|
|
91
|
+
raise ValueError(f"expected one {name} in public wheel")
|
|
92
|
+
with archive.open(name) as handle:
|
|
93
|
+
body = handle.read(limit + 1)
|
|
94
|
+
if len(body) > limit:
|
|
95
|
+
raise ValueError(f"public Skill member exceeds size limit: {name}")
|
|
96
|
+
return body
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def _relative_path(text):
|
|
100
|
+
path = PurePosixPath(text)
|
|
101
|
+
if not path.parts or path.is_absolute() or path.as_posix() != text or ".." in path.parts or "\\" in text or ":" in text:
|
|
102
|
+
raise ValueError("invalid package-relative public Skill path")
|
|
103
|
+
return path
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
def _binding(distribution, version, skill_id, pinned=None):
|
|
107
|
+
_field(skill_id, _SKILL, "skill ID")
|
|
108
|
+
filename, wheel_hash, wheel = _published_wheel(distribution, version, pinned)
|
|
109
|
+
try:
|
|
110
|
+
with ZipFile(BytesIO(wheel)) as archive:
|
|
111
|
+
registrations = [n for n in archive.namelist() if n.endswith(".dist-info/entry_points.txt")]
|
|
112
|
+
if len(registrations) != 1:
|
|
113
|
+
raise ValueError("public Skill wheel must declare its XRefKit entry point")
|
|
114
|
+
entry_points = ConfigParser(interpolation=None)
|
|
115
|
+
entry_points.read_string(_member(archive, registrations[0], 128_000).decode("utf-8"))
|
|
116
|
+
if not entry_points.has_section("xrefkit.skill_packages") or not entry_points.items("xrefkit.skill_packages"):
|
|
117
|
+
raise ValueError("public wheel is not an XRefKit Skill Package")
|
|
118
|
+
manifests = [n for n in archive.namelist() if n.endswith("/package_manifest.yaml")]
|
|
119
|
+
if len(manifests) != 1:
|
|
120
|
+
raise ValueError("public Skill wheel requires one package manifest")
|
|
121
|
+
manifest_path = _relative_path(manifests[0])
|
|
122
|
+
manifest_bytes = _member(archive, str(manifest_path), 1_000_000)
|
|
123
|
+
manifest = PackageManifest.model_validate(yaml.safe_load(manifest_bytes))
|
|
124
|
+
_same("manifest version", version, manifest.version)
|
|
125
|
+
items = [item for item in manifest.provides.skills if item.id == skill_id and item.governance_path]
|
|
126
|
+
if len(items) != 1:
|
|
127
|
+
raise ValueError(f"expected one native governed Skill {skill_id}, found {len(items)}")
|
|
128
|
+
item = items[0]
|
|
129
|
+
definition_path = manifest_path.parent / _relative_path(item.path)
|
|
130
|
+
governance_path = manifest_path.parent / _relative_path(item.governance_path)
|
|
131
|
+
definition_bytes = _member(archive, str(definition_path), 512_000)
|
|
132
|
+
governance_bytes = _member(archive, str(governance_path), 128 * 1024)
|
|
133
|
+
except BadZipFile as exc:
|
|
134
|
+
raise ValueError("invalid public Skill wheel") from exc
|
|
135
|
+
definition = parse_skill_definition(definition_bytes.decode("utf-8-sig"))
|
|
136
|
+
definition["content_hash"] = sha256(definition_bytes).hexdigest()
|
|
137
|
+
_same("definition skill ID", skill_id, definition["metadata"]["skill_id"])
|
|
138
|
+
_same("definition XID", item.xid, definition["metadata"]["xid"])
|
|
139
|
+
gov = parse_governance_record(governance_bytes, source=str(governance_path))
|
|
140
|
+
match_definition(gov, definition)
|
|
141
|
+
_same("maturity", "stable", gov["maturity"])
|
|
142
|
+
_same("promotion decision", "approved", gov["promotion"]["decision"])
|
|
143
|
+
lock = dict(distribution=distribution, version=version, skill_id=skill_id, package_id=manifest.package_id,
|
|
144
|
+
maturity=gov["maturity"], definition_sha256=definition["content_hash"],
|
|
145
|
+
governance_sha256=sha256(governance_bytes).hexdigest(), wheel_sha256=wheel_hash,
|
|
146
|
+
wheel_filename=filename)
|
|
147
|
+
return validate_public_skill_lock(lock), (
|
|
148
|
+
(manifest_path, sha256(manifest_bytes).hexdigest()), (definition_path, lock["definition_sha256"]),
|
|
149
|
+
(governance_path, lock["governance_sha256"]))
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
def resolve_public_skill(distribution, version, skill_id):
|
|
153
|
+
"""Resolve a proposed Skill using public wheel bytes, independently of local overlays."""
|
|
154
|
+
lock, _ = _binding(distribution, version, skill_id)
|
|
155
|
+
return lock
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def verify_public_skill(lock) -> tuple[Path, Path]:
|
|
159
|
+
"""Return exact installed definition and governance paths matching the approved public wheel."""
|
|
160
|
+
validate_public_skill_lock(lock)
|
|
161
|
+
name = lock["distribution"]
|
|
162
|
+
try:
|
|
163
|
+
dist = metadata.distribution(name)
|
|
164
|
+
except metadata.PackageNotFoundError as exc:
|
|
165
|
+
raise ValueError(f"public Skill distribution: expected {name} {lock['version']}, actual not installed") from exc
|
|
166
|
+
_same("installed version", lock["version"], dist.version)
|
|
167
|
+
if not any(ep.group == "xrefkit.skill_packages" for ep in dist.entry_points):
|
|
168
|
+
raise ValueError(f"{name} is not an installed XRefKit Skill Package")
|
|
169
|
+
actual, members = _binding(name, lock["version"], lock["skill_id"], pinned=lock)
|
|
170
|
+
for key in sorted(lock):
|
|
171
|
+
_same(key, lock[key], actual[key])
|
|
172
|
+
owned = {p.as_posix() for p in dist.files or ()}
|
|
173
|
+
site = Path(dist.locate_file("")).resolve()
|
|
174
|
+
verified = []
|
|
175
|
+
for member, expected in members:
|
|
176
|
+
if str(member) not in owned:
|
|
177
|
+
raise ValueError(f"expected {name} to own {member}, actual absent from installed distribution")
|
|
178
|
+
path = Path(dist.locate_file(member)).resolve()
|
|
179
|
+
if not path.is_relative_to(site):
|
|
180
|
+
raise ValueError(f"installed public Skill member is outside the distribution: {member}")
|
|
181
|
+
_same(str(member), expected, sha256(path.read_bytes()).hexdigest())
|
|
182
|
+
verified.append(path)
|
|
183
|
+
return verified[1], verified[2]
|
|
@@ -93,6 +93,11 @@ def load_governance_record(path: str | Path) -> dict[str, Any]:
|
|
|
93
93
|
path = Path(path)
|
|
94
94
|
with path.open("rb") as source:
|
|
95
95
|
raw = source.read(MAX_RECORD_BYTES + 1)
|
|
96
|
+
return parse_governance_record(raw, source=path.as_posix())
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def parse_governance_record(raw: bytes, *, source: str) -> dict[str, Any]:
|
|
100
|
+
"""Parse a bounded governance record and retain its original byte hash."""
|
|
96
101
|
if len(raw) > MAX_RECORD_BYTES:
|
|
97
102
|
raise ValueError("governance record exceeds 128KB")
|
|
98
103
|
try:
|
|
@@ -100,7 +105,7 @@ def load_governance_record(path: str | Path) -> dict[str, Any]:
|
|
|
100
105
|
except (UnicodeDecodeError, json.JSONDecodeError) as exc:
|
|
101
106
|
raise ValueError(f"invalid governance JSON: {exc}") from exc
|
|
102
107
|
result = dict(validate_governance_record(value))
|
|
103
|
-
result["_path"] =
|
|
108
|
+
result["_path"] = source
|
|
104
109
|
result["_content_hash"] = hashlib.sha256(raw).hexdigest()
|
|
105
110
|
return result
|
|
106
111
|
|
|
@@ -130,5 +135,6 @@ __all__ = [
|
|
|
130
135
|
"governance_projection",
|
|
131
136
|
"load_governance_record",
|
|
132
137
|
"match_definition",
|
|
138
|
+
"parse_governance_record",
|
|
133
139
|
"validate_governance_record",
|
|
134
140
|
]
|
|
@@ -661,7 +661,7 @@ def _render_log(
|
|
|
661
661
|
]
|
|
662
662
|
)
|
|
663
663
|
definition_lines = "".join(
|
|
664
|
-
f"- {key if key.startswith('package_') else 'definition_' + key}: `{value}`\n"
|
|
664
|
+
f"- {key if key.startswith(('package_', 'public_skill_')) else 'definition_' + key}: `{value}`\n"
|
|
665
665
|
for key, value in (definition_identity or {}).items()
|
|
666
666
|
)
|
|
667
667
|
runtime_responsibility = role_responsibilities.get("executor") or "not declared"
|
|
@@ -3001,10 +3001,19 @@ def run_skill(args) -> SkillRunResult:
|
|
|
3001
3001
|
governance_arg = getattr(args, "governance", None)
|
|
3002
3002
|
meta_arg = getattr(args, "meta", None)
|
|
3003
3003
|
package_arg = getattr(args, "package_skill", None)
|
|
3004
|
-
|
|
3005
|
-
|
|
3004
|
+
public_lock_arg = getattr(args, "public_skill_lock", None)
|
|
3005
|
+
public_lock = None
|
|
3006
|
+
if sum(bool(source) for source in (definition_arg, meta_arg, package_arg, public_lock_arg)) != 1:
|
|
3007
|
+
return SkillRunResult(False, None, None, None, ["select exactly one Skill run source"])
|
|
3006
3008
|
try:
|
|
3007
|
-
|
|
3009
|
+
if public_lock_arg:
|
|
3010
|
+
from xrefkit.public_skill import verify_public_skill
|
|
3011
|
+
|
|
3012
|
+
if governance_arg:
|
|
3013
|
+
raise ValueError("--public-skill-lock supplies its own governance record")
|
|
3014
|
+
public_lock = json.loads((root / public_lock_arg).read_text(encoding="utf-8-sig"))
|
|
3015
|
+
definition_arg, governance_arg = verify_public_skill(public_lock)
|
|
3016
|
+
adoption = None if package_arg or public_lock else load_repository_adoption(root)
|
|
3008
3017
|
adapter = repository_skill(root, definition_arg or meta_arg, adoption) if adoption else None
|
|
3009
3018
|
except (ValueError, OSError) as exc:
|
|
3010
3019
|
return SkillRunResult(ok=False, skill_id=None, skill_doc=None, run_log=None, errors=[str(exc)])
|
|
@@ -3050,7 +3059,7 @@ def run_skill(args) -> SkillRunResult:
|
|
|
3050
3059
|
parsed = dict(definition["metadata"])
|
|
3051
3060
|
skill_id = str(parsed["skill_id"])
|
|
3052
3061
|
try:
|
|
3053
|
-
definition_relpath = str(meta_path.relative_to(root))
|
|
3062
|
+
definition_relpath = str(meta_path if public_lock else meta_path.relative_to(root))
|
|
3054
3063
|
except ValueError:
|
|
3055
3064
|
return SkillRunResult(ok=False, skill_id=skill_id, skill_doc=str(meta_path), run_log=None, errors=["definition must be under --root"])
|
|
3056
3065
|
definition_relpath = Path(definition_relpath).as_posix()
|
|
@@ -3060,6 +3069,8 @@ def run_skill(args) -> SkillRunResult:
|
|
|
3060
3069
|
"path": definition_relpath,
|
|
3061
3070
|
"sha256": str(definition["content_hash"]),
|
|
3062
3071
|
}
|
|
3072
|
+
if public_lock:
|
|
3073
|
+
definition_identity.update({f"public_skill_{key}": value for key, value in public_lock.items()})
|
|
3063
3074
|
if adapter:
|
|
3064
3075
|
definition_identity.update({
|
|
3065
3076
|
"adoption_path": adoption["path"], "adoption_sha256": adoption["sha256"],
|
|
@@ -3077,13 +3088,16 @@ def run_skill(args) -> SkillRunResult:
|
|
|
3077
3088
|
if governance_arg:
|
|
3078
3089
|
governance_path = (root / governance_arg).resolve()
|
|
3079
3090
|
try:
|
|
3080
|
-
governance_relpath = governance_path.relative_to(root).as_posix()
|
|
3091
|
+
governance_relpath = (governance_path if public_lock else governance_path.relative_to(root)).as_posix()
|
|
3081
3092
|
except ValueError:
|
|
3082
3093
|
return SkillRunResult(ok=False, skill_id=skill_id, skill_doc=str(meta_path), run_log=None,
|
|
3083
3094
|
errors=["governance record must be under --root"])
|
|
3084
3095
|
try:
|
|
3085
3096
|
governance = load_governance_record(governance_path)
|
|
3086
3097
|
match_definition(governance, definition)
|
|
3098
|
+
if public_lock and (governance["_content_hash"] != public_lock["governance_sha256"]
|
|
3099
|
+
or definition["content_hash"] != public_lock["definition_sha256"]):
|
|
3100
|
+
raise ValueError("installed public Skill changed while opening the run")
|
|
3087
3101
|
if adapter and "current_adoption" in adapter and governance["_content_hash"] != adapter["current_adoption"]["governance_sha256"]:
|
|
3088
3102
|
raise ValueError("current repository governance revision changed")
|
|
3089
3103
|
except (OSError, ValueError) as exc:
|
|
@@ -3310,7 +3324,7 @@ def run_skill(args) -> SkillRunResult:
|
|
|
3310
3324
|
skill_id=skill_id,
|
|
3311
3325
|
maturity=maturity,
|
|
3312
3326
|
meta_path=Path("-") if instruction_bound else meta_path.relative_to(root),
|
|
3313
|
-
skill_doc=skill_doc_path if package_arg else skill_doc_path.relative_to(root),
|
|
3327
|
+
skill_doc=skill_doc_path if package_arg or public_lock else skill_doc_path.relative_to(root),
|
|
3314
3328
|
execution_mode=execution_mode,
|
|
3315
3329
|
guard_policy=guard_policy,
|
|
3316
3330
|
capability_layering=capability_layering,
|
|
@@ -95,6 +95,7 @@ tests/test_principle_discovery.py
|
|
|
95
95
|
tests/test_project_management_materialization.py
|
|
96
96
|
tests/test_project_management_offline_progress.py
|
|
97
97
|
tests/test_project_quality_baseline.py
|
|
98
|
+
tests/test_public_skill.py
|
|
98
99
|
tests/test_qa_report_definition.py
|
|
99
100
|
tests/test_quality_issue_dashboard.py
|
|
100
101
|
tests/test_quality_issues.py
|
|
@@ -173,6 +174,7 @@ xrefkit/packmeta.py
|
|
|
173
174
|
xrefkit/plan_markdown.py
|
|
174
175
|
xrefkit/plan_observation.py
|
|
175
176
|
xrefkit/principle_discovery.py
|
|
177
|
+
xrefkit/public_skill.py
|
|
176
178
|
xrefkit/quality_issues.py
|
|
177
179
|
xrefkit/registry.py
|
|
178
180
|
xrefkit/reporting.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|