@papyruslabsai/seshat-mcp 0.20.0 → 0.20.1

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.
@@ -1,150 +0,0 @@
1
- /**
2
- * Analysis Tools
3
- *
4
- * Composite analyses built from the extracted code entity graph.
5
- * Each tool computes derived insights (dead code, layer violations,
6
- * coupling metrics, auth coverage, etc.) from the entity data.
7
- */
8
- import type { JstfEntity, ProjectLoader } from '../types.js';
9
- /**
10
- * Estimate the token cost of loading an entity's source code into an LLM context.
11
- * Uses real sourceTokens from the extraction pipeline when available (v0.3.2+),
12
- * falls back to heuristic estimation for older bundles.
13
- */
14
- export declare function estimateTokens(e: JstfEntity): number;
15
- export declare function findDeadCode(args: {
16
- include_tests?: boolean;
17
- project?: string;
18
- }, loader: ProjectLoader): unknown;
19
- /**
20
- * The ways into the system — the reachability roots find_dead_code already
21
- * computes, surfaced as a tool and classified by KIND. An entry point is a
22
- * route/controller, a test, a framework plugin registration, or an exported
23
- * symbol (the library's public API surface). entryPointCount here reconciles
24
- * with find_dead_code's `entryPoints` (same seed definition).
25
- */
26
- export declare function findEntryPoints(args: {
27
- project?: string;
28
- }, loader: ProjectLoader): unknown;
29
- /**
30
- * Follow data from one entity through the call graph to its sinks. Composes
31
- * the data dimension (inputs/outputs/mutations/db) with call edges: from a
32
- * start entity, walk callees up to max_depth, record the data ops at each hop,
33
- * and report the chain from the start to every sink it reaches (db write,
34
- * network egress, fs write). Answers "I'm touching this function — where does
35
- * its data end up?" — the cross-edge composition get_data_flow can't give for
36
- * a single entity. Pairs with trace_boundaries (observability) and
37
- * query_data_targets (who-touches-a-target); this one is the path itself.
38
- */
39
- export declare function traceDataPath(args: {
40
- entity?: string;
41
- entity_id?: string;
42
- project?: string;
43
- max_depth?: number;
44
- }, loader: ProjectLoader): unknown;
45
- export declare function findLayerViolations(args: {
46
- project?: string;
47
- }, loader: ProjectLoader): unknown;
48
- export declare function getCouplingMetrics(args: {
49
- group_by?: 'module' | 'layer';
50
- project?: string;
51
- }, loader: ProjectLoader): unknown;
52
- export declare function getAuthMatrix(args: {
53
- project?: string;
54
- module?: string;
55
- layer?: string;
56
- }, loader: ProjectLoader): unknown;
57
- export declare function findErrorGaps(args: {
58
- project?: string;
59
- }, loader: ProjectLoader): unknown;
60
- export declare function getTestCoverage(args: {
61
- weight_by_blast_radius?: boolean;
62
- project?: string;
63
- }, loader: ProjectLoader): unknown;
64
- export declare function getOptimalContext(args: {
65
- target_entity: string;
66
- max_tokens?: number;
67
- strategy?: 'bfs' | 'blast_radius';
68
- project?: string;
69
- }, loader: ProjectLoader): unknown;
70
- /**
71
- * Estimate token cost of a code change BEFORE starting work.
72
- * Computes blast radius, sums source token counts, and projects total burn.
73
- * Logs prediction to Supabase when configured (for calibration feedback loop).
74
- */
75
- export declare function estimateTaskCost(args: {
76
- target_entities: string[];
77
- context_budget?: number;
78
- project?: string;
79
- }, loader: ProjectLoader): Promise<unknown>;
80
- /**
81
- * Close the calibration feedback loop by reporting actual token usage
82
- * against a prior prediction from estimate_task_cost.
83
- *
84
- * Can also abandon a prediction (task was cancelled/not completed),
85
- * or list recent predictions for calibration analysis.
86
- */
87
- export declare function reportActualBurn(args: {
88
- prediction_id?: string;
89
- actual_input_tokens?: number;
90
- actual_output_tokens?: number;
91
- actual_total_tokens?: number;
92
- model?: string;
93
- action?: 'complete' | 'abandon' | 'list';
94
- project?: string;
95
- notes?: string;
96
- }, loader: ProjectLoader): Promise<unknown>;
97
- export declare function find_runtime_violations(args: {
98
- project?: string;
99
- }, loader: ProjectLoader): unknown;
100
- export declare function find_ownership_violations(args: {
101
- project?: string;
102
- }, loader: ProjectLoader): unknown;
103
- export declare function query_traits(args: {
104
- trait: string;
105
- project?: string;
106
- }, loader: ProjectLoader): unknown;
107
- export declare function simulate_mutation(args: {
108
- entity_id: string;
109
- mutation: {
110
- dimension: 'constraints' | 'traits' | 'edges' | 'data' | 'signature';
111
- change: {
112
- add?: string[];
113
- remove?: string[];
114
- add_calls?: string[];
115
- remove_calls?: string[];
116
- add_tables?: Array<{
117
- table: string;
118
- operation?: string;
119
- }>;
120
- remove_tables?: string[];
121
- params?: {
122
- add?: string[];
123
- remove?: string[];
124
- };
125
- };
126
- };
127
- project?: string;
128
- }, loader: ProjectLoader): unknown;
129
- export declare function query_data_targets(args: {
130
- target_name: string;
131
- project?: string;
132
- }, loader: ProjectLoader): unknown;
133
- export declare function find_exposure_leaks(args: {
134
- project?: string;
135
- }, loader: ProjectLoader): unknown;
136
- export declare function find_semantic_clones(args: {
137
- project?: string;
138
- min_complexity?: number;
139
- }, loader: ProjectLoader): unknown;
140
- export declare function create_symbol(args: {
141
- id: string;
142
- source_file: string;
143
- layer?: string;
144
- project?: string;
145
- description?: string;
146
- }, loader: ProjectLoader): unknown;
147
- export declare function trace_boundaries(args: {
148
- project_a: string;
149
- project_b?: string;
150
- }, loaderA: ProjectLoader, loaderB?: ProjectLoader): unknown;