septum 0.1.4 → 0.1.6

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.
Files changed (70) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +105 -105
  3. package/bin/septum.ts +4 -4
  4. package/package.json +63 -63
  5. package/src/cli/commands/check.ts +161 -161
  6. package/src/cli/commands/hook.ts +216 -188
  7. package/src/cli/commands/ingest.ts +29 -29
  8. package/src/cli/commands/init.ts +213 -211
  9. package/src/cli/commands/locate.ts +61 -61
  10. package/src/cli/commands/query.ts +104 -64
  11. package/src/cli/commands/serve.ts +5 -5
  12. package/src/cli/commands/slice.ts +50 -48
  13. package/src/cli/commands/sync.ts +31 -31
  14. package/src/cli/index.ts +220 -210
  15. package/src/cli/templates/hooks.ts +75 -75
  16. package/src/cli/templates/rules.ts +50 -38
  17. package/src/cli/templates/skill.ts +65 -69
  18. package/src/core/boundary/evaluator.ts +429 -210
  19. package/src/core/config/loader.ts +117 -97
  20. package/src/core/config/schema.ts +39 -39
  21. package/src/core/database/client.ts +44 -44
  22. package/src/core/database/repositories/dependency.repository.ts +552 -349
  23. package/src/core/database/repositories/domain.repository.ts +275 -198
  24. package/src/core/database/repositories/file.repository.ts +117 -106
  25. package/src/core/database/repositories/meta.repository.ts +33 -33
  26. package/src/core/database/repositories/symbol.repository.ts +482 -443
  27. package/src/core/database/repository.ts +281 -260
  28. package/src/core/database/schema.ts +154 -153
  29. package/src/core/discovery/topology-detector.ts +486 -486
  30. package/src/core/ingestion/hasher.ts +5 -5
  31. package/src/core/ingestion/pipeline.ts +606 -535
  32. package/src/core/parser/boundary-tracker.ts +433 -288
  33. package/src/core/parser/extractors/base.ts +62 -62
  34. package/src/core/parser/extractors/blade.ts +158 -158
  35. package/src/core/parser/extractors/frontend.ts +147 -194
  36. package/src/core/parser/extractors/go.ts +408 -180
  37. package/src/core/parser/extractors/laravel-semantic.ts +1045 -901
  38. package/src/core/parser/extractors/mcp-cli-semantic.ts +328 -199
  39. package/src/core/parser/extractors/nestjs-semantic.ts +134 -119
  40. package/src/core/parser/extractors/php.ts +415 -153
  41. package/src/core/parser/extractors/python.ts +460 -228
  42. package/src/core/parser/extractors/registry.ts +70 -70
  43. package/src/core/parser/extractors/semantic-extractor.interface.ts +21 -21
  44. package/src/core/parser/extractors/typescript.ts +668 -181
  45. package/src/core/parser/tree-sitter.ts +41 -41
  46. package/src/core/parser/wasm-loader.ts +271 -0
  47. package/src/core/resolver/call-graph-tracer.ts +698 -668
  48. package/src/core/resolver/module-resolver.ts +479 -342
  49. package/src/core/resolver/path-resolver.ts +147 -147
  50. package/src/core/resolver/symbol-locator.ts +543 -543
  51. package/src/core/resolver/vertical-slice-tracer.ts +323 -285
  52. package/src/core/session/session-manager.ts +56 -56
  53. package/src/core/telemetry/telemetry.ts +86 -86
  54. package/src/core/topology/environment-detector.ts +109 -6
  55. package/src/index.ts +21 -21
  56. package/src/mcp/schemas.ts +695 -286
  57. package/src/mcp/server.ts +927 -716
  58. package/src/mcp/tools/check-boundary.ts +307 -152
  59. package/src/mcp/tools/get-domain-catalog.ts +155 -121
  60. package/src/mcp/tools/get-environment-topology.ts +3 -6
  61. package/src/mcp/tools/get-feature-context.ts +227 -116
  62. package/src/mcp/tools/get-symbol-hotspots.ts +54 -59
  63. package/src/mcp/tools/get-symbol-impact.ts +28 -26
  64. package/src/mcp/tools/get-symbol.ts +65 -63
  65. package/src/mcp/tools/locate-symbol.ts +169 -190
  66. package/src/mcp/tools/register-domain.ts +59 -64
  67. package/src/mcp/tools/register-feature.ts +91 -0
  68. package/src/mcp/tools/trace-vertical-slice.ts +74 -48
  69. package/src/types/index.ts +366 -315
  70. package/src/version.ts +3 -3
