|
33 | 33 | # The quantifier is `+`, not `*`, so an empty label stays unmatched as before. |
34 | 34 | LINK_RE = re.compile(r"\[((?:\[[^\[\]]*\]|[^\]])+)\]\(([^)]+)\)") |
35 | 35 |
|
36 | | -# Common typed-edge relations (non-breaking; Markdown links remain canonical) |
37 | | -KNOWN_RELS = frozenset( |
| 36 | +# Common typed-edge relations (non-breaking; Markdown links remain canonical). |
| 37 | +# |
| 38 | +# Split by declaring plugin so provenance stays legible and adding a plugin's |
| 39 | +# next release is a one-frozenset diff instead of a search through a 150+ |
| 40 | +# entry flat literal. KNOWN_RELS itself is the union — that's the only name |
| 41 | +# other code should reference. |
| 42 | +CORE_RELS = frozenset( |
38 | 43 | { |
39 | 44 | "depends_on", |
40 | 45 | "routes_to", |
|
50 | 55 | } |
51 | 56 | ) |
52 | 57 |
|
| 58 | +# okf-agent-graph (AGER) 0.5.0, docs/AGER_SPEC.md "## Typed edges (AGER |
| 59 | +# additions)" (same 31 rels also tabulated in |
| 60 | +# skills/ager-author/references/typed-edges.md). 5 of AGER's 31 rels already |
| 61 | +# overlap CORE_RELS (depends_on, implements, related_to, routes_to, uses); |
| 62 | +# these are the other 26. Kept in sync by |
| 63 | +# test_known_rels_covers_ager_vocabulary in tests/test_okf_graph.py. |
| 64 | +AGER_RELS = frozenset( |
| 65 | + { |
| 66 | + "aggregates_from", |
| 67 | + "appends_to", |
| 68 | + "binds_secret", |
| 69 | + "blocks", |
| 70 | + "budgets", |
| 71 | + "compensates_with", |
| 72 | + "controlled_by", |
| 73 | + "delegates_to", |
| 74 | + "derived_from", |
| 75 | + "fans_in_from", |
| 76 | + "fans_out_to", |
| 77 | + "guards", |
| 78 | + "handoffs_to", |
| 79 | + "isolates_context", |
| 80 | + "judges", |
| 81 | + "models_with", |
| 82 | + "on_failure", |
| 83 | + "output_of", |
| 84 | + "rate_limited_by", |
| 85 | + "reads_from", |
| 86 | + "records_to", |
| 87 | + "retries_with", |
| 88 | + "retrieves_from", |
| 89 | + "spawns", |
| 90 | + "triggered_by", |
| 91 | + "writes_to", |
| 92 | + } |
| 93 | +) |
| 94 | + |
| 95 | +# project-knowledge-capture (PKC) 0.6.0, docs/typed-edges.md. Extensions |
| 96 | +# beyond CORE_RELS only (`released_in` is already in CORE_RELS, listed there |
| 97 | +# as an alias of PKC's `lands_in`). Matches pkc_common.py DEFAULT_RELATIONS |
| 98 | +# exactly — no doc/code drift found for this plugin. |
| 99 | +PKC_RELS = frozenset( |
| 100 | + { |
| 101 | + "answers", |
| 102 | + "assumes", |
| 103 | + "blocks", |
| 104 | + "decides", |
| 105 | + "designed_by", |
| 106 | + "discovered_in", |
| 107 | + "exposes", |
| 108 | + "informs", |
| 109 | + "invalidates", |
| 110 | + "lands_in", |
| 111 | + "mitigates", |
| 112 | + "originates_from", |
| 113 | + "satisfies", |
| 114 | + "validates", |
| 115 | + "verified_by", |
| 116 | + } |
| 117 | +) |
| 118 | + |
| 119 | +# system-architecture-capture (SAC) 0.3.0, schemas/types.json |
| 120 | +# relations.sac (the structured registry sac_validate.py itself loads at |
| 121 | +# runtime as its known-rels source), not docs/typed-edges.md. The prose doc |
| 122 | +# undercounts by 12: it omits the whole C4 vocabulary (c4_contains, |
| 123 | +# c4_delivers, c4_implements, c4_uses, c4_view_of, zooms_into — documented |
| 124 | +# instead in docs/c4-integration.md) and a handful of code-structure rels |
| 125 | +# (defines, has_field, invokes, owns_capability, source_of, syncs_with) that |
| 126 | +# only appear in sac_common.py DEFAULT_RELATIONS / schemas/types.json. |
| 127 | +# schemas/types.json's "sac" bucket is a strict superset of both the doc |
| 128 | +# table and DEFAULT_RELATIONS (after subtracting the rels SAC inherits from |
| 129 | +# PKC, which PKC_RELS above already covers), so it's used as-is here. |
| 130 | +SAC_RELS = frozenset( |
| 131 | + { |
| 132 | + "alerts_on", |
| 133 | + "authenticates_via", |
| 134 | + "authorizes_with", |
| 135 | + "backed_by", |
| 136 | + "backs_up", |
| 137 | + "belongs_to_domain", |
| 138 | + "builds", |
| 139 | + "c4_contains", |
| 140 | + "c4_delivers", |
| 141 | + "c4_implements", |
| 142 | + "c4_uses", |
| 143 | + "c4_view_of", |
| 144 | + "caches", |
| 145 | + "calls", |
| 146 | + "calls_function", |
| 147 | + "complies_with", |
| 148 | + "configures", |
| 149 | + "connects_to", |
| 150 | + "consumes_api", |
| 151 | + "consumes_event", |
| 152 | + "contains", |
| 153 | + "contains_module", |
| 154 | + "controls", |
| 155 | + "declared_in", |
| 156 | + "defines", |
| 157 | + "depends_on_package", |
| 158 | + "deploys_to", |
| 159 | + "diagrams", |
| 160 | + "dlq_for", |
| 161 | + "emits", |
| 162 | + "encrypts_with", |
| 163 | + "exposes_api", |
| 164 | + "exposes_ui", |
| 165 | + "extends", |
| 166 | + "flagged_by", |
| 167 | + "flows_to", |
| 168 | + "for_channel", |
| 169 | + "has_class", |
| 170 | + "has_field", |
| 171 | + "has_function", |
| 172 | + "has_method", |
| 173 | + "hosted_on", |
| 174 | + "illustrated_by", |
| 175 | + "impacts", |
| 176 | + "implements_interface", |
| 177 | + "in_context", |
| 178 | + "indexes", |
| 179 | + "instantiates", |
| 180 | + "integrates_with", |
| 181 | + "invokes", |
| 182 | + "journeys_through", |
| 183 | + "measured_by", |
| 184 | + "migrates", |
| 185 | + "models", |
| 186 | + "observed_by", |
| 187 | + "owned_by", |
| 188 | + "owns_capability", |
| 189 | + "part_of", |
| 190 | + "produces_artifact", |
| 191 | + "provisions", |
| 192 | + "publishes_event", |
| 193 | + "publishes_to", |
| 194 | + "reads_from", |
| 195 | + "registers_schema", |
| 196 | + "replicates_to", |
| 197 | + "runs_in", |
| 198 | + "schedules", |
| 199 | + "secured_by", |
| 200 | + "secured_by_waf", |
| 201 | + "served_by", |
| 202 | + "served_by_cdn", |
| 203 | + "source_of", |
| 204 | + "stores_in", |
| 205 | + "streams_to", |
| 206 | + "subscribes", |
| 207 | + "subscribes_to", |
| 208 | + "syncs_with", |
| 209 | + "tested_by", |
| 210 | + "triggers", |
| 211 | + "trusts", |
| 212 | + "visualizes", |
| 213 | + "wireframes", |
| 214 | + "writes_to", |
| 215 | + "zooms_into", |
| 216 | + } |
| 217 | +) |
| 218 | + |
| 219 | +# data-engineering-knowledge-capture (DEKC) 0.2.0, docs/typed-edges.md UNION |
| 220 | +# dekc_common.py DEFAULT_RELATIONS — the two disagree in both directions and |
| 221 | +# neither is a superset, so this is the union rather than a pick. The doc |
| 222 | +# has 4 rels the code doesn't (documented_by, has_wireframe, validated_by, |
| 223 | +# wireframes); the code (which dekc_link.py's own CLI help calls "documented |
| 224 | +# relations") has 4 the doc doesn't (aggregates, computes, documents_diagram, |
| 225 | +# joins). |
| 226 | +DEKC_RELS = frozenset( |
| 227 | + { |
| 228 | + "aggregates", |
| 229 | + "belongs_to_domain", |
| 230 | + "businessizes", |
| 231 | + "cataloged_in", |
| 232 | + "computes", |
| 233 | + "consumes_stream", |
| 234 | + "contains", |
| 235 | + "defines", |
| 236 | + "derived_from", |
| 237 | + "documented_by", |
| 238 | + "documents_diagram", |
| 239 | + "feeds", |
| 240 | + "glosses", |
| 241 | + "has_wireframe", |
| 242 | + "implements_contract", |
| 243 | + "ingested_by", |
| 244 | + "ingests_from", |
| 245 | + "joins", |
| 246 | + "lands_as", |
| 247 | + "lands_into", |
| 248 | + "layered_as", |
| 249 | + "measures", |
| 250 | + "models", |
| 251 | + "part_of_lake", |
| 252 | + "part_of_mart", |
| 253 | + "promotes_to", |
| 254 | + "publishes", |
| 255 | + "quality_of", |
| 256 | + "queries", |
| 257 | + "reads_from", |
| 258 | + "sourced_from", |
| 259 | + "stored_in", |
| 260 | + "transforms_to", |
| 261 | + "validated_by", |
| 262 | + "validates", |
| 263 | + "visualizes", |
| 264 | + "wireframes", |
| 265 | + "writes_to", |
| 266 | + } |
| 267 | +) |
| 268 | + |
| 269 | +KNOWN_RELS = CORE_RELS | AGER_RELS | PKC_RELS | SAC_RELS | DEKC_RELS |
| 270 | + |
53 | 271 | HIGH_IMPACT_TYPES = frozenset({"AgentNode", "Workflow", "Harness", "SharedState"}) |
54 | 272 | MEDIUM_IMPACT_TYPES = frozenset({"Dataset", "Table", "Metric", "API", "ToolCapability"}) |
55 | 273 |
|
|
0 commit comments