Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ pub const fn http_application_owner_kind(
| ApplicationSurfaceOperation::SkillList
| ApplicationSurfaceOperation::SkillView
| ApplicationSurfaceOperation::HermesSkillBridge
| ApplicationSurfaceOperation::Analytics => return None,
| ApplicationSurfaceOperation::Analytics
| ApplicationSurfaceOperation::Search => return None,
ApplicationSurfaceOperation::FactStoreCurate
| ApplicationSurfaceOperation::FactStoreAdd
| ApplicationSurfaceOperation::FactStoreSearch
Expand Down
9 changes: 6 additions & 3 deletions crates/tracedecay-contracts/src/graph_tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ use crate::retrieval::{
GrepSearchResultV1, HealthResultV1, HermesSkillBridgeResultV1, HotspotsResultV1,
ImpactResultV1, InheritanceDepthResultV1, LargestResultV1, NodeResultV1, PortOrderResultV1,
PortStatusResultV1, PrContextResultV1, RankResultV1, RecursionResultV1, RedundancyResultV1,
RenamePreviewPrimitiveOutcomeV1, RetrieveResultV1, SignatureResultV1, SimilarResultV1,
SkillListResultV1, SkillViewResultV1, TestMapResultV1, TestRiskResultV1, TodosResultV1,
UnmountedFilesResultV1, UnsafePatternsResultV1,
RenamePreviewPrimitiveOutcomeV1, RetrieveResultV1, SearchResultV1, SignatureResultV1,
SimilarResultV1, SkillListResultV1, SkillViewResultV1, TestMapResultV1, TestRiskResultV1,
TodosResultV1, UnmountedFilesResultV1, UnsafePatternsResultV1,
};

/// One graph read's typed result, tagged by its operation.
Expand Down Expand Up @@ -82,6 +82,7 @@ pub enum GraphToolResultV1 {
SkillView(Box<SkillViewResultV1>),
HermesSkillBridge(Box<HermesSkillBridgeResultV1>),
Analytics(Box<AnalyticsResultV1>),
Search(Box<SearchResultV1>),
}

impl GraphToolResultV1 {
Expand Down Expand Up @@ -150,6 +151,7 @@ impl GraphToolResultV1 {
Operation::SkillView => Self::SkillView(serde_json::from_value(value)?),
Operation::HermesSkillBridge => Self::HermesSkillBridge(serde_json::from_value(value)?),
Operation::Analytics => Self::Analytics(serde_json::from_value(value)?),
Operation::Search => Self::Search(serde_json::from_value(value)?),
operation => {
return Err(serde::de::Error::custom(format!(
"{} is not a graph-tool operation",
Expand Down Expand Up @@ -218,6 +220,7 @@ impl GraphToolResultV1 {
Self::SkillView(result) => serde_json::to_value(result),
Self::HermesSkillBridge(result) => serde_json::to_value(result),
Self::Analytics(result) => serde_json::to_value(result),
Self::Search(result) => serde_json::to_value(result),
}
}
}
Expand Down
9 changes: 8 additions & 1 deletion crates/tracedecay-contracts/src/retrieval/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ use crate::retrieval::requests::{
StorageStatusPrimitiveResult,
};
use crate::retrieval::response_handle_surface::{RetrieveResultV1, RetrieveSurfaceRequestV1};
use crate::retrieval::search_surface::{SearchResultV1, SearchSurfaceRequestV1};
use crate::retrieval::symbol_graph::{
ImplementationRecord, SymbolGraphPage, SymbolPrimitiveRecord, SymbolRelationRecord,
TypeHierarchyRecord,
Expand Down Expand Up @@ -253,6 +254,7 @@ const PRIMITIVE_READ_SPECS: &[PrimitiveReadSpec] = &[
graph_report_spec("skill_view"),
graph_report_spec("hermes_skill_bridge"),
graph_report_spec("analytics"),
graph_report_spec("search"),
git_context_spec("affected"),
git_context_spec("diff_context"),
git_context_spec("changelog"),
Expand Down Expand Up @@ -349,7 +351,8 @@ fn primitive_read_surfaces(spec: &PrimitiveReadSpec) -> &'static [BindingSurface
| "skill_list"
| "skill_view"
| "hermes_skill_bridge"
| "analytics" => &CLI_MCP_PRIMITIVE_SURFACES,
| "analytics"
| "search" => &CLI_MCP_PRIMITIVE_SURFACES,
"health_read" | "storage_status" | "diagnostics_read" => &DASHBOARD_PRIMITIVE_SURFACES,
_ => &PRE_DASHBOARD_PRIMITIVE_SURFACES,
}
Expand Down Expand Up @@ -568,6 +571,9 @@ fn primitive_read_description(operation: &str) -> &'static str {
"analytics" => {
"Roll up tool, hint, fact-funnel and automation-run analytics for the resolved project."
}
"search" => {
"Rank symbols by name, identifier fragment, signature, path, or phrase through exact and lexical routes."
}
_ => "Read bounded data from the admitted project's current retained state.",
}
}
Expand Down Expand Up @@ -1033,6 +1039,7 @@ fn primitive_executable_schemas(
HermesSkillBridgeResultV1
);
add!("analytics", AnalyticsSurfaceRequestV1, AnalyticsResultV1);
add!("search", SearchSurfaceRequestV1, SearchResultV1);
Ok(schemas)
}

Expand Down
11 changes: 11 additions & 0 deletions crates/tracedecay-contracts/src/retrieval/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ mod primitive_surface;
mod project_file_surface;
mod requests;
mod response_handle_surface;
mod search_surface;
mod service;
mod source_read;
mod symbol_graph;
Expand Down Expand Up @@ -223,6 +224,16 @@ pub use response_handle_surface::{
RetrieveHandleExpiredV1, RetrieveHandleMissingV1, RetrieveResultV1, RetrieveSurfaceRequestV1,
RetrievedPageV1,
};
pub use search_surface::{
SEARCH_MAX_LEXICAL_ALIASES, SEARCH_MAX_LEXICAL_ANCHOR_BYTES, SEARCH_MAX_LEXICAL_ANCHORS,
SEARCH_MAX_LEXICAL_PHRASES, SEARCH_MAX_LEXICAL_PROXIMITIES, SEARCH_MAX_LEXICAL_PROXIMITY_GAP,
SEARCH_MAX_LEXICAL_PROXIMITY_TERMS, SearchCompleteV1, SearchCoverageV1,
SearchExternalImportCandidatesV1, SearchExternalImportHintV1, SearchExternalImportV1,
SearchLaneStateV1, SearchLaneStatusV1, SearchLexicalAliasV1, SearchLexicalAlternativeReasonV1,
SearchLexicalFieldFilterV1, SearchLexicalFieldV1, SearchLexicalProximityV1,
SearchLexicalRouteV1, SearchResultDisplayV1, SearchResultRowV1, SearchResultV1,
SearchRouteMatchV1, SearchSpellingVariantV1, SearchSurfaceRequestV1, SearchUnavailableV1,
};
pub use source_read::{
MAX_SOURCE_READ_PATH_BYTES, SourceReadModeV1, SourceReadPortContext, SourceReadPortFuture,
SourceReadPortOutcome, SourceReadPrimitivePort, SourceReadPrimitiveRequest, SourceReadResultV1,
Expand Down
Loading
Loading