septum 0.1.3 → 0.1.5
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/LICENSE +21 -21
- package/README.md +105 -102
- package/bin/septum.ts +4 -4
- package/package.json +63 -63
- package/src/cli/commands/check.ts +161 -161
- package/src/cli/commands/hook.ts +188 -188
- package/src/cli/commands/ingest.ts +29 -29
- package/src/cli/commands/init.ts +211 -211
- package/src/cli/commands/locate.ts +61 -61
- package/src/cli/commands/query.ts +64 -64
- package/src/cli/commands/serve.ts +5 -5
- package/src/cli/commands/slice.ts +48 -90
- package/src/cli/commands/sync.ts +31 -31
- package/src/cli/commands/topology.ts +119 -0
- package/src/cli/index.ts +210 -199
- package/src/cli/templates/hooks.ts +75 -75
- package/src/cli/templates/rules.ts +38 -38
- package/src/cli/templates/skill.ts +69 -69
- package/src/core/boundary/evaluator.ts +232 -210
- package/src/core/config/loader.ts +97 -97
- package/src/core/config/schema.ts +39 -39
- package/src/core/database/client.ts +44 -44
- package/src/core/database/repositories/dependency.repository.ts +366 -349
- package/src/core/database/repositories/domain.repository.ts +218 -198
- package/src/core/database/repositories/environment.repository.ts +207 -0
- package/src/core/database/repositories/file.repository.ts +116 -106
- package/src/core/database/repositories/meta.repository.ts +33 -33
- package/src/core/database/repositories/symbol.repository.ts +443 -424
- package/src/core/database/repository.ts +264 -255
- package/src/core/database/schema.ts +34 -1
- package/src/core/discovery/topology-detector.ts +486 -486
- package/src/core/ingestion/hasher.ts +5 -5
- package/src/core/ingestion/pipeline.ts +584 -535
- package/src/core/parser/behavioral-analyzer.ts +119 -0
- package/src/core/parser/boundary-tracker.ts +288 -128
- package/src/core/parser/extractors/base.ts +62 -61
- package/src/core/parser/extractors/frontend.ts +194 -194
- package/src/core/parser/extractors/go.ts +229 -176
- package/src/core/parser/extractors/laravel-semantic.ts +1039 -585
- package/src/core/parser/extractors/mcp-cli-semantic.ts +199 -199
- package/src/core/parser/extractors/nestjs-semantic.ts +119 -119
- package/src/core/parser/extractors/php.ts +153 -149
- package/src/core/parser/extractors/python.ts +228 -226
- package/src/core/parser/extractors/registry.ts +70 -70
- package/src/core/parser/extractors/semantic-extractor.interface.ts +21 -21
- package/src/core/parser/extractors/typescript.ts +181 -177
- package/src/core/parser/schema/providers/laravel-migration-provider.ts +215 -0
- package/src/core/parser/schema/providers/prisma-schema-provider.ts +89 -0
- package/src/core/parser/schema/schema-provider-registry.ts +43 -0
- package/src/core/parser/schema/schema-provider.interface.ts +33 -0
- package/src/core/parser/tree-sitter.ts +41 -41
- package/src/core/resolver/call-graph-tracer.ts +666 -668
- package/src/core/resolver/module-resolver.ts +408 -342
- package/src/core/resolver/symbol-locator.ts +543 -543
- package/src/core/resolver/vertical-slice-tracer.ts +301 -252
- package/src/core/session/session-manager.ts +56 -56
- package/src/core/telemetry/telemetry.ts +86 -86
- package/src/core/topology/environment-detector.ts +860 -0
- package/src/core/topology/types.ts +83 -0
- package/src/index.ts +21 -18
- package/src/mcp/schemas.ts +578 -238
- package/src/mcp/server.ts +875 -656
- package/src/mcp/tools/check-boundary.ts +171 -152
- package/src/mcp/tools/get-domain-catalog.ts +145 -121
- package/src/mcp/tools/get-environment-topology.ts +141 -0
- package/src/mcp/tools/get-feature-context.ts +212 -116
- package/src/mcp/tools/get-symbol-hotspots.ts +60 -49
- package/src/mcp/tools/get-symbol-impact.ts +28 -26
- package/src/mcp/tools/get-symbol.ts +65 -63
- package/src/mcp/tools/locate-symbol.ts +171 -190
- package/src/mcp/tools/register-domain.ts +68 -64
- package/src/mcp/tools/register-feature.ts +100 -0
- package/src/mcp/tools/trace-vertical-slice.ts +74 -103
- package/src/types/index.ts +335 -299
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export type EnvironmentLayer =
|
|
2
|
+
| "edge"
|
|
3
|
+
| "gateway"
|
|
4
|
+
| "host"
|
|
5
|
+
| "runtime"
|
|
6
|
+
| "storage"
|
|
7
|
+
| "telemetry";
|
|
8
|
+
|
|
9
|
+
export type LayerResolutionStatus = "DETECTED" | "AMBIGUOUS" | "UNRESOLVED" | "VERIFIED";
|
|
10
|
+
|
|
11
|
+
export type CanonicalPlatformTag =
|
|
12
|
+
| "shared_hosting"
|
|
13
|
+
| "vps"
|
|
14
|
+
| "docker"
|
|
15
|
+
| "serverless"
|
|
16
|
+
| "kubernetes"
|
|
17
|
+
| "managed_db"
|
|
18
|
+
| "cdn_edge"
|
|
19
|
+
| "paas"
|
|
20
|
+
| "static_cdn"
|
|
21
|
+
| "unspecified";
|
|
22
|
+
|
|
23
|
+
export interface EnvironmentLayerInfo {
|
|
24
|
+
layer: EnvironmentLayer;
|
|
25
|
+
platform?: string;
|
|
26
|
+
canonical_tag?: CanonicalPlatformTag;
|
|
27
|
+
status: LayerResolutionStatus;
|
|
28
|
+
detected_from?: string[];
|
|
29
|
+
evidence?: string[];
|
|
30
|
+
constraints?: string[];
|
|
31
|
+
unresolved_inquiry?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface TopologyNode {
|
|
35
|
+
id: string; // e.g. "edge:cloudflare", "host:api-vps", "host:worker-vps", "storage:central-db"
|
|
36
|
+
layer: EnvironmentLayer;
|
|
37
|
+
name: string; // e.g. "Cloudflare Perimeter", "API Backend VPS", "Postgres Cluster"
|
|
38
|
+
platform: string; // e.g. "Cloudflare WAF", "Hostinger VPS", "AWS RDS Postgres"
|
|
39
|
+
canonical_tag: CanonicalPlatformTag;
|
|
40
|
+
domain_or_ip?: string; // e.g. "api.example.com", "10.0.0.5"
|
|
41
|
+
role?: string; // e.g. "web_api", "queue_worker", "frontend_spa", "database_primary"
|
|
42
|
+
status: LayerResolutionStatus;
|
|
43
|
+
detected_from: string[];
|
|
44
|
+
constraints: string[];
|
|
45
|
+
connected_to?: string[]; // IDs of nodes this node interacts with
|
|
46
|
+
unresolved_inquiry?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface CrossLayerInterplay {
|
|
50
|
+
title: string;
|
|
51
|
+
involved_layers: EnvironmentLayer[];
|
|
52
|
+
involved_node_ids?: string[];
|
|
53
|
+
risk_or_rule: string;
|
|
54
|
+
required_action: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface EnvironmentTopology {
|
|
58
|
+
is_distributed: boolean;
|
|
59
|
+
nodes: TopologyNode[];
|
|
60
|
+
layers: Record<EnvironmentLayer, EnvironmentLayerInfo>;
|
|
61
|
+
overall_status: "RESOLVED" | "NEEDS_CLARIFICATION";
|
|
62
|
+
interplays: CrossLayerInterplay[];
|
|
63
|
+
pending_inquiries: string[];
|
|
64
|
+
architectural_summary: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface ResolveLayerInput {
|
|
68
|
+
layer: EnvironmentLayer;
|
|
69
|
+
platform: string;
|
|
70
|
+
constraints?: string[];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ResolveNodeInput {
|
|
74
|
+
id: string;
|
|
75
|
+
layer: EnvironmentLayer;
|
|
76
|
+
name: string;
|
|
77
|
+
platform: string;
|
|
78
|
+
canonical_tag?: CanonicalPlatformTag;
|
|
79
|
+
domain_or_ip?: string;
|
|
80
|
+
role?: string;
|
|
81
|
+
constraints?: string[];
|
|
82
|
+
connected_to?: string[];
|
|
83
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
export * from "./types/index.ts";
|
|
2
|
-
export * from "./core/config/schema.ts";
|
|
3
|
-
export * from "./core/config/loader.ts";
|
|
4
|
-
export * from "./core/database/client.ts";
|
|
5
|
-
export * from "./core/database/repository.ts";
|
|
6
|
-
export * from "./core/parser/extractors/base.ts";
|
|
7
|
-
export * from "./core/parser/tree-sitter.ts";
|
|
8
|
-
export * from "./core/ingestion/pipeline.ts";
|
|
9
|
-
export * from "./core/boundary/evaluator.ts";
|
|
10
|
-
export * from "./core/resolver/call-graph-tracer.ts";
|
|
11
|
-
export * from "./core/resolver/vertical-slice-tracer.ts";
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
1
|
+
export * from "./types/index.ts";
|
|
2
|
+
export * from "./core/config/schema.ts";
|
|
3
|
+
export * from "./core/config/loader.ts";
|
|
4
|
+
export * from "./core/database/client.ts";
|
|
5
|
+
export * from "./core/database/repository.ts";
|
|
6
|
+
export * from "./core/parser/extractors/base.ts";
|
|
7
|
+
export * from "./core/parser/tree-sitter.ts";
|
|
8
|
+
export * from "./core/ingestion/pipeline.ts";
|
|
9
|
+
export * from "./core/boundary/evaluator.ts";
|
|
10
|
+
export * from "./core/resolver/call-graph-tracer.ts";
|
|
11
|
+
export * from "./core/resolver/vertical-slice-tracer.ts";
|
|
12
|
+
export * from "./core/topology/types.ts";
|
|
13
|
+
export * from "./core/topology/environment-detector.ts";
|
|
14
|
+
export * from "./mcp/tools/get-environment-topology.ts";
|
|
15
|
+
export * from "./mcp/server.ts";
|
|
16
|
+
export * from "./cli/index.ts";
|
|
17
|
+
|
|
18
|
+
import { runCLI } from "./cli/index.ts";
|
|
19
|
+
if (import.meta.main) {
|
|
20
|
+
runCLI(process.argv);
|
|
21
|
+
}
|