-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeps.go
More file actions
73 lines (61 loc) · 2.75 KB
/
deps.go
File metadata and controls
73 lines (61 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package mcp
import (
"github.com/randomcodespace/codeiq/internal/flow"
"github.com/randomcodespace/codeiq/internal/graph"
"github.com/randomcodespace/codeiq/internal/intelligence/evidence"
iqquery "github.com/randomcodespace/codeiq/internal/intelligence/query"
"github.com/randomcodespace/codeiq/internal/query"
)
// Deps is the bundle of services every tool handler receives. Keep it
// small — adding fields here is a sign a tool wants to reach across
// layers. Prefer narrowing the interface in the tool registration site.
//
// Phase 3 wired:
// - Store + Query + Stats + Topology cover the 20 graph tools and 9
// topology tools.
// - Flow drives the generate_flow tool.
// - Evidence + QueryPlanner + ArtifactMeta drive the four intelligence
// tools (find_node, get_evidence_pack, get_artifact_metadata,
// get_capabilities).
type Deps struct {
// Store is the read-only Kuzu handle opened by `codeiq mcp` at
// server boot.
Store *graph.Store
// Query owns the high-level read service (consumers / producers /
// callers / dependencies / shortest path / cycles / dead code).
// Mirrors Java QueryService.
Query *query.Service
// Stats owns the StoreStatsService façade (rich categorized stats).
Stats *query.StoreStatsService
// Topology owns the service-topology projection (Topology /
// ServiceDetail / BlastRadius / FindPath / Bottlenecks / Circular
// / DeadServices).
Topology *query.Topology
// Flow owns the architecture-flow-diagram engine. Wired by `codeiq
// mcp` from a *graph.Store-backed Store. nil disables generate_flow.
Flow *flow.Engine
// Evidence owns the evidence-pack assembler for the
// `get_evidence_pack` tool. nil disables that tool (the handler
// returns the legacy "Evidence pack service unavailable. Run
// 'enrich' first." envelope to match the Java contract).
Evidence *evidence.Assembler
// QueryPlanner routes the find_node tool through GRAPH_FIRST /
// LEXICAL_FIRST / MERGED / DEGRADED. nil falls back to GRAPH_FIRST
// for every query (legacy behaviour pre-Planner).
QueryPlanner *iqquery.Planner
// ArtifactMeta is the most recent provenance snapshot bundled into
// `get_artifact_metadata` and every evidence pack. nil yields the
// legacy "Artifact metadata unavailable. Run 'enrich' first."
// envelope.
ArtifactMeta *evidence.ArtifactMetadata
// RootPath is the absolute repo root the read_file tool resolves
// caller paths against. Empty disables the read_file tool.
RootPath string
// MaxResults caps caller-supplied result counts (e.g. limit=1000
// hits CapResults(limit, MaxResults)). Defaults are filled in via
// CapResults if MaxResults <= 0.
MaxResults int
// MaxDepth caps caller-supplied traversal depths (e.g.
// trace_impact / ego_graph). Defaults via CapDepth.
MaxDepth int
}