xrefkit 0.7.13__tar.gz → 0.7.14__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.13/xrefkit.egg-info → xrefkit-0.7.14}/PKG-INFO +2 -2
- {xrefkit-0.7.13 → xrefkit-0.7.14}/pyproject.toml +2 -2
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_azure_connection.py +8 -7
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_azure_import.py +3 -2
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_azure_recovery.py +5 -4
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_azure_writer.py +4 -3
- xrefkit-0.7.14/tests/test_environment_isolation.py +61 -0
- xrefkit-0.7.14/tests/test_mcp_skills_extension.py +123 -0
- xrefkit-0.7.14/tests/test_mcp_skills_transport.py +113 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/__init__.py +1 -1
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/server.py +5 -2
- xrefkit-0.7.14/xrefkit/mcp/skills_extension.py +178 -0
- xrefkit-0.7.14/xrefkit/mcp/skills_transport.py +138 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14/xrefkit.egg-info}/PKG-INFO +2 -2
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit.egg-info/SOURCES.txt +5 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit.egg-info/requires.txt +1 -1
- {xrefkit-0.7.13 → xrefkit-0.7.14}/LICENSE +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/README.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/setup.cfg +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_artifact_selected_family.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_attention_pet.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_attention_pet_client_protocol.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_attention_pet_codex_session.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_attention_pet_fit.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_azure_update_candidate.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_boundary_analysis.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_brownfield_csharp_structure_definitions.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_brownfield_file_editing_protocol.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_business_intake_conversation_definitions.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_business_intake_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_calibration_lint.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_catalog_preparation_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_check_skill_knowledge_xids.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_ci_workflow_invariants.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_cli.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_code_constraint_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_collect_analyzer_sarif.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_compact_skill_logs.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_constraint_derivation_family_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_constraint_derivation_selected_family.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_contribution_adoption_bytes.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_contribution_returns.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_convert_to_xrefkit_skill.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_cs_scope_probe.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_csharp_commonality.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_csharp_naming_profile.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_ctx.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_cutover_readiness.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_dashboard.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_database_batch_definition_migration.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_decision_checklist.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_decision_handoff.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_decision_trace.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_design_business_intake_selected_family.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_design_planning_definition_migration.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_dotnet_definition_candidate.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_editorial_family_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_editorial_intake_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_editorial_selected_family.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_embedded_startup_pack.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_engineering_decision.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_error_policy_audit.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_error_policy_locator.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_execution_binding.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_existing_skill_definition_batch.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_final_skilldefinition_batch.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_flow_selected_family.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_fm_multiroot.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_gate.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_gateway.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_gateway_mcp.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_gateway_skill_adapter.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_gateway_work_items.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_goal_desired_state.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_governance_entry.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_governance_host.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_host_precheck.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_human_evaluation.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_implementation_flow_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_implementation_review_selected_family.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_inbound_uploads.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_instruction_workflow.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_knowledge_relations_validator.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_language_review_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_legacy_guidance.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_legacy_migration.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_legacy_resources.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_mcp_package_routing.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_mcp_setup.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_mcp_subagent_startup.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_mcp_subagent_startup_integration.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_ontology_assessment_validator.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_os_family_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_os_knowledge_family_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_os_selected_family.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_ownership.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_package_knowledge_resolution.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_package_skill_run.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_packaged_native_governance.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_packmeta.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_plan_markdown.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_plan_observation.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_principle_discovery.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_project_management_materialization.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_project_management_offline_progress.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_project_quality_baseline.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_qa_report_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_quality_issue_dashboard.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_quality_issues.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_reporting_profiles.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_reporting_quality.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_repository_skill_adoption.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_repository_startup_pack.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_resource_provider.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_runtime_contracts.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_sarif_to_locator.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_security_definition_migration.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_site_release_metadata.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_skill_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_skill_definition_governance.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_skill_definition_mcp.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_skill_definition_runtime.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_skill_edits.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_skill_maturity_return.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_skill_release_compatibility.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_skill_runtime_audit.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_skillmeta.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_skills_sync.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_source_analysis_fragments.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_structure_catalog.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_subagent_startup.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_subagent_startup_boundaries.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_unknown_resolution.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_wbs.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_work_management.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_work_packages.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_workflow_family_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_xref.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_xrefkit_instance.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_xrefkit_tools.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_xrefkit_v2_discovery.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_xrefkit_v2_models.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/tests/test_xrefkit_v2_pipeline.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/__main__.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/__init__.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/__main__.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/client.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/client_protocol.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/codex_session.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/evaluator.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/model.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/presentation.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/profiles.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/scenarios.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/server.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/attention_pet/store.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/azure_connection.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/azure_import.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/azure_recovery.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/azure_update_candidate.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/azure_writer.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/boundary_analysis.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/catalog_cli.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/cli.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/contracts.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/ctx.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/dashboard.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/decision_checklist.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/decision_handoff.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/decision_trace.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/discovery.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/engineering_decision.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/execution_binding.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/execution_binding_cli.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/gate.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/gateway.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/goalstate.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/governance_entry.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/governance_entry_cli.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/governance_host.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/hashing.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/host_execution.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/host_precheck.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/import_skill.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/instance.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/loaders.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/__init__.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/audit.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/bootstrap.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/catalog.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/cli.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/client_cache.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/client_flow.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/context_registry.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/context_token.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/contracts.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/contribution_adoption.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/contribution_returns.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/dist.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/gateway.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/governed_overlays.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/inbound_uploads.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/knowledge_edits.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/legacy_guidance.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/legacy_migration.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/legacy_resources.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/ownership.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/repository.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/schemas.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/setup.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/skill_edits.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/skill_maturity.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/startup_contract_pack.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/subagent_startup.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp/update_gate_intake.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/mcp_tools.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/models/__init__.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/models/common.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/models/effective_bundle.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/models/human_evaluation.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/models/local_manifest.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/models/package_manifest.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/models/run_log.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/models/server_config.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/models/skill_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/operations_cli.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/ownership.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/packmeta.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/plan_markdown.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/plan_observation.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/principle_discovery.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/quality_issues.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/registry.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/reporting.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/reporting_profiles.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/repository_skills.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resolver.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resource_provider.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/attention_pet/client-state.schema.json +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/attention_pet/pet.css +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/attention_pet/pet.html +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/attention_pet/pet.js +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/contracts.json +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/current.json +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/generations/7a682a5272907354/contracts.json +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/generations/7a682a5272907354/model_body.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/generations/9929294385ccb7b0/contracts.json +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/generations/9929294385ccb7b0/model_body.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/model_body.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/000_agent_entry.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/011_startup_xref_routing.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/015_shared_memory_operations.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/016_uncertainty_protocol.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/017_base_and_xref_layering.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/053_context_direction_security_guard.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/base/startup_sources/yomiyasu_LICENSE.txt +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/engineering-decision-checklist.json +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/migration/docs/guides/062_legacy_flow_skill_migration_guide.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/migration/knowledge/operations/130_legacy_flow_skill_migration_rules.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/migration/knowledge/organization/160_context_direction_guard_rules.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/migration/skills/os/legacy_flow_skill_migration/SKILL.v1.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/migration/skills/os/legacy_flow_skill_migration/references/legacy_flow_skill_migration_template.md +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/migration/skills/repository_adoption.json +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/resources/migration/tools/migrate_legacy_flow_skill.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/runlog.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/skill_definition.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/skill_definition_catalog.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/skill_definition_governance.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/skillmeta.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/skillrun.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/skills_sync.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/structure_catalog.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/subagent_startup.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/tools/__init__.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/tools/__main__.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/unknown_resolution.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/v2_cli.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/wbs.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/work_management.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/work_management_view.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/workspace.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit/xref.py +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit.egg-info/dependency_links.txt +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit.egg-info/entry_points.txt +0 -0
- {xrefkit-0.7.13 → xrefkit-0.7.14}/xrefkit.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: xrefkit
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.14
|
|
4
4
|
Summary: Portable XID, Skill, Knowledge, workflow, and MCP runtime for XRefKit
|
|
5
5
|
Author: synthaicode
|
|
6
6
|
License: MIT License
|
|
@@ -31,7 +31,7 @@ License-File: LICENSE
|
|
|
31
31
|
Requires-Dist: PyYAML<7,>=6.0.2
|
|
32
32
|
Requires-Dist: pydantic<3,>=2.0
|
|
33
33
|
Provides-Extra: mcp
|
|
34
|
-
Requires-Dist: mcp<2,>=1.
|
|
34
|
+
Requires-Dist: mcp<2,>=1.28.0; extra == "mcp"
|
|
35
35
|
Requires-Dist: uvicorn>=0.30; extra == "mcp"
|
|
36
36
|
Provides-Extra: test
|
|
37
37
|
Requires-Dist: pytest>=8.0.0; extra == "test"
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "xrefkit"
|
|
7
|
-
version = "0.7.
|
|
7
|
+
version = "0.7.14"
|
|
8
8
|
description = "Portable XID, Skill, Knowledge, workflow, and MCP runtime for XRefKit"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -16,7 +16,7 @@ dependencies = [
|
|
|
16
16
|
]
|
|
17
17
|
|
|
18
18
|
[project.optional-dependencies]
|
|
19
|
-
mcp = ["mcp>=1.
|
|
19
|
+
mcp = ["mcp>=1.28.0,<2", "uvicorn>=0.30"]
|
|
20
20
|
test = ["pytest>=8.0.0"]
|
|
21
21
|
|
|
22
22
|
[project.scripts]
|
|
@@ -9,6 +9,7 @@ from contextlib import redirect_stdout, redirect_stderr
|
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from urllib.error import HTTPError, URLError
|
|
11
11
|
from unittest.mock import patch
|
|
12
|
+
from environment_helpers import mock_environment
|
|
12
13
|
|
|
13
14
|
from xrefkit.azure_connection import MAX_BYTES, _NoRedirect, load_connection, main, read_check, register_connection, validate_profile
|
|
14
15
|
from xrefkit.work_management import register_workspace
|
|
@@ -117,7 +118,7 @@ class AzureConnectionTests(unittest.TestCase):
|
|
|
117
118
|
|
|
118
119
|
def test_missing_named_credential_has_no_other_env_fallback(self):
|
|
119
120
|
self.register()
|
|
120
|
-
with
|
|
121
|
+
with mock_environment({"AZURE_DEVOPS_PAT": CANARY}, clear=True), patch("xrefkit.azure_connection.build_opener") as network:
|
|
121
122
|
result = self.check()
|
|
122
123
|
self.assertEqual("credential_unavailable", result["diagnostic_code"])
|
|
123
124
|
self.assertFalse(result["network_attempted"])
|
|
@@ -135,7 +136,7 @@ class AzureConnectionTests(unittest.TestCase):
|
|
|
135
136
|
self.assertEqual("Basic " + base64.b64encode((":" + CANARY).encode()).decode(), req.get_header("Authorization"))
|
|
136
137
|
response = Response(req)
|
|
137
138
|
return response
|
|
138
|
-
with
|
|
139
|
+
with mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
139
140
|
builder.return_value.open.side_effect = request
|
|
140
141
|
result = self.check()
|
|
141
142
|
builder.return_value.open.assert_called_once()
|
|
@@ -151,7 +152,7 @@ class AzureConnectionTests(unittest.TestCase):
|
|
|
151
152
|
def test_http_failures_and_redirects_are_sanitized_without_retry(self):
|
|
152
153
|
self.register()
|
|
153
154
|
for status, code in ((401, "authentication_rejected"), (403, "access_forbidden"), (404, "unavailable_or_not_visible"), (302, "redirect_rejected"), (307, "redirect_rejected"), (429, "rate_limited"), (503, "server_failure")):
|
|
154
|
-
with self.subTest(status=status),
|
|
155
|
+
with self.subTest(status=status), mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
155
156
|
builder.return_value.open.side_effect = HTTPError("https://evil.test/" + CANARY, status, CANARY, {}, io.BytesIO(CANARY.encode()))
|
|
156
157
|
result = self.check()
|
|
157
158
|
self.assertEqual(code, result["diagnostic_code"])
|
|
@@ -165,7 +166,7 @@ class AzureConnectionTests(unittest.TestCase):
|
|
|
165
166
|
echo = copy.deepcopy(base)
|
|
166
167
|
echo["fields"]["System.State"] = CANARY
|
|
167
168
|
for body in (b"invalid " + CANARY.encode(), b"x" * (MAX_BYTES + 1), json.dumps({**base, "id": 11}).encode(), json.dumps({**base, "fields": {"System.TeamProject": "other"}}).encode(), json.dumps(echo).encode()):
|
|
168
|
-
with self.subTest(size=len(body)),
|
|
169
|
+
with self.subTest(size=len(body)), mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
169
170
|
builder.return_value.open.side_effect = lambda req, timeout: Response(req, body)
|
|
170
171
|
result = self.check()
|
|
171
172
|
self.assertFalse(result["read_verified"])
|
|
@@ -174,18 +175,18 @@ class AzureConnectionTests(unittest.TestCase):
|
|
|
174
175
|
def test_network_timeout_nonjson_and_unexpected_final_url_are_controlled(self):
|
|
175
176
|
self.register()
|
|
176
177
|
for error in (TimeoutError(CANARY), URLError(CANARY)):
|
|
177
|
-
with
|
|
178
|
+
with mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
178
179
|
builder.return_value.open.side_effect = error
|
|
179
180
|
self.assertEqual("network_request_failed", self.check()["diagnostic_code"])
|
|
180
181
|
for changes, code in (({"content_type": "text/html"}, "response_not_json"), ({"url": "https://evil.test"}, "response_destination_mismatch")):
|
|
181
|
-
with
|
|
182
|
+
with mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
182
183
|
builder.return_value.open.side_effect = lambda req, timeout: Response(req, **changes)
|
|
183
184
|
self.assertEqual(code, self.check()["diagnostic_code"])
|
|
184
185
|
|
|
185
186
|
def test_cli_never_echoes_secret_or_server_error_text(self):
|
|
186
187
|
self.register()
|
|
187
188
|
output = io.StringIO()
|
|
188
|
-
with redirect_stdout(output),
|
|
189
|
+
with redirect_stdout(output), mock_environment({"EXPLICIT_TEST_PAT": CANARY}), patch("xrefkit.azure_connection.build_opener") as builder:
|
|
189
190
|
builder.return_value.open.side_effect = HTTPError(CANARY, 401, CANARY, {}, io.BytesIO(CANARY.encode()))
|
|
190
191
|
status = main(["read-check", "--root", str(self.root), "--workspace-id", "local", "--connection-id", "test", "--item-id", "10"])
|
|
191
192
|
self.assertEqual(1, status)
|
|
@@ -4,6 +4,7 @@ import json
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from urllib.error import HTTPError
|
|
6
6
|
from unittest.mock import patch
|
|
7
|
+
from environment_helpers import mock_environment
|
|
7
8
|
|
|
8
9
|
import pytest
|
|
9
10
|
|
|
@@ -55,7 +56,7 @@ def network(values=None, headers=None):
|
|
|
55
56
|
value = values.get(item_id, payload(item_id)) if values is not None else payload(item_id)
|
|
56
57
|
if isinstance(value, BaseException): raise value
|
|
57
58
|
return Response(request, value, **(headers or {}))
|
|
58
|
-
return
|
|
59
|
+
return mock_environment({"IMPORT_TEST_PAT": CANARY}), patch.object(module, "build_opener", return_value=Opener()), calls
|
|
59
60
|
|
|
60
61
|
|
|
61
62
|
def acquire(setup, values=None, request=None, headers=None):
|
|
@@ -230,7 +231,7 @@ def test_unexpected_body_continuation_metadata_is_rejected(setup, key):
|
|
|
230
231
|
@pytest.mark.parametrize("mutation", ["attempted", "diagnostic", "failed_not_attempted", "bool_id", "outcome", "unknown_field"])
|
|
231
232
|
def test_resealed_contradictory_receipts_are_not_accepted(setup, mutation):
|
|
232
233
|
root, _, request, _, _, _ = setup
|
|
233
|
-
with
|
|
234
|
+
with mock_environment({}, clear=True):
|
|
234
235
|
result = module.capture(root, "local", request)
|
|
235
236
|
receipt = read_json(Path(result["output"]))
|
|
236
237
|
if mutation == "attempted": receipt["items"][0]["network_attempted"] = True
|
|
@@ -3,6 +3,7 @@ import json
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from urllib.error import HTTPError
|
|
5
5
|
from unittest.mock import patch
|
|
6
|
+
from environment_helpers import mock_environment
|
|
6
7
|
|
|
7
8
|
import pytest
|
|
8
9
|
|
|
@@ -39,7 +40,7 @@ def publish_remote(setup, request=None, lost=False, intent_only=False, before=No
|
|
|
39
40
|
return Response(req, payload(10))
|
|
40
41
|
return Response(req, current)
|
|
41
42
|
root, original, _, _ = setup
|
|
42
|
-
with
|
|
43
|
+
with mock_environment({"IMPORT_TEST_PAT": CANARY}), patch.object(writer, "build_opener", return_value=Opener()):
|
|
43
44
|
if intent_only:
|
|
44
45
|
with pytest.raises(KeyboardInterrupt): writer.publish(root, "local", request or original)
|
|
45
46
|
result = None
|
|
@@ -70,7 +71,7 @@ def reads(current, historical=None, *, fail_phase=None, error=None, mutation=Non
|
|
|
70
71
|
value["url"] += "/revisions/" + str(value["rev"])
|
|
71
72
|
if mutation: value = mutation(phase, value)
|
|
72
73
|
return Response(req, value)
|
|
73
|
-
return
|
|
74
|
+
return mock_environment({"IMPORT_TEST_PAT": CANARY}), patch.object(writer, "build_opener", return_value=Opener()), calls
|
|
74
75
|
|
|
75
76
|
|
|
76
77
|
def reconcile(setup, request=None, current=None, historical=None, **kwargs):
|
|
@@ -185,7 +186,7 @@ def test_expired_auth_partial_failure_and_later_explicit_read(setup, phase, code
|
|
|
185
186
|
|
|
186
187
|
def test_missing_pat_no_network_and_original_unknown_still_blocks(setup):
|
|
187
188
|
writer_setup, request, _ = setup
|
|
188
|
-
with
|
|
189
|
+
with mock_environment({}, clear=True), patch.object(writer, "build_opener") as http:
|
|
189
190
|
result = module.reconcile(writer_setup[0], "local", request)
|
|
190
191
|
assert result["outcome"] == "unresolved" and not result["network_attempted"]
|
|
191
192
|
assert result["phases"] == [{"phase": "root", "outcome": "not_attempted", "diagnostic_code": "credential_unavailable", "network_attempted": False}]
|
|
@@ -286,7 +287,7 @@ def test_intent_only_crash_before_send_never_infers_not_sent(writer_setup):
|
|
|
286
287
|
|
|
287
288
|
def test_known_hold_retained_without_credential_or_remote_read(writer_setup):
|
|
288
289
|
root = writer_setup[0]
|
|
289
|
-
with
|
|
290
|
+
with mock_environment({}, clear=True):
|
|
290
291
|
assert writer.publish(root, "local", writer_setup[1])["outcome"] == "hold"
|
|
291
292
|
req = {"schema_version": 1, "reconciliation_id": "hold", "report_id": "write-1", "connection_id": "import-test", "source_connection_id": "write-test", "binding_id": "binding-1", "expected_observation_revision": 2, "approval_refs": ["recover.md"]}
|
|
292
293
|
with patch.object(writer.os.environ, "get", side_effect=AssertionError("credential read")), patch.object(writer, "build_opener") as http:
|
|
@@ -3,6 +3,7 @@ import json
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from urllib.error import HTTPError
|
|
5
5
|
from unittest.mock import patch
|
|
6
|
+
from environment_helpers import mock_environment
|
|
6
7
|
|
|
7
8
|
import pytest
|
|
8
9
|
|
|
@@ -70,7 +71,7 @@ def network(*, mutation=None, patch_failure=None, readback_failure=None, patch_f
|
|
|
70
71
|
value = mutation(request, copy.deepcopy(value))
|
|
71
72
|
return Response(request, value)
|
|
72
73
|
|
|
73
|
-
return
|
|
74
|
+
return mock_environment({"IMPORT_TEST_PAT": CANARY}), patch.object(module, "build_opener", return_value=Opener()), calls
|
|
74
75
|
|
|
75
76
|
|
|
76
77
|
def deliver(setup, request=None, **kwargs):
|
|
@@ -252,7 +253,7 @@ def test_success_chain_requires_explicit_predecessor_and_new_observation(setup):
|
|
|
252
253
|
after["fields"]["System.History"] = operations[-1]["value"]
|
|
253
254
|
return Response(req, after)
|
|
254
255
|
return Response(req, sequence.pop(0) if sequence else after)
|
|
255
|
-
with
|
|
256
|
+
with mock_environment({"IMPORT_TEST_PAT": CANARY}), patch.object(module, "build_opener", return_value=Opener()):
|
|
256
257
|
result = module.publish(root, "local", second)
|
|
257
258
|
assert result["sent_confirmed"] and result["after"] == {"revision": 4, "state": "Done"}
|
|
258
259
|
with pytest.raises(ValueError): module.publish(root, "local", {**second, "report_id": "fork", "expected_observation_revision": 4})
|
|
@@ -296,7 +297,7 @@ def test_same_id_changed_request_refuses_before_credentials(setup):
|
|
|
296
297
|
|
|
297
298
|
def test_resealed_unknown_without_intent_cannot_bypass_target_guard(setup):
|
|
298
299
|
root, request, _, _ = setup
|
|
299
|
-
with
|
|
300
|
+
with mock_environment({}, clear=True):
|
|
300
301
|
result = module.publish(root, "local", request)
|
|
301
302
|
path = Path(result["output"])
|
|
302
303
|
record = read_json(path)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import os
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
import subprocess
|
|
5
|
+
import sys
|
|
6
|
+
import unittest
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class EnvironmentMockIsolationTests(unittest.TestCase):
|
|
10
|
+
def test_inherited_empty_native_value_survives_mock_and_exception(self):
|
|
11
|
+
# Pass the empty value when creating the child: assigning it through
|
|
12
|
+
# os.environ inside the child cannot reproduce this Windows condition.
|
|
13
|
+
environment = dict(os.environ)
|
|
14
|
+
environment["XREFKIT_TEST_EMPTY_NATIVE_VALUE"] = ""
|
|
15
|
+
environment.pop("XREFKIT_TEST_MOCK_ONLY_VALUE", None)
|
|
16
|
+
script = r'''
|
|
17
|
+
import json
|
|
18
|
+
import os
|
|
19
|
+
import subprocess
|
|
20
|
+
import sys
|
|
21
|
+
from environment_helpers import mock_environment
|
|
22
|
+
|
|
23
|
+
key = "XREFKIT_TEST_EMPTY_NATIVE_VALUE"
|
|
24
|
+
mock_key = "XREFKIT_TEST_MOCK_ONLY_VALUE"
|
|
25
|
+
original = os.environ
|
|
26
|
+
probe = "import json,os; print(json.dumps([os.environ.get('XREFKIT_TEST_EMPTY_NATIVE_VALUE') == '', 'XREFKIT_TEST_MOCK_ONLY_VALUE' in os.environ]))"
|
|
27
|
+
def native_state():
|
|
28
|
+
# Deliberately omit env: probe the actual inherited native environment,
|
|
29
|
+
# not a reconstruction from Python's possibly divergent os.environ.
|
|
30
|
+
result = subprocess.run([sys.executable, "-c", probe], check=True,
|
|
31
|
+
capture_output=True, text=True, timeout=20)
|
|
32
|
+
return json.loads(result.stdout)
|
|
33
|
+
|
|
34
|
+
states = [native_state()]
|
|
35
|
+
with mock_environment({mock_key: "synthetic"}):
|
|
36
|
+
assert os.environ[key] == "" and os.environ[mock_key] == "synthetic"
|
|
37
|
+
states.append(native_state())
|
|
38
|
+
assert os.environ is original
|
|
39
|
+
states.append(native_state())
|
|
40
|
+
try:
|
|
41
|
+
with mock_environment({mock_key: "synthetic"}, clear=True):
|
|
42
|
+
assert key not in os.environ and os.environ[mock_key] == "synthetic"
|
|
43
|
+
states.append(native_state())
|
|
44
|
+
raise RuntimeError("synthetic test exit")
|
|
45
|
+
except RuntimeError:
|
|
46
|
+
pass
|
|
47
|
+
assert os.environ is original
|
|
48
|
+
states.append(native_state())
|
|
49
|
+
print(json.dumps(states))
|
|
50
|
+
'''
|
|
51
|
+
result = subprocess.run(
|
|
52
|
+
[sys.executable, "-c", script], cwd=Path(__file__).resolve().parent,
|
|
53
|
+
env=environment, capture_output=True, text=True, timeout=60,
|
|
54
|
+
)
|
|
55
|
+
self.assertEqual(result.returncode, 0, result.stderr)
|
|
56
|
+
# Only two booleans are reported; no inherited environment values leak.
|
|
57
|
+
self.assertEqual(json.loads(result.stdout), [[True, False]] * 5)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
if __name__ == "__main__":
|
|
61
|
+
unittest.main()
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from dataclasses import replace
|
|
4
|
+
import hashlib
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
import tempfile
|
|
7
|
+
from types import SimpleNamespace
|
|
8
|
+
import unittest
|
|
9
|
+
|
|
10
|
+
import yaml
|
|
11
|
+
|
|
12
|
+
from xrefkit.mcp.schemas import ClosureContract, SkillCatalogEntry
|
|
13
|
+
from xrefkit.mcp.skills_extension import SkillsExtension
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def skill(**changes):
|
|
17
|
+
values = dict(
|
|
18
|
+
skill_id="sample_skill", title="Sample", summary="日本語の手順", maturity="trial",
|
|
19
|
+
intent=[], target_artifacts=[], applies_when=[], not_for=[], required_knowledge=[],
|
|
20
|
+
required_tools=[], inputs=[], outputs=[], closure_contract=ClosureContract([], [], "", "required"),
|
|
21
|
+
meta_content="metadata", meta_links=[], skill_content="native procedure", skill_links=[],
|
|
22
|
+
path="skills/sample/SKILL.md", meta_path="skills/sample/meta.md", context_size={},
|
|
23
|
+
)
|
|
24
|
+
values.update(changes)
|
|
25
|
+
return SkillCatalogEntry(**values)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class SkillProjectionTests(unittest.TestCase):
|
|
29
|
+
def extension(self, entries, root=Path(".")):
|
|
30
|
+
return SkillsExtension(SimpleNamespace(skills=entries, repo_root=root))
|
|
31
|
+
|
|
32
|
+
def test_manifest_frontmatter_and_exact_utf8_bytes(self):
|
|
33
|
+
extension = self.extension([skill()])
|
|
34
|
+
entry = extension.list_skills()["skills"][0]
|
|
35
|
+
self.assertEqual(extension.get_skill(entry["uri"])["skill"], entry)
|
|
36
|
+
text = extension.read_resource(entry["uri"])["contents"][0]["text"]
|
|
37
|
+
frontmatter = yaml.safe_load(text.split("---", 2)[1])
|
|
38
|
+
self.assertEqual(frontmatter, entry["frontmatter"])
|
|
39
|
+
self.assertTrue(entry["uri"].endswith(f"/{frontmatter['name']}/SKILL.md"))
|
|
40
|
+
self.assertRegex(frontmatter["name"], r"^[a-z0-9]+(?:-[a-z0-9]+)*$")
|
|
41
|
+
self.assertLessEqual(len(frontmatter["name"]), 64)
|
|
42
|
+
raw = text.encode("utf-8")
|
|
43
|
+
self.assertEqual(entry["resources"], [{"uri": entry["uri"], "digest": "sha256:" + hashlib.sha256(raw).hexdigest(), "size": len(raw)}])
|
|
44
|
+
self.assertNotIn("native procedure", text)
|
|
45
|
+
self.assertIn("get_startup_context", text)
|
|
46
|
+
self.assertIn("bind_skill_run", text)
|
|
47
|
+
self.assertNotIn("allowed-tools", frontmatter)
|
|
48
|
+
|
|
49
|
+
def test_normalized_names_remain_distinct(self):
|
|
50
|
+
entries = self.extension([skill(skill_id="a_b"), skill(skill_id="a-b"), skill(skill_id="A.B"), skill(skill_id="!" * 300)]).list_skills()["skills"]
|
|
51
|
+
self.assertEqual(len({e["uri"] for e in entries}), 4)
|
|
52
|
+
for entry in entries:
|
|
53
|
+
self.assertLessEqual(len(entry["frontmatter"]["name"]), 64)
|
|
54
|
+
|
|
55
|
+
def test_excludes_private_hidden_unpublished_and_conflicted_entries(self):
|
|
56
|
+
entries = [skill(skill_id="public"), skill(skill_id="duplicate"), skill(skill_id="duplicate"),
|
|
57
|
+
skill(skill_id="aliased"), skill(skill_id="owner", legacy_skill_ids=["aliased"]),
|
|
58
|
+
skill(skill_id="private", path="skills_private/example/SKILL.md"),
|
|
59
|
+
skill(skill_id="hidden", zone_metadata={"hidden": True}),
|
|
60
|
+
skill(skill_id="local", zone_metadata={"local_only": True}),
|
|
61
|
+
skill(skill_id="not-distributed", zone_metadata={"distribution": False}),
|
|
62
|
+
skill(skill_id="draft", maturity="draft")]
|
|
63
|
+
actual = {e["frontmatter"]["metadata"]["xrefkit-skill-id"] for e in self.extension(entries).list_skills()["skills"]}
|
|
64
|
+
self.assertEqual(actual, {"public", "owner"})
|
|
65
|
+
|
|
66
|
+
def test_legacy_content_change_changes_manifest(self):
|
|
67
|
+
entry = skill()
|
|
68
|
+
first = self.extension([entry]).list_skills()["skills"][0]
|
|
69
|
+
second = self.extension([replace(entry, skill_content="changed")]).list_skills()["skills"][0]
|
|
70
|
+
self.assertEqual(first["uri"], second["uri"])
|
|
71
|
+
self.assertNotEqual(first["resources"], second["resources"])
|
|
72
|
+
|
|
73
|
+
def test_native_content_changes_and_source_boundary(self):
|
|
74
|
+
with tempfile.TemporaryDirectory() as tmp:
|
|
75
|
+
root = Path(tmp)
|
|
76
|
+
source = root / "SKILL.v1.md"
|
|
77
|
+
source.write_bytes(b"native\r\n")
|
|
78
|
+
entry = skill(path="SKILL.v1.md", definition_format="skill_definition_v1")
|
|
79
|
+
extension = self.extension([entry], root)
|
|
80
|
+
first = extension.list_skills()["skills"][0]
|
|
81
|
+
source.write_bytes(b"changed\n")
|
|
82
|
+
second = extension.get_skill(first["uri"])["skill"]
|
|
83
|
+
self.assertNotEqual(first["resources"], second["resources"])
|
|
84
|
+
self.assertEqual(second["frontmatter"]["metadata"]["xrefkit-source-sha256"], hashlib.sha256(b"changed\n").hexdigest())
|
|
85
|
+
self.assertEqual(self.extension([replace(entry, path="../SKILL.v1.md")], root).list_skills()["skills"], [])
|
|
86
|
+
self.assertEqual(self.extension([replace(entry, path=str(source))], root).list_skills()["skills"], [])
|
|
87
|
+
source.unlink()
|
|
88
|
+
self.assertEqual(extension.list_skills()["skills"], [])
|
|
89
|
+
|
|
90
|
+
def test_symlink_source_is_not_published(self):
|
|
91
|
+
with tempfile.TemporaryDirectory() as tmp:
|
|
92
|
+
root = Path(tmp)
|
|
93
|
+
(root / "actual.md").write_text("source", encoding="utf-8")
|
|
94
|
+
try:
|
|
95
|
+
(root / "SKILL.v1.md").symlink_to(root / "actual.md")
|
|
96
|
+
except OSError:
|
|
97
|
+
self.skipTest("symlink privilege unavailable")
|
|
98
|
+
entry = skill(path="SKILL.v1.md", definition_format="skill_definition_v1")
|
|
99
|
+
self.assertEqual(self.extension([entry], root).list_skills()["skills"], [])
|
|
100
|
+
|
|
101
|
+
def test_package_native_uses_its_declared_root(self):
|
|
102
|
+
with tempfile.TemporaryDirectory() as tmp:
|
|
103
|
+
root = Path(tmp)
|
|
104
|
+
(root / "SKILL.v1.md").write_text("package source", encoding="utf-8")
|
|
105
|
+
entry = skill(path="SKILL.v1.md", definition_format="skill_definition_v1", source_root=tmp, package_id="example.package")
|
|
106
|
+
result = self.extension([entry], root / "other-repo").list_skills()["skills"][0]
|
|
107
|
+
self.assertEqual(result["frontmatter"]["metadata"]["xrefkit-package-id"], "example.package")
|
|
108
|
+
|
|
109
|
+
def test_empty_cursor_and_unknown_paths(self):
|
|
110
|
+
extension = self.extension([])
|
|
111
|
+
self.assertEqual(extension.list_skills(), {"resultType": "complete", "skills": []})
|
|
112
|
+
for cursor in ["", "0", "next"]:
|
|
113
|
+
with self.assertRaises(ValueError):
|
|
114
|
+
extension.list_skills(cursor)
|
|
115
|
+
for uri in ["skill://unknown/SKILL.md", "skill://xrefkit/../SKILL.md", "skill://xrefkit/%2e%2e/SKILL.md", "file:///secret", "skill://xrefkit/test/scripts/run.py"]:
|
|
116
|
+
with self.assertRaises(ValueError):
|
|
117
|
+
extension.get_skill(uri)
|
|
118
|
+
with self.assertRaises(ValueError):
|
|
119
|
+
extension.read_resource(uri)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
if __name__ == "__main__":
|
|
123
|
+
unittest.main()
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from datetime import timedelta
|
|
4
|
+
import hashlib
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
import sys
|
|
7
|
+
import tempfile
|
|
8
|
+
import unittest
|
|
9
|
+
|
|
10
|
+
try:
|
|
11
|
+
import anyio
|
|
12
|
+
from mcp import types
|
|
13
|
+
from mcp.client.session import ClientSession
|
|
14
|
+
from mcp.client.stdio import StdioServerParameters, stdio_client
|
|
15
|
+
from mcp.shared.exceptions import McpError
|
|
16
|
+
except ImportError as exc:
|
|
17
|
+
raise unittest.SkipTest(f"optional MCP integration dependency unavailable: {exc}") from exc
|
|
18
|
+
from pydantic import RootModel
|
|
19
|
+
|
|
20
|
+
from xrefkit.mcp.skills_extension import EXTENSION_ID
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
async def request(session, method, params=None):
|
|
24
|
+
data = {"method": method}
|
|
25
|
+
if params is not None:
|
|
26
|
+
data["params"] = params
|
|
27
|
+
return (await session.send_request(RootModel(data), types.EmptyResult, request_read_timeout_seconds=timedelta(seconds=20))).model_dump(by_alias=True, exclude_none=True)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class SkillsStdioTests(unittest.TestCase):
|
|
31
|
+
def test_actual_server_wire_and_legacy_tools(self):
|
|
32
|
+
async def scenario():
|
|
33
|
+
repo = Path(__file__).resolve().parents[1]
|
|
34
|
+
with tempfile.TemporaryDirectory() as tmp, tempfile.TemporaryFile(mode="w+", encoding="utf-8") as stderr:
|
|
35
|
+
server = StdioServerParameters(command=sys.executable, args=["-m", "xrefkit.mcp.server", "--repo", str(repo), "--audit-log", str(Path(tmp) / "audit.jsonl")], cwd=str(repo))
|
|
36
|
+
async with stdio_client(server, errlog=stderr) as (read, write):
|
|
37
|
+
async with ClientSession(read, write, read_timeout_seconds=timedelta(seconds=30)) as session:
|
|
38
|
+
initialized = await session.initialize()
|
|
39
|
+
self.assertEqual(initialized.protocolVersion, "2025-11-25")
|
|
40
|
+
self.assertEqual(initialized.capabilities.model_extra["extensions"][EXTENSION_ID], {})
|
|
41
|
+
self.assertIsNotNone(initialized.capabilities.resources)
|
|
42
|
+
listing = await request(session, "skills/list", {})
|
|
43
|
+
self.assertEqual(listing["resultType"], "complete")
|
|
44
|
+
self.assertTrue(listing["skills"])
|
|
45
|
+
entry = listing["skills"][0]
|
|
46
|
+
self.assertEqual((await request(session, "skills/get", {"uri": entry["uri"]}))["skill"], entry)
|
|
47
|
+
resource = await session.read_resource(entry["uri"])
|
|
48
|
+
raw = resource.contents[0].text.encode("utf-8")
|
|
49
|
+
self.assertEqual(entry["resources"][0]["digest"], "sha256:" + hashlib.sha256(raw).hexdigest())
|
|
50
|
+
self.assertEqual(entry["resources"][0]["size"], len(raw))
|
|
51
|
+
self.assertIn(entry["uri"], {str(item.uri) for item in (await session.list_resources()).resources})
|
|
52
|
+
# Resource inspection must not have satisfied legacy startup.
|
|
53
|
+
denied = await session.call_tool("get_skill", {"skill_id": entry["frontmatter"]["metadata"]["xrefkit-skill-id"]})
|
|
54
|
+
self.assertTrue(denied.isError)
|
|
55
|
+
tools = {tool.name for tool in (await session.list_tools()).tools}
|
|
56
|
+
self.assertIn("get_startup_context", tools)
|
|
57
|
+
self.assertIn("get_skill", tools)
|
|
58
|
+
self.assertNotIn("skills/list", tools)
|
|
59
|
+
startup = await session.call_tool("get_startup_context", {})
|
|
60
|
+
self.assertFalse(startup.isError)
|
|
61
|
+
native = await session.call_tool("get_skill", {"skill_id": entry["frontmatter"]["metadata"]["xrefkit-skill-id"]})
|
|
62
|
+
self.assertFalse(native.isError)
|
|
63
|
+
for method, params in [("skills/get", {}), ("skills/get", {"uri": True}), ("skills/get", {"uri": None}), ("skills/get", {"uri": []}), ("skills/get", {"uri": "skill://xrefkit/../secret"}), ("skills/list", {"cursor": "unknown"}), ("skills/list", {"cursor": True}), ("skills/list", {"cursor": []}), ("resources/read", {"uri": "skill://xrefkit/%2e%2e/secret"})]:
|
|
64
|
+
with self.subTest(method=method, params=params):
|
|
65
|
+
with self.assertRaises(McpError) as caught:
|
|
66
|
+
await request(session, method, params)
|
|
67
|
+
self.assertEqual(caught.exception.error.code, -32602)
|
|
68
|
+
await session.send_ping()
|
|
69
|
+
anyio.run(scenario)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class SkillsHttpTests(unittest.TestCase):
|
|
73
|
+
def test_http_extension_and_legacy_dispatch(self):
|
|
74
|
+
try:
|
|
75
|
+
from starlette.testclient import TestClient
|
|
76
|
+
except ImportError as exc:
|
|
77
|
+
self.skipTest(f"optional HTTP test dependency unavailable: {exc}")
|
|
78
|
+
from xrefkit.mcp.catalog import XRefCatalog
|
|
79
|
+
from xrefkit.mcp.skills_extension import SkillsExtension
|
|
80
|
+
from xrefkit.mcp.skills_transport import SkillsFastMCP, install_skills_handlers
|
|
81
|
+
|
|
82
|
+
repo = Path(__file__).resolve().parents[1]
|
|
83
|
+
catalog = XRefCatalog.build(repo, discover_packages=False)
|
|
84
|
+
app = SkillsFastMCP("skills-http-test", stateless_http=True, json_response=True)
|
|
85
|
+
install_skills_handlers(app, SkillsExtension(catalog))
|
|
86
|
+
|
|
87
|
+
@app.tool()
|
|
88
|
+
def legacy_echo(value: str) -> str:
|
|
89
|
+
return value
|
|
90
|
+
|
|
91
|
+
with TestClient(app.streamable_http_app(), base_url="http://127.0.0.1:8000") as client:
|
|
92
|
+
def send(method, params):
|
|
93
|
+
response = client.post("/mcp", json={"jsonrpc": "2.0", "id": 1, "method": method, "params": params}, headers={"Accept": "application/json, text/event-stream", "MCP-Protocol-Version": "2025-11-25"})
|
|
94
|
+
self.assertEqual(response.status_code, 200, response.text)
|
|
95
|
+
return response.json()
|
|
96
|
+
|
|
97
|
+
initialized = send("initialize", {"protocolVersion": "2025-11-25", "capabilities": {}, "clientInfo": {"name": "test", "version": "1"}})["result"]
|
|
98
|
+
self.assertEqual(initialized["capabilities"]["extensions"][EXTENSION_ID], {})
|
|
99
|
+
entries = send("skills/list", {})["result"]["skills"]
|
|
100
|
+
self.assertTrue(entries)
|
|
101
|
+
entry = entries[0]
|
|
102
|
+
self.assertEqual(send("skills/get", {"uri": entry["uri"]})["result"]["skill"], entry)
|
|
103
|
+
raw = send("resources/read", {"uri": entry["uri"]})["result"]["contents"][0]["text"].encode("utf-8")
|
|
104
|
+
self.assertEqual(entry["resources"][0]["digest"], "sha256:" + hashlib.sha256(raw).hexdigest())
|
|
105
|
+
self.assertEqual(send("skills/list", {"cursor": None})["error"]["code"], -32602)
|
|
106
|
+
self.assertEqual(send("skills/get", {"uri": "skill://xrefkit/unknown/SKILL.md"})["error"]["code"], -32602)
|
|
107
|
+
result = send("tools/call", {"name": "legacy_echo", "arguments": {"value": "still works"}})["result"]
|
|
108
|
+
self.assertFalse(result["isError"])
|
|
109
|
+
self.assertEqual(result["content"][0]["text"], "still works")
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
if __name__ == "__main__":
|
|
113
|
+
unittest.main()
|
|
@@ -488,7 +488,9 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
488
488
|
dist_base_url = args.public_base_url or f"{scheme}://{args.host}:{args.port}"
|
|
489
489
|
|
|
490
490
|
try:
|
|
491
|
-
from mcp.server.fastmcp import Context
|
|
491
|
+
from mcp.server.fastmcp import Context
|
|
492
|
+
from .skills_transport import SkillsFastMCP, install_skills_handlers
|
|
493
|
+
from .skills_extension import SkillsExtension
|
|
492
494
|
except ImportError as exc:
|
|
493
495
|
raise SystemExit(
|
|
494
496
|
"The MCP server requires the optional dependency: "
|
|
@@ -501,7 +503,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
501
503
|
# there even though it was only imported into this local scope.
|
|
502
504
|
globals()["Context"] = Context
|
|
503
505
|
|
|
504
|
-
app =
|
|
506
|
+
app = SkillsFastMCP(
|
|
505
507
|
"xrefkit-mcp",
|
|
506
508
|
host=args.host,
|
|
507
509
|
port=args.port,
|
|
@@ -509,6 +511,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
509
511
|
log_level=args.log_level.upper(),
|
|
510
512
|
stateless_http=args.stateless_http,
|
|
511
513
|
)
|
|
514
|
+
install_skills_handlers(app, SkillsExtension(catalog))
|
|
512
515
|
|
|
513
516
|
def hidden_admin_tool(*_args: Any, **_kwargs: Any) -> Any:
|
|
514
517
|
return lambda function: function
|