septum 0.1.5 → 0.1.7
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.
- package/README.md +23 -3
- package/package.json +5 -5
- package/src/cli/commands/check.ts +32 -122
- package/src/cli/commands/hook.ts +45 -12
- package/src/cli/commands/init.ts +6 -4
- package/src/cli/commands/query.ts +45 -5
- package/src/cli/commands/slice.ts +4 -2
- package/src/cli/index.ts +17 -6
- package/src/cli/templates/hooks.ts +6 -6
- package/src/cli/templates/rules.ts +35 -23
- package/src/cli/templates/skill.ts +47 -51
- package/src/core/boundary/evaluator.ts +217 -24
- package/src/core/boundary/staged-auditor.ts +47 -0
- package/src/core/config/loader.ts +29 -12
- package/src/core/database/repositories/dependency.repository.ts +252 -66
- package/src/core/database/repositories/domain.repository.ts +96 -39
- package/src/core/database/repositories/file.repository.ts +20 -19
- package/src/core/database/repositories/symbol.repository.ts +115 -5
- package/src/core/database/repository.ts +19 -2
- package/src/core/database/schema.ts +3 -2
- package/src/core/ingestion/pipeline.ts +96 -60
- package/src/core/parser/boundary-tracker.ts +145 -0
- package/src/core/parser/extractors/frontend.ts +44 -90
- package/src/core/parser/extractors/go.ts +200 -21
- package/src/core/parser/extractors/laravel-semantic.ts +18 -12
- package/src/core/parser/extractors/mcp-cli-semantic.ts +173 -44
- package/src/core/parser/extractors/nestjs-semantic.ts +20 -5
- package/src/core/parser/extractors/php.ts +293 -31
- package/src/core/parser/extractors/python.ts +242 -10
- package/src/core/parser/extractors/typescript.ts +604 -117
- package/src/core/parser/tree-sitter.ts +6 -1
- package/src/core/parser/wasm-assets.ts +17 -0
- package/src/core/parser/wasm-loader.ts +274 -0
- package/src/core/resolver/call-graph-tracer.ts +49 -17
- package/src/core/resolver/module-resolver.ts +88 -26
- package/src/core/resolver/vertical-slice-tracer.ts +34 -11
- package/src/core/session/session-manager.ts +55 -39
- package/src/core/topology/environment-detector.ts +109 -6
- package/src/mcp/schemas.ts +146 -29
- package/src/mcp/server.ts +177 -114
- package/src/mcp/tools/check-boundary.ts +159 -41
- package/src/mcp/tools/get-domain-catalog.ts +30 -15
- package/src/mcp/tools/get-environment-topology.ts +3 -6
- package/src/mcp/tools/get-feature-context.ts +35 -20
- package/src/mcp/tools/get-symbol-hotspots.ts +4 -10
- package/src/mcp/tools/locate-symbol.ts +37 -16
- package/src/mcp/tools/register-domain.ts +3 -12
- package/src/mcp/tools/register-feature.ts +25 -32
- package/src/mcp/tools/trace-vertical-slice.ts +8 -8
- package/src/types/index.ts +56 -6
- package/src/types/wasm.d.ts +4 -0
package/src/types/index.ts
CHANGED
|
@@ -22,10 +22,13 @@ export type SymbolKind =
|
|
|
22
22
|
| "interface"
|
|
23
23
|
| "trait"
|
|
24
24
|
| "enum"
|
|
25
|
+
| "struct"
|
|
25
26
|
| "method"
|
|
26
27
|
| "function"
|
|
27
28
|
| "type"
|
|
28
29
|
| "property"
|
|
30
|
+
| "constant"
|
|
31
|
+
| "variable"
|
|
29
32
|
| "component"
|
|
30
33
|
| "view";
|
|
31
34
|
|
|
@@ -82,19 +85,24 @@ export interface FeatureContextResponse {
|
|
|
82
85
|
|
|
83
86
|
export interface RegisterFeatureArgs {
|
|
84
87
|
feature_key: string;
|
|
88
|
+
feature?: string;
|
|
85
89
|
domain: string;
|
|
86
90
|
description?: string;
|
|
87
|
-
allowed_touchpoints
|
|
91
|
+
allowed_touchpoints?: string[];
|
|
88
92
|
reuse_symbols?: string[];
|
|
89
93
|
input_contract?: Record<string, unknown>;
|
|
90
94
|
output_contract?: Record<string, unknown>;
|
|
91
|
-
|
|
95
|
+
workspace_path?: string;
|
|
92
96
|
}
|
|
93
97
|
|
|
94
98
|
export interface CheckBoundaryArgs {
|
|
95
|
-
file_path
|
|
96
|
-
|
|
99
|
+
file_path?: string;
|
|
100
|
+
file_paths?: string[];
|
|
101
|
+
proposed_imports?: string[];
|
|
97
102
|
feature_key?: string;
|
|
103
|
+
scope?: "file" | "all" | "staged" | "domain";
|
|
104
|
+
domain?: string;
|
|
105
|
+
workspace_path?: string;
|
|
98
106
|
}
|
|
99
107
|
|
|
100
108
|
export interface DomainRecord {
|
|
@@ -121,6 +129,7 @@ export interface FileRecord {
|
|
|
121
129
|
}
|
|
122
130
|
|
|
123
131
|
export interface ActiveFeatureSession {
|
|
132
|
+
owner_id?: string;
|
|
124
133
|
feature_key: string;
|
|
125
134
|
domain: string;
|
|
126
135
|
touchpoints: string[];
|
|
@@ -165,9 +174,11 @@ export interface ExtractedDependency {
|
|
|
165
174
|
statement: string;
|
|
166
175
|
line_number: number;
|
|
167
176
|
is_external: boolean;
|
|
177
|
+
imported_symbols?: string[];
|
|
168
178
|
}
|
|
169
179
|
|
|
170
180
|
export interface ParsedFileAST {
|
|
181
|
+
status?: "parsed" | "unsupported" | "degraded";
|
|
171
182
|
symbols: ExtractedSymbol[];
|
|
172
183
|
dependencies: ExtractedDependency[];
|
|
173
184
|
}
|
|
@@ -177,7 +188,8 @@ export type BoundaryViolationRule =
|
|
|
177
188
|
| "disallowed_dependency"
|
|
178
189
|
| "touchpoint_violation"
|
|
179
190
|
| "unknown_feature"
|
|
180
|
-
| "unmapped_domain"
|
|
191
|
+
| "unmapped_domain"
|
|
192
|
+
| "circular_dependency";
|
|
181
193
|
|
|
182
194
|
export interface BoundaryViolation {
|
|
183
195
|
file: string;
|
|
@@ -189,22 +201,37 @@ export interface BoundaryViolation {
|
|
|
189
201
|
message: string;
|
|
190
202
|
}
|
|
191
203
|
|
|
204
|
+
export interface FileConnectionsSummary {
|
|
205
|
+
imports_from: string[];
|
|
206
|
+
imported_by_count: number;
|
|
207
|
+
imported_by?: string[];
|
|
208
|
+
}
|
|
209
|
+
|
|
192
210
|
export interface DomainCatalogResponse {
|
|
193
211
|
domain: string;
|
|
194
212
|
root: string;
|
|
213
|
+
detail_level?: "compact" | "full";
|
|
214
|
+
total_files?: number;
|
|
215
|
+
showing_files?: number;
|
|
195
216
|
allowed_dependencies: string[];
|
|
196
217
|
forbidden_dependencies: string[];
|
|
197
218
|
files: Array<{
|
|
198
219
|
path: string;
|
|
199
220
|
archetype: ArchetypeKind;
|
|
221
|
+
line_count?: number;
|
|
222
|
+
connections?: FileConnectionsSummary;
|
|
200
223
|
symbols: Array<{
|
|
201
224
|
name: string;
|
|
202
225
|
kind: SymbolKind;
|
|
226
|
+
line_span?: string;
|
|
227
|
+
methods_count?: number;
|
|
228
|
+
properties_count?: number;
|
|
203
229
|
properties?: string[];
|
|
204
230
|
methods?: string[];
|
|
205
231
|
signatures?: string[];
|
|
206
232
|
}>;
|
|
207
233
|
}>;
|
|
234
|
+
agent_hint?: string;
|
|
208
235
|
}
|
|
209
236
|
|
|
210
237
|
export interface ExecutionChainNode {
|
|
@@ -264,6 +291,7 @@ export interface VerticalSliceTraceResponse {
|
|
|
264
291
|
confidence?: "exact" | "inferred";
|
|
265
292
|
is_exact_match?: boolean;
|
|
266
293
|
architecture_style?: string;
|
|
294
|
+
max_depth_applied?: number;
|
|
267
295
|
entrypoint?: {
|
|
268
296
|
method: string;
|
|
269
297
|
uri: string;
|
|
@@ -286,8 +314,10 @@ export interface VerticalSliceTraceResponse {
|
|
|
286
314
|
|
|
287
315
|
export interface GetSymbolArgs {
|
|
288
316
|
symbol: string;
|
|
317
|
+
query?: string;
|
|
289
318
|
domain?: string;
|
|
290
319
|
include_dependencies?: boolean;
|
|
320
|
+
workspace_path?: string;
|
|
291
321
|
}
|
|
292
322
|
|
|
293
323
|
export interface SymbolExactRange {
|
|
@@ -296,6 +326,21 @@ export interface SymbolExactRange {
|
|
|
296
326
|
total_lines: number;
|
|
297
327
|
}
|
|
298
328
|
|
|
329
|
+
export interface ResolvedOutboundCall {
|
|
330
|
+
symbol: string;
|
|
331
|
+
target_file?: string;
|
|
332
|
+
target_range?: SymbolExactRange;
|
|
333
|
+
domain?: string;
|
|
334
|
+
is_resolved: boolean;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export interface SymbolComplexitySmell {
|
|
338
|
+
is_high_complexity: boolean;
|
|
339
|
+
threshold: number;
|
|
340
|
+
total_lines: number;
|
|
341
|
+
warning: string;
|
|
342
|
+
}
|
|
343
|
+
|
|
299
344
|
export interface GetSymbolDetailsResponse {
|
|
300
345
|
symbol: string;
|
|
301
346
|
kind: SymbolKind | string;
|
|
@@ -306,11 +351,16 @@ export interface GetSymbolDetailsResponse {
|
|
|
306
351
|
visibility?: Visibility | string;
|
|
307
352
|
dependencies_injected: string[];
|
|
308
353
|
outbound_calls: string[];
|
|
354
|
+
resolved_outbound_calls?: ResolvedOutboundCall[];
|
|
355
|
+
complexity_smell?: SymbolComplexitySmell;
|
|
309
356
|
sibling_methods?: string[];
|
|
357
|
+
connected_files?: FileConnectionsSummary;
|
|
310
358
|
}
|
|
311
359
|
|
|
312
360
|
export interface GetSymbolImpactArgs {
|
|
313
361
|
symbol: string;
|
|
362
|
+
query?: string;
|
|
363
|
+
workspace_path?: string;
|
|
314
364
|
}
|
|
315
365
|
|
|
316
366
|
export interface InboundCaller {
|
|
@@ -327,7 +377,7 @@ export interface GetSymbolImpactResponse {
|
|
|
327
377
|
warning?: string;
|
|
328
378
|
impact_summary: {
|
|
329
379
|
total_dependents: number;
|
|
330
|
-
risk_level: "low" | "medium" | "high";
|
|
380
|
+
risk_level: "low" | "medium" | "high" | "unknown";
|
|
331
381
|
affected_files_count: number;
|
|
332
382
|
};
|
|
333
383
|
inbound_callers: InboundCaller[];
|