Skip to content

Commit b5a2411

Browse files
add resolve mcp tool for identifier-shaped lookups
Ship PR-RESOLVE-1: ResolveReason in java_ontology, resolve_v2 with generators/dedupe/ranking/cap, MCP registration, fixtures and contract tests. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8c80b04 commit b5a2411

6 files changed

Lines changed: 784 additions & 3 deletions

File tree

java_ontology.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
and resolver steps for `@CodebaseRole` / `@CodebaseCapability`."""
55
from __future__ import annotations
66

7+
from typing import Literal
8+
79
from ast_java import (
810
ROLE_ANNOTATIONS,
911
_INJECTED_TYPES_TO_CAPABILITY,
@@ -72,6 +74,28 @@
7274
"unresolved",
7375
))
7476

77+
VALID_RESOLVE_REASONS: frozenset[str] = frozenset((
78+
"exact_id",
79+
"exact_fqn",
80+
"fqn_suffix",
81+
"short_name",
82+
"route_template",
83+
"route_method_path",
84+
"client_target",
85+
"client_target_path",
86+
))
87+
88+
ResolveReason = Literal[
89+
"exact_id",
90+
"exact_fqn",
91+
"fqn_suffix",
92+
"short_name",
93+
"route_template",
94+
"route_method_path",
95+
"client_target",
96+
"client_target_path",
97+
]
98+
7599
__all__ = [
76100
"VALID_ROLES",
77101
"VALID_CAPABILITIES",
@@ -82,4 +106,6 @@
82106
"VALID_HTTP_CALL_STRATEGIES",
83107
"VALID_ASYNC_CALL_STRATEGIES",
84108
"VALID_HTTP_CALL_MATCHES",
109+
"VALID_RESOLVE_REASONS",
110+
"ResolveReason",
85111
]

0 commit comments

Comments
 (0)