@@ -1,70 +1,70 @@
1
- import type {
2
- SemanticSliceExtractor,
3
- VerticalSliceCandidate,
4
- } from "./semantic-extractor.interface.ts";
5
- import { LaravelSemanticExtractor } from "./laravel-semantic.ts";
6
- import { McpCliSemanticExtractor } from "./mcp-cli-semantic.ts";
7
- import { NestJsSemanticExtractor } from "./nestjs-semantic.ts";
8
-
9
- export class SemanticSliceExtractorRegistry {
10
- private static extractors: SemanticSliceExtractor[] = [
11
- new LaravelSemanticExtractor(),
12
- new McpCliSemanticExtractor(),
13
- new NestJsSemanticExtractor(),
14
- ];
15
-
16
- /**
17
- * Registers a new semantic slice extractor strategy.
18
- * Prepends to the list to give higher priority to custom extractors.
19
- */
20
- public static register(extractor: SemanticSliceExtractor): void {
21
- this.extractors.unshift(extractor);
22
- }
23
-
24
- /**
25
- * Returns all extractors capable of handling the specified project topology.
26
- */
27
- public static getExtractors(projectRoot: string, framework?: string): SemanticSliceExtractor[] {
28
- return this.extractors.filter((extractor) => extractor.canHandle(projectRoot, framework));
29
- }
30
-
31
- /**
32
- * Executes all matched extractors and combines their vertical slices.
33
- */
34
- public static async extractAllSlices(
35
- projectRoot: string,
36
- framework?: string,
37
- domainId?: number
38
- ): Promise<VerticalSliceCandidate[]> {
39
- const matched = this.getExtractors(projectRoot, framework);
40
- const combinedSlices: VerticalSliceCandidate[] = [];
41
-
42
- for (const extractor of matched) {
43
- const slices = await extractor.extractSlices(projectRoot, domainId);
44
- combinedSlices.push(...slices);
45
- }
46
-
47
- return combinedSlices;
48
- }
49
-
50
- /**
51
- * Synchronous execution of all matched semantic extractors.
52
- */
53
- public static extractAllSlicesSync(
54
- projectRoot: string,
55
- framework?: string,
56
- domainId?: number
57
- ): VerticalSliceCandidate[] {
58
- const matched = this.getExtractors(projectRoot, framework);
59
- const combinedSlices: VerticalSliceCandidate[] = [];
60
-
61
- for (const extractor of matched) {
62
- const res = extractor.extractSlices(projectRoot, domainId);
63
- if (Array.isArray(res)) {
64
- combinedSlices.push(...res);
65
- }
66
- }
67
-
68
- return combinedSlices;
69
- }
70
- }
1
+ import type {
2
+ SemanticSliceExtractor,
3
+ VerticalSliceCandidate,
4
+ } from "./semantic-extractor.interface.ts";
5
+ import { LaravelSemanticExtractor } from "./laravel-semantic.ts";
6
+ import { McpCliSemanticExtractor } from "./mcp-cli-semantic.ts";
7
+ import { NestJsSemanticExtractor } from "./nestjs-semantic.ts";
8
+
9
+ export class SemanticSliceExtractorRegistry {
10
+ private static extractors: SemanticSliceExtractor[] = [
11
+ new LaravelSemanticExtractor(),
12
+ new McpCliSemanticExtractor(),
13
+ new NestJsSemanticExtractor(),
14
+ ];
15
+
16
+ /**
17
+ * Registers a new semantic slice extractor strategy.
18
+ * Prepends to the list to give higher priority to custom extractors.
19
+ */
20
+ public static register(extractor: SemanticSliceExtractor): void {
21
+ this.extractors.unshift(extractor);
22
+ }
23
+
24
+ /**
25
+ * Returns all extractors capable of handling the specified project topology.
26
+ */
27
+ public static getExtractors(projectRoot: string, framework?: string): SemanticSliceExtractor[] {
28
+ return this.extractors.filter((extractor) => extractor.canHandle(projectRoot, framework));
29
+ }
30
+
31
+ /**
32
+ * Executes all matched extractors and combines their vertical slices.
33
+ */
34
+ public static async extractAllSlices(
35
+ projectRoot: string,
36
+ framework?: string,
37
+ domainId?: number
38
+ ): Promise<VerticalSliceCandidate[]> {
39
+ const matched = this.getExtractors(projectRoot, framework);
40
+ const combinedSlices: VerticalSliceCandidate[] = [];
41
+
42
+ for (const extractor of matched) {
43
+ const slices = await extractor.extractSlices(projectRoot, domainId);
44
+ combinedSlices.push(...slices);
45
+ }
46
+
47
+ return combinedSlices;
48
+ }
49
+
50
+ /**
51
+ * Synchronous execution of all matched semantic extractors.
52
+ */
53
+ public static extractAllSlicesSync(
54
+ projectRoot: string,
55
+ framework?: string,
56
+ domainId?: number
57
+ ): VerticalSliceCandidate[] {
58
+ const matched = this.getExtractors(projectRoot, framework);
59
+ const combinedSlices: VerticalSliceCandidate[] = [];
60
+
61
+ for (const extractor of matched) {
62
+ const res = extractor.extractSlices(projectRoot, domainId);
63
+ if (Array.isArray(res)) {
64
+ combinedSlices.push(...res);
65
+ }
66
+ }
67
+
68
+ return combinedSlices;
69
+ }
70
+ }
@@ -1,21 +1,21 @@
1
- import type { VerticalSliceRecord } from "../../../types/index.ts";
2
-
3
- export type VerticalSliceCandidate = Omit<VerticalSliceRecord, "id" | "created_at">;
4
-
5
- export interface SemanticSliceExtractor {
6
- readonly id: string;
7
- readonly name: string;
8
-
9
- /**
10
- * Determines if this extractor can handle the project topology.
11
- */
12
- canHandle(projectRoot: string, framework?: string): boolean;
13
-
14
- /**
15
- * Extracts vertical slices from the codebase.
16
- */
17
- extractSlices(
18
- projectRoot: string,
19
- domainId?: number
20
- ): Promise<VerticalSliceCandidate[]> | VerticalSliceCandidate[];
21
- }
1
+ import type { VerticalSliceRecord } from "../../../types/index.ts";
2
+
3
+ export type VerticalSliceCandidate = Omit<VerticalSliceRecord, "id" | "created_at">;
4
+
5
+ export interface SemanticSliceExtractor {
6
+ readonly id: string;
7
+ readonly name: string;
8
+
9
+ /**
10
+ * Determines if this extractor can handle the project topology.
11
+ */
12
+ canHandle(projectRoot: string, framework?: string): boolean;
13
+
14
+ /**
15
+ * Extracts vertical slices from the codebase.
16
+ */
17
+ extractSlices(
18
+ projectRoot: string,
19
+ domainId?: number
20
+ ): Promise<VerticalSliceCandidate[]> | VerticalSliceCandidate[];
21
+ }