periplus-map 0.2.1__py3-none-any.whl
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.
- periplus/__init__.py +70 -0
- periplus/checkmap.py +80 -0
- periplus/cli.py +658 -0
- periplus/contract/schema/map.schema.json +138 -0
- periplus/contract/schema/navigation.schema.json +200 -0
- periplus/contract/schema/pack-file.schema.json +1405 -0
- periplus/contract/schema/pack-manifest.schema.json +245 -0
- periplus/contract/schema/project-settings.schema.json +85 -0
- periplus/contract/spec/engine.md +151 -0
- periplus/contract/spec/rules.md +352 -0
- periplus/detect.py +228 -0
- periplus/engine/__init__.py +5 -0
- periplus/engine/check.py +481 -0
- periplus/engine/emit.py +368 -0
- periplus/engine/packload.py +2321 -0
- periplus/engine/pattern.py +27 -0
- periplus/engine/rules.py +1946 -0
- periplus/engine/select.py +491 -0
- periplus/engine/source.py +172 -0
- periplus/engine/tree.py +424 -0
- periplus/errors.py +332 -0
- periplus/init.py +358 -0
- periplus/layout.py +28 -0
- periplus/manifest.py +498 -0
- periplus/map.py +364 -0
- periplus/navigate/__init__.py +1 -0
- periplus/navigate/find.py +143 -0
- periplus/navigate/ids.py +30 -0
- periplus/navigate/listing.py +42 -0
- periplus/navigate/mapfile.py +189 -0
- periplus/navigate/path.py +175 -0
- periplus/navigate/show.py +175 -0
- periplus/navigate/types.py +83 -0
- periplus/navigate/walk.py +138 -0
- periplus/packs/advancedqueue_basic@0.0.1/pack.yaml +14 -0
- periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type.yaml +9 -0
- periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type_annotation.yaml +43 -0
- periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type_attribute.yaml +43 -0
- periplus/packs/ai_basic@0.0.1/ai_agent/ai_agent.yaml +8 -0
- periplus/packs/ai_basic@0.0.1/ai_agent/ai_agent_attribute.yaml +43 -0
- periplus/packs/ai_basic@0.0.1/ai_function_call/ai_function_call.yaml +8 -0
- periplus/packs/ai_basic@0.0.1/ai_function_call/ai_function_call_attribute.yaml +43 -0
- periplus/packs/ai_basic@0.0.1/pack.yaml +15 -0
- periplus/packs/config_pages_basic@0.0.1/bundle/config_pages_bundle_config.yaml +54 -0
- periplus/packs/config_pages_basic@0.0.1/pack.yaml +11 -0
- periplus/packs/crop_basic@0.0.1/bundle/crop_bundle_config.yaml +54 -0
- periplus/packs/crop_basic@0.0.1/pack.yaml +11 -0
- periplus/packs/drupal@0.1.0/block/block_placement.yaml +25 -0
- periplus/packs/drupal@0.1.0/block/block_placement_code.yaml +58 -0
- periplus/packs/drupal@0.1.0/block/block_placement_config.yaml +53 -0
- periplus/packs/drupal@0.1.0/block/block_plugin.yaml +52 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_altered.yaml +61 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_annotation.yaml +69 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_attribute.yaml +56 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_content.yaml +46 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_derived.yaml +110 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_deriver.yaml +30 -0
- periplus/packs/drupal@0.1.0/block/block_type.yaml +14 -0
- periplus/packs/drupal@0.1.0/block/block_type_code.yaml +43 -0
- periplus/packs/drupal@0.1.0/block/block_type_config.yaml +45 -0
- periplus/packs/drupal@0.1.0/cache/cache.yaml +18 -0
- periplus/packs/drupal@0.1.0/cache/cache_backend.yaml +31 -0
- periplus/packs/drupal@0.1.0/component/sdc.yaml +19 -0
- periplus/packs/drupal@0.1.0/component/sdc_definition.yaml +25 -0
- periplus/packs/drupal@0.1.0/component/sdc_use.yaml +25 -0
- periplus/packs/drupal@0.1.0/config/config_object.yaml +65 -0
- periplus/packs/drupal@0.1.0/display/display.yaml +32 -0
- periplus/packs/drupal@0.1.0/display/display_code.yaml +53 -0
- periplus/packs/drupal@0.1.0/display/display_config.yaml +95 -0
- periplus/packs/drupal@0.1.0/entity/entity.yaml +33 -0
- periplus/packs/drupal@0.1.0/entity/entity_class.yaml +60 -0
- periplus/packs/drupal@0.1.0/entity/entity_save.yaml +27 -0
- periplus/packs/drupal@0.1.0/entity/entity_type_annotation.yaml +85 -0
- periplus/packs/drupal@0.1.0/entity/entity_type_attribute.yaml +76 -0
- periplus/packs/drupal@0.1.0/field/field_instance_code.yaml +40 -0
- periplus/packs/drupal@0.1.0/field/field_instance_config.yaml +58 -0
- periplus/packs/drupal@0.1.0/field/field_storage.yaml +37 -0
- periplus/packs/drupal@0.1.0/field/field_storage_code.yaml +39 -0
- periplus/packs/drupal@0.1.0/field/field_storage_config.yaml +24 -0
- periplus/packs/drupal@0.1.0/form/form.yaml +48 -0
- periplus/packs/drupal@0.1.0/form/form_class.yaml +50 -0
- periplus/packs/drupal@0.1.0/form/form_id.yaml +48 -0
- periplus/packs/drupal@0.1.0/form/form_methods.yaml +39 -0
- periplus/packs/drupal@0.1.0/hook/hook.yaml +8 -0
- periplus/packs/drupal@0.1.0/hook/hook_attribute.yaml +28 -0
- periplus/packs/drupal@0.1.0/module/module.yaml +8 -0
- periplus/packs/drupal@0.1.0/module/module_info.yaml +50 -0
- periplus/packs/drupal@0.1.0/pack.yaml +184 -0
- periplus/packs/drupal@0.1.0/plugin/plugin.yaml +17 -0
- periplus/packs/drupal@0.1.0/plugin/plugin_annotation.yaml +120 -0
- periplus/packs/drupal@0.1.0/recommendations/recommendations.yaml +14 -0
- periplus/packs/drupal@0.1.0/service/service.yaml +19 -0
- periplus/packs/drupal@0.1.0/service/service_autowire.yaml +28 -0
- periplus/packs/drupal@0.1.0/service/service_definition.yaml +24 -0
- periplus/packs/drupal@0.1.0/service/service_use.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/action/action.yaml +9 -0
- periplus/packs/drupal_basic@0.3.0/action/action_annotation.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/action/action_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/block/block_placement.yaml +16 -0
- periplus/packs/drupal_basic@0.3.0/block/block_placement_config.yaml +51 -0
- periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin.yaml +14 -0
- periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin_annotation.yaml +47 -0
- periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/block_type/block_type.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/block_type/block_type_config.yaml +54 -0
- periplus/packs/drupal_basic@0.3.0/boundary/boundary_types.yaml +19 -0
- periplus/packs/drupal_basic@0.3.0/bundle/bundle.yaml +20 -0
- periplus/packs/drupal_basic@0.3.0/bundle/bundle_config.yaml +393 -0
- periplus/packs/drupal_basic@0.3.0/call/call.yaml +349 -0
- periplus/packs/drupal_basic@0.3.0/component/component.yaml +30 -0
- periplus/packs/drupal_basic@0.3.0/config/config_object.yaml +119 -0
- periplus/packs/drupal_basic@0.3.0/constraint/constraint.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/constraint/constraint_annotation.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/constraint/constraint_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/display/display.yaml +30 -0
- periplus/packs/drupal_basic@0.3.0/display/display_config.yaml +203 -0
- periplus/packs/drupal_basic@0.3.0/display/display_mode_config.yaml +60 -0
- periplus/packs/drupal_basic@0.3.0/entity_type/config_entity_type_annotation.yaml +46 -0
- periplus/packs/drupal_basic@0.3.0/entity_type/config_entity_type_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/entity_type/content_entity_type_annotation.yaml +46 -0
- periplus/packs/drupal_basic@0.3.0/entity_type/content_entity_type_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/entity_type/entity_type.yaml +16 -0
- periplus/packs/drupal_basic@0.3.0/field/field_instance_config.yaml +116 -0
- periplus/packs/drupal_basic@0.3.0/field/field_storage.yaml +21 -0
- periplus/packs/drupal_basic@0.3.0/field/field_storage_config.yaml +45 -0
- periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter_annotation.yaml +46 -0
- periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/field_type/field_type_annotation.yaml +46 -0
- periplus/packs/drupal_basic@0.3.0/field_type/field_type_attribute.yaml +50 -0
- periplus/packs/drupal_basic@0.3.0/field_widget/field_widget_annotation.yaml +46 -0
- periplus/packs/drupal_basic@0.3.0/field_widget/field_widget_attribute.yaml +50 -0
- periplus/packs/drupal_basic@0.3.0/form/form_id.yaml +80 -0
- periplus/packs/drupal_basic@0.3.0/hook/hook.yaml +100 -0
- periplus/packs/drupal_basic@0.3.0/hook/hook_attribute.yaml +64 -0
- periplus/packs/drupal_basic@0.3.0/hook/hook_theme_include.yaml +34 -0
- periplus/packs/drupal_basic@0.3.0/library/library.yaml +12 -0
- periplus/packs/drupal_basic@0.3.0/library/library_definition.yaml +58 -0
- periplus/packs/drupal_basic@0.3.0/local_action/local_action.yaml +12 -0
- periplus/packs/drupal_basic@0.3.0/local_action/local_action_definition.yaml +49 -0
- periplus/packs/drupal_basic@0.3.0/mail/mail.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/mail/mail_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/media_source/media_source.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/media_source/media_source_annotation.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/media_source/media_source_attribute.yaml +79 -0
- periplus/packs/drupal_basic@0.3.0/menu_link/menu_link.yaml +18 -0
- periplus/packs/drupal_basic@0.3.0/menu_link/menu_link_definition.yaml +48 -0
- periplus/packs/drupal_basic@0.3.0/module/module.yaml +7 -0
- periplus/packs/drupal_basic@0.3.0/module/module_info.yaml +58 -0
- periplus/packs/drupal_basic@0.3.0/pack.yaml +528 -0
- periplus/packs/drupal_basic@0.3.0/permission/permission.yaml +7 -0
- periplus/packs/drupal_basic@0.3.0/permission/permission_definition.yaml +27 -0
- periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker.yaml +9 -0
- periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker_annotation.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource_annotation.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/role/role.yaml +14 -0
- periplus/packs/drupal_basic@0.3.0/role/role_config.yaml +44 -0
- periplus/packs/drupal_basic@0.3.0/route/route.yaml +42 -0
- periplus/packs/drupal_basic@0.3.0/route/route_definition.yaml +113 -0
- periplus/packs/drupal_basic@0.3.0/route/route_options.yaml +55 -0
- periplus/packs/drupal_basic@0.3.0/route/route_requirements.yaml +108 -0
- periplus/packs/drupal_basic@0.3.0/service/service.yaml +56 -0
- periplus/packs/drupal_basic@0.3.0/service/service_definition.yaml +181 -0
- periplus/packs/drupal_basic@0.3.0/template/template.yaml +86 -0
- periplus/packs/drupal_basic@0.3.0/template/template_route_link.yaml +30 -0
- periplus/packs/drupal_basic@0.3.0/theme/theme.yaml +15 -0
- periplus/packs/drupal_basic@0.3.0/theme/theme_info.yaml +61 -0
- periplus/packs/drupal_basic@0.3.0/theme_hook/template_suggestion.yaml +29 -0
- periplus/packs/drupal_basic@0.3.0/theme_hook/theme_hook.yaml +87 -0
- periplus/packs/drupal_basic@0.3.0/theme_hook/theme_hook_render.yaml +20 -0
- periplus/packs/drupal_basic@0.3.0/url/url.yaml +88 -0
- periplus/packs/drupal_basic@0.3.0/views_plugin/views_field_attribute.yaml +80 -0
- periplus/packs/drupal_basic@0.3.0/views_plugin/views_filter_attribute.yaml +80 -0
- periplus/packs/drupal_basic@0.3.0/views_plugin/views_plugin.yaml +15 -0
- periplus/packs/drupal_basic@0.3.0/views_plugin/views_style_attribute.yaml +80 -0
- periplus/packs/drupal_js_basic@0.0.1/attachment/attachment.yaml +12 -0
- periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_php.yaml +15 -0
- periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_php_array.yaml +52 -0
- periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_twig.yaml +26 -0
- periplus/packs/drupal_js_basic@0.0.1/attachment/php_function_holder.yaml +13 -0
- periplus/packs/drupal_js_basic@0.0.1/behavior/behavior.yaml +198 -0
- periplus/packs/drupal_js_basic@0.0.1/pack.yaml +153 -0
- periplus/packs/drupal_js_basic@0.0.1/setting/setting.yaml +13 -0
- periplus/packs/drupal_js_basic@0.0.1/setting/setting_in_js.yaml +15 -0
- periplus/packs/drupal_js_basic@0.0.1/setting/setting_in_php.yaml +92 -0
- periplus/packs/drush_basic@0.0.1/command/command.yaml +15 -0
- periplus/packs/drush_basic@0.0.1/command/command_annotation.yaml +60 -0
- periplus/packs/drush_basic@0.0.1/command/command_attribute.yaml +88 -0
- periplus/packs/drush_basic@0.0.1/pack.yaml +29 -0
- periplus/packs/eck_basic@0.0.1/bundle/eck_bundle_config.yaml +56 -0
- periplus/packs/eck_basic@0.0.1/entity_type/eck_entity_type_config.yaml +26 -0
- periplus/packs/eck_basic@0.0.1/pack.yaml +28 -0
- periplus/packs/go@0.0.2/interfaces/satisfies.yaml +47 -0
- periplus/packs/go@0.0.2/pack.yaml +51 -0
- periplus/packs/go@0.0.2/types/find_declarations.yaml +137 -0
- periplus/packs/go@0.0.2/types/node_types.yaml +36 -0
- periplus/packs/go_basic@0.0.3/pack.yaml +104 -0
- periplus/packs/go_basic@0.0.3/rules/calls.yaml +25 -0
- periplus/packs/go_basic@0.0.3/rules/declarations.yaml +40 -0
- periplus/packs/go_basic@0.0.3/rules/imports.yaml +16 -0
- periplus/packs/go_basic@0.0.3/types/node_types.yaml +15 -0
- periplus/packs/js_basic@0.0.1/function/function.yaml +68 -0
- periplus/packs/js_basic@0.0.1/pack.yaml +50 -0
- periplus/packs/laravel_basic@0.0.5/pack.yaml +313 -0
- periplus/packs/laravel_basic@0.0.5/rules/classes.yaml +42 -0
- periplus/packs/laravel_basic@0.0.5/rules/config.yaml +229 -0
- periplus/packs/laravel_basic@0.0.5/rules/routes.yaml +210 -0
- periplus/packs/laravel_basic@0.0.5/rules/types.yaml +50 -0
- periplus/packs/laravel_basic@0.0.5/rules/views.yaml +100 -0
- periplus/packs/paragraphs_basic@0.0.1/bundle/paragraph_bundle_config.yaml +54 -0
- periplus/packs/paragraphs_basic@0.0.1/pack.yaml +12 -0
- periplus/packs/php@0.1.0/edges/edge_kinds.yaml +64 -0
- periplus/packs/php@0.1.0/edges/find_calls.yaml +34 -0
- periplus/packs/php@0.1.0/edges/find_imports.yaml +18 -0
- periplus/packs/php@0.1.0/edges/find_member_access.yaml +22 -0
- periplus/packs/php@0.1.0/edges/find_structure.yaml +38 -0
- periplus/packs/php@0.1.0/embedded/embedded_regions.yaml +19 -0
- periplus/packs/php@0.1.0/imports/imports.yaml +20 -0
- periplus/packs/php@0.1.0/pack.yaml +117 -0
- periplus/packs/php@0.1.0/resolution/excluded_tokens.yaml +23 -0
- periplus/packs/php@0.1.0/resolution/resolution.yaml +35 -0
- periplus/packs/php@0.1.0/types/find_declarations.yaml +102 -0
- periplus/packs/php@0.1.0/types/node_types.yaml +55 -0
- periplus/packs/php_basic@0.2.0/edges/edge_kinds.yaml +48 -0
- periplus/packs/php_basic@0.2.0/edges/find_structure.yaml +750 -0
- periplus/packs/php_basic@0.2.0/imports/imports.yaml +19 -0
- periplus/packs/php_basic@0.2.0/pack.yaml +94 -0
- periplus/packs/php_basic@0.2.0/types/find_declarations.yaml +267 -0
- periplus/packs/php_basic@0.2.0/types/node_types.yaml +55 -0
- periplus/packs/profile_basic@0.0.1/bundle/profile_bundle_config.yaml +54 -0
- periplus/packs/profile_basic@0.0.1/pack.yaml +12 -0
- periplus/packs/salesforce_basic@0.0.1/event/salesforce_event.yaml +36 -0
- periplus/packs/salesforce_basic@0.0.1/pack.yaml +31 -0
- periplus/packs/salesforce_basic@0.0.1/salesforce_mapping/salesforce_mapping.yaml +19 -0
- periplus/packs/salesforce_basic@0.0.1/salesforce_mapping/salesforce_mapping_config.yaml +83 -0
- periplus/packs/salesforce_basic@0.0.1/salesforce_mapping_field/salesforce_mapping_field.yaml +8 -0
- periplus/packs/salesforce_basic@0.0.1/salesforce_mapping_field/salesforce_mapping_field_annotation.yaml +43 -0
- periplus/packs/twig@0.0.1/pack.yaml +26 -0
- periplus/packs/twig@0.0.1/types/template.yaml +57 -0
- periplus/packs/twig_basic@0.1.0/pack.yaml +11 -0
- periplus/packs/twig_tweak_basic@0.0.1/pack.yaml +27 -0
- periplus/packs/twig_tweak_basic@0.0.1/rules/block.yaml +20 -0
- periplus/packs/twig_tweak_basic@0.0.1/rules/entity.yaml +35 -0
- periplus/packs/twig_tweak_basic@0.0.1/rules/field.yaml +21 -0
- periplus/packs/twig_tweak_basic@0.0.1/rules/menu.yaml +21 -0
- periplus/packs/webform_basic@0.0.1/bundle/webform_submission_bundle_config.yaml +54 -0
- periplus/packs/webform_basic@0.0.1/pack.yaml +20 -0
- periplus/packs/webform_basic@0.0.1/webform_handler/webform_handler.yaml +8 -0
- periplus/packs/webform_basic@0.0.1/webform_handler/webform_handler_annotation.yaml +43 -0
- periplus/packs/yaml@0.0.1/pack.yaml +72 -0
- periplus/packs/yaml@0.0.1/types/find_mapping_entry.yaml +21 -0
- periplus/packs/yaml@0.0.1/types/yaml_types.yaml +44 -0
- periplus/packs/yaml_basic@0.1.0/pack.yaml +10 -0
- periplus/packs.py +447 -0
- periplus/preflight.py +102 -0
- periplus/py.typed +0 -0
- periplus/report.py +596 -0
- periplus/resolution.py +355 -0
- periplus/settings.py +617 -0
- periplus/settings.stub.yml +99 -0
- periplus/spec.py +774 -0
- periplus/update.py +197 -0
- periplus/validate.py +655 -0
- periplus_map-0.2.1.dist-info/METADATA +566 -0
- periplus_map-0.2.1.dist-info/RECORD +272 -0
- periplus_map-0.2.1.dist-info/WHEEL +4 -0
- periplus_map-0.2.1.dist-info/entry_points.txt +2 -0
- periplus_map-0.2.1.dist-info/licenses/LICENSE +202 -0
- periplus_map-0.2.1.dist-info/licenses/NOTICE +2 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://periplus.dev/schema/0/map.schema.json",
|
|
4
|
+
"title": "Periplus map",
|
|
5
|
+
"description": "The emitted artifact. A committed lockfile, reviewed in a pull request, byte-identical across machines, locales and runs. Its shape stays stable while packs churn: a new domain type changes what is in the map and never its structure. Derived from two worked maps — one hand-transcribed from a Drupal module, one produced by the engine from gopkg.in/yaml.v2.",
|
|
6
|
+
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": ["periplus_map_version", "packs", "roots", "nodes", "edges"],
|
|
10
|
+
"properties": {
|
|
11
|
+
|
|
12
|
+
"periplus_map_version": {"type": "integer", "minimum": 0},
|
|
13
|
+
|
|
14
|
+
"generated_by": {"type": "string"},
|
|
15
|
+
|
|
16
|
+
"packs": {
|
|
17
|
+
"type": "array", "minItems": 1,
|
|
18
|
+
"items": {
|
|
19
|
+
"type": "object", "additionalProperties": false, "required": ["pack", "version"],
|
|
20
|
+
"properties": {"pack": {"type": "string"}, "version": {"type": "string"}}
|
|
21
|
+
},
|
|
22
|
+
"description": "The declared pack set. The determinism claim is precisely this: the same first-party code plus the same declared packs produces the same map."
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
"settings": {"type": "string", "description": "Path to the project settings file this run used."},
|
|
26
|
+
"roots": {"type": "array", "items": {"type": "string"}, "minItems": 1},
|
|
27
|
+
|
|
28
|
+
"type_hierarchy": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object", "additionalProperties": false, "required": ["type"],
|
|
32
|
+
"properties": {"type": {"type": "string"}, "parent": {"type": ["string", "null"]}}
|
|
33
|
+
},
|
|
34
|
+
"description": "The closure of types this map actually used — not the packs, just the hierarchy. It is what lets a finder answer \"every method here\" without loading a pack, which is one of the five properties. Measured cost on a 84-node map: 19 rows."
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
"counts": {"type": "object", "description": "Derived from nodes and edges. Present so a diff shows a shape change at the top of the file rather than only in the body."},
|
|
38
|
+
|
|
39
|
+
"nodes": {"type": "array", "items": {"$ref": "#/$defs/node"}},
|
|
40
|
+
"edges": {"type": "array", "items": {"$ref": "#/$defs/edge"}}
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
"$defs": {
|
|
44
|
+
|
|
45
|
+
"node": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": false,
|
|
48
|
+
"required": ["id", "type", "state", "locations", "provenance"],
|
|
49
|
+
"if": {"properties": {"state": {"const": "unresolved"}}, "required": ["state", "unresolved_detail"]},
|
|
50
|
+
"then": {"properties": {"unresolved_detail": {"required": ["types_tried"]}}},
|
|
51
|
+
"properties": {
|
|
52
|
+
|
|
53
|
+
"id": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"pattern": "^(?!None::)(?!::).*::",
|
|
56
|
+
"description": "<id namespace>::<name>. The namespace is never empty and never the literal None; that it is one a loaded pack declares is checked by periplus map before writing, since the schema cannot know the packs. Namespaced, and minted from the thing rather than from the rule that found it. Renaming a rule must not churn ids across the map. Two config files in one Drupal module carry the same internal id, so machine names alone are not unique and the namespace is load-bearing."
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
"type": {"type": "string", "description": "Exactly one. A second matching type is a real collision and the build refuses."},
|
|
60
|
+
"roles": {"type": "array", "items": {"type": "string"}, "description": "Capabilities, which accumulate and never collide. One cache backend that also invalidates tags is not ambiguous."},
|
|
61
|
+
|
|
62
|
+
"state": {
|
|
63
|
+
"enum": ["mapped", "declared", "referenced", "unresolved", "out_of_reach"],
|
|
64
|
+
"description": "How much of the thing is known — a different question from rule confidence, which says how sure we are the rule fired correctly. The state decides which edges are legal: a declared node can be the target of a typed edge, a referenced one only a generic edge. mapped: read it, first-party. declared: not read, but a pack describes it. referenced: saw the name, nothing describes it. unresolved: a rule looked and failed, and this node records what it was doing. out_of_reach: not code, not in the repository, and no pack change will ever resolve it."
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
"locations": {
|
|
68
|
+
"type": "array", "items": {"$ref": "#/$defs/location"},
|
|
69
|
+
"description": "Normally one. Sometimes several: Go assembles a package from declarations in any file, and Elixir writes one function as multiple clauses. Measured: one package node in gopkg.in/yaml.v2 carries 13 locations from 13 files. A node with zero locations is a boundary node the map never read."
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
"attributes": {"type": "object", "description": "Values a rule read or computed. No prose."},
|
|
73
|
+
|
|
74
|
+
"provenance": {
|
|
75
|
+
"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/provenance"},
|
|
76
|
+
"description": "Which pack, which rule, at what confidence, and what it set. This is what makes a wrong entry fixable rather than merely wrong, and what turns the map into a worklist instead of a verdict. Several entries mean several rules contributed to one node, which is the merge model working."
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
"source_hash": {
|
|
80
|
+
"type": "string", "pattern": "^[a-f0-9]{64}$",
|
|
81
|
+
"description": "SHA-256 of the source this node was read from. This is the whole of the map's connection to descriptions. A description is written once by a model, reviewed and committed in a SEPARATE artifact keyed by node id, recording the hash it was written against. Comparing that hash to this one tells a current description from a stale one, and limits a regeneration pass to the nodes that actually moved. The prose never enters the map, because the determinism gate extracts twice and byte-compares, and a model writing during extraction fails on the first run."
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
"unresolved_detail": {
|
|
85
|
+
"type": "object", "additionalProperties": false,
|
|
86
|
+
"required": ["rule", "searched_for", "found"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"rule": {"type": "string"},
|
|
89
|
+
"searched_for": {"type": "string"},
|
|
90
|
+
"found": {"type": "string"},
|
|
91
|
+
"why_permanent": {"type": ["string", "null"]},
|
|
92
|
+
"types_tried": {"type": "array", "items": {"type": "string"}, "minItems": 1, "description": "The end's candidate types, in the order the build tried them. The node's type is the first, so its id does not depend on which candidates a rule lists."}
|
|
93
|
+
},
|
|
94
|
+
"description": "Required in spirit whenever state is unresolved or out_of_reach. \"Unresolved\" alone is a shrug; the entry has to read as \"add an anchor for this symbol\" rather than \"unknown\". Every failure in the record that motivated this project was silent, and the graph still looked populated."
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
"edge": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": false,
|
|
102
|
+
"required": ["kind", "from", "to", "locations", "provenance"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"kind": {"type": "string"},
|
|
105
|
+
"from": {"type": "string", "description": "Must name a node present in the map. The ordinary foreign key, and the engine's job because the engine is the thing that reads."},
|
|
106
|
+
"to": {"type": "string"},
|
|
107
|
+
"occurrences": {
|
|
108
|
+
"type": "integer", "minimum": 1,
|
|
109
|
+
"description": "Not a refinement. Deduplicating edges per pair was measured at 186 caller functions against 303 call sites, and \"show me every place this gets called\" is unanswerable from a map that keeps one line per pair."
|
|
110
|
+
},
|
|
111
|
+
"locations": {
|
|
112
|
+
"type": "array", "items": {"$ref": "#/$defs/location"},
|
|
113
|
+
"description": "Where the RELATIONSHIP is written — the extends clause, the call site — which is often nowhere near either endpoint."
|
|
114
|
+
},
|
|
115
|
+
"attributes": {"type": "object"},
|
|
116
|
+
"provenance": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/provenance"}}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
"location": {
|
|
121
|
+
"type": "object", "additionalProperties": false, "required": ["file", "line"],
|
|
122
|
+
"properties": {
|
|
123
|
+
"file": {"type": "string", "description": "Repository-relative, forward slashes. Never absolute: an absolute path differs per machine and breaks the byte-identical guarantee."},
|
|
124
|
+
"line": {"type": "integer", "minimum": 1}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
|
|
128
|
+
"provenance": {
|
|
129
|
+
"type": "object", "additionalProperties": false, "required": ["pack", "rule"],
|
|
130
|
+
"properties": {
|
|
131
|
+
"pack": {"type": "string"},
|
|
132
|
+
"rule": {"type": "string", "description": "The rule's `rule:` key. This is why a rule needs a name at all, and why the name must not be lost."},
|
|
133
|
+
"confidence": {"enum": ["declared", "inferred"]},
|
|
134
|
+
"sets": {"type": "array", "items": {"type": "string"}, "description": "Which values this contribution set. Two contributions setting the same value differently is a conflict; two setting different values is a merge. A module's config/install and the site's export legitimately hold the same id with different contents, and recording who set what keeps that drift answerable instead of one side silently winning."}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://periplus.dev/schema/0/navigation.schema.json",
|
|
4
|
+
"title": "Periplus navigation result",
|
|
5
|
+
"description": "What `--format json` prints for the navigation commands: types, find, show, neighbors, affected and path. Each command has one definition under $defs, and the root accepts any of them. A command that returns a list wraps it in the shared listing: items, total (every item there was), shown (how many items are here) and truncated (true when --limit cut the list). Output is deterministic: keys sorted, ASCII only.",
|
|
6
|
+
|
|
7
|
+
"anyOf": [
|
|
8
|
+
{"$ref": "#/$defs/types"},
|
|
9
|
+
{"$ref": "#/$defs/find"},
|
|
10
|
+
{"$ref": "#/$defs/show"},
|
|
11
|
+
{"$ref": "#/$defs/neighbors"},
|
|
12
|
+
{"$ref": "#/$defs/affected"},
|
|
13
|
+
{"$ref": "#/$defs/path"}
|
|
14
|
+
],
|
|
15
|
+
|
|
16
|
+
"$defs": {
|
|
17
|
+
|
|
18
|
+
"problem": {
|
|
19
|
+
"type": "object", "additionalProperties": false, "required": ["code", "message", "detail"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"code": {"type": "integer"},
|
|
22
|
+
"message": {"type": "string"},
|
|
23
|
+
"detail": {"type": "object"}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"problems": {"type": "array", "items": {"$ref": "#/$defs/problem"}},
|
|
27
|
+
"warnings": {"type": "array", "items": {"type": "string"}},
|
|
28
|
+
|
|
29
|
+
"location": {
|
|
30
|
+
"type": "object", "required": ["file", "line"],
|
|
31
|
+
"properties": {"file": {"type": "string"}, "line": {"type": "integer"}}
|
|
32
|
+
},
|
|
33
|
+
"provenance": {
|
|
34
|
+
"type": "object", "required": ["pack", "rule"],
|
|
35
|
+
"properties": {
|
|
36
|
+
"pack": {"type": "string"},
|
|
37
|
+
"rule": {"type": "string"},
|
|
38
|
+
"confidence": {"enum": ["declared", "inferred"]},
|
|
39
|
+
"sets": {"type": "array", "items": {"type": "string"}}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
"listing": {
|
|
44
|
+
"description": "The shared cut list. The items schema is supplied by the command that uses it.",
|
|
45
|
+
"type": "object", "additionalProperties": false, "required": ["items", "total", "shown", "truncated"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"items": {"type": "array"},
|
|
48
|
+
"total": {"type": "integer", "minimum": 0},
|
|
49
|
+
"shown": {"type": "integer", "minimum": 0},
|
|
50
|
+
"truncated": {"type": "boolean"}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
"types": {
|
|
55
|
+
"type": "object", "additionalProperties": false, "required": ["node_types", "edge_kinds", "problems"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"node_types": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "object", "additionalProperties": false, "required": ["type", "count", "parent"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"type": {"type": "string"},
|
|
63
|
+
"count": {"type": "integer", "minimum": 0},
|
|
64
|
+
"parent": {"type": ["string", "null"]}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"edge_kinds": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": {
|
|
71
|
+
"type": "object", "additionalProperties": false, "required": ["kind", "count"],
|
|
72
|
+
"properties": {"kind": {"type": "string"}, "count": {"type": "integer", "minimum": 0}}
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"problems": {"$ref": "#/$defs/problems"}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
"find": {
|
|
80
|
+
"type": "object", "additionalProperties": false,
|
|
81
|
+
"required": ["items", "total", "shown", "truncated", "warnings", "problems"],
|
|
82
|
+
"properties": {
|
|
83
|
+
"items": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "object", "additionalProperties": false, "required": ["id", "type", "state", "location"],
|
|
87
|
+
"properties": {
|
|
88
|
+
"id": {"type": "string"},
|
|
89
|
+
"type": {"type": "string"},
|
|
90
|
+
"state": {"type": "string"},
|
|
91
|
+
"location": {"type": ["string", "null"]}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"total": {"type": "integer", "minimum": 0},
|
|
96
|
+
"shown": {"type": "integer", "minimum": 0},
|
|
97
|
+
"truncated": {"type": "boolean"},
|
|
98
|
+
"warnings": {"$ref": "#/$defs/warnings"},
|
|
99
|
+
"problems": {"$ref": "#/$defs/problems"}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
"edge_row": {
|
|
104
|
+
"type": "object", "additionalProperties": false,
|
|
105
|
+
"required": ["kind", "other", "other_type", "other_state", "locations", "occurrences", "confidences", "rules"],
|
|
106
|
+
"properties": {
|
|
107
|
+
"kind": {"type": "string"},
|
|
108
|
+
"other": {"type": "string"},
|
|
109
|
+
"other_type": {"type": "string"},
|
|
110
|
+
"other_state": {"type": "string"},
|
|
111
|
+
"locations": {"type": "array", "items": {"$ref": "#/$defs/location"}},
|
|
112
|
+
"occurrences": {"type": ["integer", "null"]},
|
|
113
|
+
"confidences": {"type": "array", "items": {"enum": ["declared", "inferred"]}},
|
|
114
|
+
"rules": {"type": "array", "items": {"type": "string"}}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"edge_listing": {
|
|
118
|
+
"allOf": [{"$ref": "#/$defs/listing"}],
|
|
119
|
+
"properties": {"items": {"type": "array", "items": {"$ref": "#/$defs/edge_row"}}}
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
"show": {
|
|
123
|
+
"type": "object", "additionalProperties": false,
|
|
124
|
+
"required": ["id", "type", "state", "roles", "attributes", "locations", "provenance", "outgoing", "incoming", "problems"],
|
|
125
|
+
"properties": {
|
|
126
|
+
"id": {"type": "string"},
|
|
127
|
+
"type": {"type": "string"},
|
|
128
|
+
"state": {"type": "string"},
|
|
129
|
+
"roles": {"type": "array", "items": {"type": "string"}},
|
|
130
|
+
"attributes": {"type": "object"},
|
|
131
|
+
"locations": {"type": "array", "items": {"$ref": "#/$defs/location"}},
|
|
132
|
+
"provenance": {"type": "array", "items": {"$ref": "#/$defs/provenance"}},
|
|
133
|
+
"outgoing": {"$ref": "#/$defs/edge_listing"},
|
|
134
|
+
"incoming": {"$ref": "#/$defs/edge_listing"},
|
|
135
|
+
"problems": {"$ref": "#/$defs/problems"}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
"walk": {
|
|
140
|
+
"type": "object", "additionalProperties": false, "required": ["start", "direction", "rows", "warnings", "problems"],
|
|
141
|
+
"properties": {
|
|
142
|
+
"start": {"type": "string"},
|
|
143
|
+
"direction": {"enum": ["out", "in"]},
|
|
144
|
+
"rows": {
|
|
145
|
+
"allOf": [{"$ref": "#/$defs/listing"}],
|
|
146
|
+
"properties": {
|
|
147
|
+
"items": {
|
|
148
|
+
"type": "array",
|
|
149
|
+
"items": {
|
|
150
|
+
"type": "object", "additionalProperties": false,
|
|
151
|
+
"required": ["id", "type", "state", "depth", "kind", "via"],
|
|
152
|
+
"properties": {
|
|
153
|
+
"id": {"type": "string"},
|
|
154
|
+
"type": {"type": "string"},
|
|
155
|
+
"state": {"type": "string"},
|
|
156
|
+
"depth": {"type": "integer", "minimum": 1},
|
|
157
|
+
"kind": {"type": "string"},
|
|
158
|
+
"via": {"type": "string"}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"warnings": {"$ref": "#/$defs/warnings"},
|
|
165
|
+
"problems": {"$ref": "#/$defs/problems"}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"neighbors": {"allOf": [{"$ref": "#/$defs/walk"}], "properties": {"direction": {"const": "out"}}},
|
|
169
|
+
"affected": {"allOf": [{"$ref": "#/$defs/walk"}], "properties": {"direction": {"const": "in"}}},
|
|
170
|
+
|
|
171
|
+
"path": {
|
|
172
|
+
"type": "object", "additionalProperties": false, "required": ["from", "to", "chains", "warnings", "problems"],
|
|
173
|
+
"properties": {
|
|
174
|
+
"from": {"type": "string"},
|
|
175
|
+
"to": {"type": "string"},
|
|
176
|
+
"chains": {
|
|
177
|
+
"allOf": [{"$ref": "#/$defs/listing"}],
|
|
178
|
+
"properties": {
|
|
179
|
+
"items": {
|
|
180
|
+
"type": "array",
|
|
181
|
+
"items": {
|
|
182
|
+
"type": "array",
|
|
183
|
+
"items": {
|
|
184
|
+
"type": "object", "additionalProperties": false, "required": ["from", "kind", "to"],
|
|
185
|
+
"properties": {
|
|
186
|
+
"from": {"type": "string"},
|
|
187
|
+
"kind": {"type": "string"},
|
|
188
|
+
"to": {"type": "string"}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"warnings": {"$ref": "#/$defs/warnings"},
|
|
196
|
+
"problems": {"$ref": "#/$defs/problems"}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|